Code Duplication    Length = 7-10 lines in 2 locations

src/Queries/OldCoreQuery.php 1 location

@@ 43-49 (lines=7) @@
40
    public function fetchUsing($methodAndParams)
41
    {
42
        // simple case
43
        if (is_string($methodAndParams) || empty($methodAndParams['method'])) {
44
            $this->fetchUsing = in_array($methodAndParams, ['GetNext', 'getNext'])
45
                ? ['method' => 'GetNext', 'params' => [true, true]]
46
                : ['method' => 'Fetch'];
47
48
            return $this;
49
        }
50
51
        // complex case
52
        if (in_array($methodAndParams['method'], ['GetNext', 'getNext'])) {

src/Queries/ElementQuery.php 1 location

@@ 378-387 (lines=10) @@
375
    public function fetchUsing($methodAndParams)
376
    {
377
        // simple case
378
        if (is_string($methodAndParams) || empty($methodAndParams['method'])) {
379
            if (in_array($methodAndParams, ['GetNextElement', 'getNextElement'])) {
380
                $this->fetchUsing = ['method' => 'GetNextElement', 'params' => [true, true]];
381
                $this->select(['FIELDS', 'PROPERTY_*']);
382
            } else {
383
                parent::fetchUsing($methodAndParams);
384
            }
385
            
386
            return $this;
387
        }
388
        
389
        // complex case
390
        if (in_array($methodAndParams['method'], ['GetNextElement', 'getNextElement'])) {