private function keyEntityArray(array $entities) : array
    {
        $keyedArray = [];

        foreach ($entities as $entity) {
            $keyedArray[$this->idAccessorRegistry->getEntityId($entity)] = $entity;
        }

        return $keyedArray;
    }
private function keyEntityArray(array $entities) : array
    {
        $keyedArray = [];

        foreach ($entities as $entity) {
            $keyedArray[$this->idAccessorRegistry->getEntityId($entity)] = $entity;
        }

        return $keyedArray;
    }
private function keyEntityArray ( array $ entities ) : array { $ keyedArray = [ ] ; foreach ( $ entities as $ entity ) { $ keyedArray [ $ this -> idAccessorRegistry -> getEntityId ( $ entity ) ] = $ entity ; } return $ keyedArray ; }
Converts a list of entities to a keyed array of those entities
The keys are the entity Ids

@param object[] $entities The list of entities
@return object[] The keyed array
Converts a list of entities to a keyed array of those entities The keys are the entity Ids