original_string: protected function findAssociation($name)
      {
          if (strpos($name, '.') === false) {
              return $this->_associations->get($name);
          }
  
          list($name, $next) = array_pad(explode('.', $name, 2), 2, null);
          $result = $this->_associations->get($name);
  
          if ($result !== null && $next !== null) {
              $result = $result->getTarget()->getAssociation($next);
          }
  
          return $result;
      }
code: protected function findAssociation($name)
      {
          if (strpos($name, '.') === false) {
              return $this->_associations->get($name);
          }
  
          list($name, $next) = array_pad(explode('.', $name, 2), 2, null);
          $result = $this->_associations->get($name);
  
          if ($result !== null && $next !== null) {
              $result = $result->getTarget()->getAssociation($next);
          }
  
          return $result;
      }
code_tokens: protected function findAssociation ( $ name ) { if ( strpos ( $ name , '.' ) === false ) { return $ this -> _associations -> get ( $ name ) ; } list ( $ name , $ next ) = array_pad ( explode ( '.' , $ name , 2 ) , 2 , null ) ; $ result = $ this -> _associations -> get ( $ name ) ; if ( $ result !== null && $ next !== null ) { $ result = $ result -> getTarget ( ) -> getAssociation ( $ next ) ; } return $ result ; }
docstring: Returns an association object configured for the specified alias if any.
  
  The name argument also supports dot syntax to access deeper associations.
  
  ```
  $users = $this->getAssociation('Articles.Comments.Users');
  ```
  
  @param string $name The alias used for the association.
  @return \Cake\ORM\Association|null Either the association or null.
docstring_tokens: Returns an association object configured for the specified alias if any .