original_string: public function extractEntityIds(CollectionInterface $results)
      {
          $entityIds = [];
          $results->each(function ($entity) use (&$entityIds) {
              if ($entity instanceof EntityInterface) {
                  $entityIds[] = $this->getEntityId($entity);
              }
          });
  
          return $entityIds;
      }
code: public function extractEntityIds(CollectionInterface $results)
      {
          $entityIds = [];
          $results->each(function ($entity) use (&$entityIds) {
              if ($entity instanceof EntityInterface) {
                  $entityIds[] = $this->getEntityId($entity);
              }
          });
  
          return $entityIds;
      }
code_tokens: public function extractEntityIds ( CollectionInterface $ results ) { $ entityIds = [ ] ; $ results -> each ( function ( $ entity ) use ( & $ entityIds ) { if ( $ entity instanceof EntityInterface ) { $ entityIds [ ] = $ this -> getEntityId ( $ entity ) ; } } ) ; return $ entityIds ; }
docstring: Given a collection of entities gets the ID of all of them.
  
  This method iterates the given set and invokes `getEntityId()` for every
  entity in the set.
  
  @param \Cake\Collection\CollectionInterface $results Set of entities
  @return array List of entity ids suitable for EAV logic
docstring_tokens: Given a collection of entities gets the ID of all of them .