Code Duplication    Length = 7-8 lines in 2 locations

src/Client.php 2 locations

@@ 92-98 (lines=7) @@
89
     * @throws AuthenticationException
90
     * @throws RequestException
91
     */
92
    public function getRecord($objectType, $sfId, array $fields)
93
    {
94
        $url      = $this->baseUrl . "/services/data/v{$this->version}/sobjects/{$objectType}/{$sfId}?fields=" . implode(',', $fields);
95
        $response = $this->makeRequest('get', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
96
97
        return json_decode($response->getBody(), true);
98
    }
99
100
    /**
101
     * Execute an SOQL query and return the result set
@@ 142-149 (lines=8) @@
139
     * @throws AuthenticationException
140
     * @throws RequestException
141
     */
142
    public function describe($objectName)
143
    {
144
        $url = $this->baseUrl . "/services/data/v{$this->version}/sobjects/{$objectName}/describe/";
145
        $response = $this->makeRequest('get', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
146
        $data     = json_decode($response->getBody(), true);
147
148
        return $data;
149
    }
150
151
    /**
152
     * Make an update request