Code Duplication    Length = 7-7 lines in 2 locations

src/WSClient.php 2 locations

@@ 362-368 (lines=7) @@
359
     */
360
    public function invokeOperation($operation, array $params = null, $method = 'POST')
361
    {
362
        if (!empty($params) || !is_array($params) || !$this->isAssocArray($params)) {
363
            $this->lastErrorMessage = new WSClientError(
364
                "You have to specified a list of operation parameters, 
365
                but apparently it's not an associative array ('prop' => value), you must fix it!"
366
            );
367
            return false;
368
        }
369
370
        // Perform re-login if required
371
        $this->checkLogin();
@@ 681-687 (lines=7) @@
678
     */
679
    private function checkParams(array $params, $paramsPurpose)
680
    {
681
        if (empty($params) || !is_array($params) || !$this->isAssocArray($params)) {
682
            $this->lastErrorMessage = new WSClientError(sprintf(
683
                "You have to specify at least one search parameter (prop => value) in order to %s",
684
                $paramsPurpose
685
            ));
686
            return false;
687
        }
688
        return true;
689
    }
690