original_string: public function getRetrieveCritiera(EntityMetadata $metadata, $identifiers = null)
      {
          $criteria = [];
          if (true === $metadata->isChildEntity()) {
              $criteria[Persister::POLYMORPHIC_KEY] = $metadata->type;
          } elseif (true === $metadata->isPolymorphic() && false === $metadata->isAbstract()) {
              $criteria[Persister::POLYMORPHIC_KEY] = $metadata->type;
          }
  
          $identifiers = (array) $identifiers;
          if (empty($identifiers)) {
              return $criteria;
          }
          $criteria[Persister::IDENTIFIER_KEY] = (1 === count($identifiers)) ? reset($identifiers) : $identifiers;
          return $criteria;
      }
code: public function getRetrieveCritiera(EntityMetadata $metadata, $identifiers = null)
      {
          $criteria = [];
          if (true === $metadata->isChildEntity()) {
              $criteria[Persister::POLYMORPHIC_KEY] = $metadata->type;
          } elseif (true === $metadata->isPolymorphic() && false === $metadata->isAbstract()) {
              $criteria[Persister::POLYMORPHIC_KEY] = $metadata->type;
          }
  
          $identifiers = (array) $identifiers;
          if (empty($identifiers)) {
              return $criteria;
          }
          $criteria[Persister::IDENTIFIER_KEY] = (1 === count($identifiers)) ? reset($identifiers) : $identifiers;
          return $criteria;
      }
code_tokens: public function getRetrieveCritiera ( EntityMetadata $ metadata , $ identifiers = null ) { $ criteria = [ ] ; if ( true === $ metadata -> isChildEntity ( ) ) { $ criteria [ Persister :: POLYMORPHIC_KEY ] = $ metadata -> type ; } elseif ( true === $ metadata -> isPolymorphic ( ) && false === $ metadata -> isAbstract ( ) ) { $ criteria [ Persister :: POLYMORPHIC_KEY ] = $ metadata -> type ; } $ identifiers = ( array ) $ identifiers ; if ( empty ( $ identifiers ) ) { return $ criteria ; } $ criteria [ Persister :: IDENTIFIER_KEY ] = ( 1 === count ( $ identifiers ) ) ? reset ( $ identifiers ) : $ identifiers ; return $ criteria ; }
docstring: Gets standard database retrieval criteria for an entity and the provided identifiers.
  
  @param   EntityMetadata      $metadata       The entity to retrieve database records for.
  @param   string|array|null   $identifiers    The IDs to query.
  @return  array
docstring_tokens: Gets standard database retrieval criteria for an entity and the provided identifiers .