original_string: public function getByProperty($prop)
      {
          foreach ($this->_items as $assoc) {
              if ($assoc->getProperty() === $prop) {
                  return $assoc;
              }
          }
  
          return null;
      }
code: public function getByProperty($prop)
      {
          foreach ($this->_items as $assoc) {
              if ($assoc->getProperty() === $prop) {
                  return $assoc;
              }
          }
  
          return null;
      }
code_tokens: public function getByProperty ( $ prop ) { foreach ( $ this -> _items as $ assoc ) { if ( $ assoc -> getProperty ( ) === $ prop ) { return $ assoc ; } } return null ; }
docstring: Fetch an association by property name.
  
  @param string $prop The property to find an association by.
  @return \Cake\ORM\Association|null Either the association or null.
docstring_tokens: Fetch an association by property name .