Code Duplication    Length = 8-8 lines in 2 locations

src/query/Entity.php 2 locations

@@ 377-384 (lines=8) @@
374
        if (count($entityIDs = $this->findEntityIDs())) {
375
            $additionalFields = $this->findAdditionalFields($entityIDs);
376
377
            if (count($this->searchFilter)) {
378
                $entityIDs = $this->applySearch($entityIDs);
379
380
                // Return result if not ids
381
                if (count($entityIDs) === 0) {
382
                    return $return;
383
                }
384
            }
385
386
387
@@ 474-481 (lines=8) @@
471
        $return = 0;
472
        if (count($entityIDs = $this->findEntityIDs())) {
473
474
            if (count($this->searchFilter)) {
475
                $entityIDs = $this->applySearch($entityIDs);
476
477
                // Return result if not ids
478
                if (count($entityIDs) === 0) {
479
                    return 0;
480
                }
481
            }
482
483
            $this->primary($entityIDs);
484
            $return = parent::count();