Code Duplication    Length = 3-3 lines in 2 locations

Core/Executor/RepositoryExecutor.php 2 locations

@@ 303-305 (lines=3) @@
300
            $minOneRef = count($referencesDefinition) > 0;
301
            $maxOneRef = count($referencesDefinition) > 0 && ! $this->areReferencesMultivalued($referencesDefinition);
302
303
            if ($maxOneRef && count($entity) > 1) {
304
                throw new \InvalidArgumentException($this->getSelfName() . ' does not support setting references for multiple ' . $this->getCollectionName($entity) . 's');
305
            }
306
            if ($minOneRef && count($entity) == 0) {
307
                throw new \InvalidArgumentException($this->getSelfName() . ' does not support setting references for no ' . $this->getCollectionName($entity) . 's');
308
            }
@@ 306-308 (lines=3) @@
303
            if ($maxOneRef && count($entity) > 1) {
304
                throw new \InvalidArgumentException($this->getSelfName() . ' does not support setting references for multiple ' . $this->getCollectionName($entity) . 's');
305
            }
306
            if ($minOneRef && count($entity) == 0) {
307
                throw new \InvalidArgumentException($this->getSelfName() . ' does not support setting references for no ' . $this->getCollectionName($entity) . 's');
308
            }
309
        }
310
    }
311