Code Duplication    Length = 5-5 lines in 2 locations

src/WSClient.php 2 locations

@@ 357-361 (lines=5) @@
354
     */
355
    public function invokeOperation($operation, array $params = null, $method = 'POST')
356
    {
357
        if (!empty($params) || !is_array($params) || !$this->isAssocArray($params)) {
358
            $errorMessage = "You have to specified a list of operation parameters, but apparently it's not an associative array ('prop' => value), you must fix it!";
359
            $this->lastErrorMessage = new WSClientError($errorMessage);
360
            return false;
361
        }
362
363
        // Perform re-login if required
364
        $this->checkLogin();
@@ 566-570 (lines=5) @@
563
     */
564
    public function entitiesRetrieve($moduleName, array $params, array $select = [], $limit = 0)
565
    {
566
        if (empty($params) || !is_array($params) || !$this->isAssocArray($params)) {
567
            $errorMessage = "You have to specify at least one search parameter (prop => value) in order to filter entities";
568
            $this->lastErrorMessage = new WSClientError($errorMessage);
569
            return false;
570
        }
571
572
        // Perform re-login if required.
573
        $this->checkLogin();