Code Duplication    Length = 6-6 lines in 2 locations

src/WSClient.php 1 location

@@ 103-108 (lines=6) @@
100
     */
101
    public function invokeOperation($operation, array $params = null, $method = 'POST')
102
    {
103
        if (empty($params) || !is_array($params) || !is_assoc_array($params)) {
104
            throw new WSException(
105
                "You have to specified a list of operation parameters, 
106
                but apparently it's not an associative array ('prop' => value), you must fix it!"
107
            );
108
        }
109
110
        $params['operation'] = $operation;
111
        return $this->session->sendHttpRequest($params, $method);

src/Entities.php 1 location

@@ 252-257 (lines=6) @@
249
     */
250
    private static function checkParams(array $params, $paramsPurpose)
251
    {
252
        if (empty($params) || !is_array($params) || !is_assoc_array($params)) {
253
            throw new WSException(sprintf(
254
                "You have to specify at least one search parameter (prop => value) in order to %s",
255
                $paramsPurpose
256
            ));
257
        }
258
        return true;
259
    }
260