original_string: public function find( $primaryKeys )
      {
          if ( is_array( $primaryKeys ) )
          {
              $primaryKeys = reset( $primaryKeys );
          }
  
          $rootId = ( (int) $primaryKeys ) ?: null;
  
          return $this->createStructure( array(
              'rootId'    => $rootId,
              'extra'     => $this->getExtraMapper()
                                  ->findByRoot( $rootId ),
              'rules'     => $this->getRuleMapper()
                                  ->findAllByRoot(
                                      $rootId,
                                      $this->getRuleOrder()
                                  ),
          ) );
      }
code: public function find( $primaryKeys )
      {
          if ( is_array( $primaryKeys ) )
          {
              $primaryKeys = reset( $primaryKeys );
          }
  
          $rootId = ( (int) $primaryKeys ) ?: null;
  
          return $this->createStructure( array(
              'rootId'    => $rootId,
              'extra'     => $this->getExtraMapper()
                                  ->findByRoot( $rootId ),
              'rules'     => $this->getRuleMapper()
                                  ->findAllByRoot(
                                      $rootId,
                                      $this->getRuleOrder()
                                  ),
          ) );
      }
code_tokens: public function find ( $ primaryKeys ) { if ( is_array ( $ primaryKeys ) ) { $ primaryKeys = reset ( $ primaryKeys ) ; } $ rootId = ( ( int ) $ primaryKeys ) ? : null ; return $ this -> createStructure ( array ( 'rootId' => $ rootId , 'extra' => $ this -> getExtraMapper ( ) -> findByRoot ( $ rootId ) , 'rules' => $ this -> getRuleMapper ( ) -> findAllByRoot ( $ rootId , $ this -> getRuleOrder ( ) ) , ) ) ; }
docstring: Find a structure by root paragraph id
  
  @param   int|array   $primaryKeys
  @return  Structure
docstring_tokens: Find a structure by root paragraph id