Code Duplication    Length = 7-9 lines in 3 locations

src/BambooHr.php 3 locations

@@ 297-303 (lines=7) @@
294
     * @return \BambooHR\API\BambooHTTPResponse
295
     * @link http://www.bamboohr.com/api/documentation/login.php
296
     */
297
    function requestSecretKey($applicationKey, $email, $password) {
298
        $request=new BambooHTTPRequest();
299
        $request->method="POST";
300
        $request->url=$this->baseUrl."/v1/login";
301
        $request->content="applicationKey=".urlencode($applicationKey)."&user=".urlencode($email)."&password=".urlencode($password);
302
        return $this->httpHandler->sendRequest( $request );
303
    }
304
305
    /**
306
     * Use the Login API to get a key for use in later API requests. Also use the
@@ 463-469 (lines=7) @@
460
     * @return \BambooHR\API\BambooHTTPResponse
461
     * @link http://www.bamboohr.com/api/documentation/tables.php#getTable
462
     */
463
    function getTable($employeeId, $tableName) {
464
        if($employeeId!="all") $employeeId=intval($employeeId);
465
        $request=new BambooHTTPRequest();
466
        $request->method="GET";
467
        $request->url=$this->baseUrl."/v1/employees/".$employeeId."/tables/".urlencode($tableName)."/";
468
        return $this->httpHandler->sendRequest( $request );
469
    }
470
471
    /**
472
     * 
@@ 989-997 (lines=9) @@
986
     * @param array array(["width" => 100], ["height" => 100])
987
     * @return \BambooHR\API\BambooHTTPResponse
988
     */
989
    function downloadEmployeePhoto($employeeId, $size, $params=array()) {
990
        $request=new BambooHTTPRequest();
991
        $request->method="GET";
992
        $request->url=$this->baseUrl."/v1/employees/".intval($employeeId)."/photo/".urlencode($size);
993
        if(count($params)>0) {
994
            $request->url.="?".http_build_query($params);
995
        }
996
        return $this->httpHandler->sendRequest( $request );
997
    }
998
999
    /**
1000
     *