original_string: public function generateEntity($entity, array $data)
      {
          $handlers = $this->getHandlers();
  
          if (isset($handlers[$entity]['mapping']) && isset($handlers[$entity]['pattern'])) {
              $data += array('placeholders' => $handlers[$entity]['mapping']);
              return $this->generate($handlers[$entity]['pattern'], $data);
          }
  
          return null;
      }
code: public function generateEntity($entity, array $data)
      {
          $handlers = $this->getHandlers();
  
          if (isset($handlers[$entity]['mapping']) && isset($handlers[$entity]['pattern'])) {
              $data += array('placeholders' => $handlers[$entity]['mapping']);
              return $this->generate($handlers[$entity]['pattern'], $data);
          }
  
          return null;
      }
code_tokens: public function generateEntity ( $ entity , array $ data ) { $ handlers = $ this -> getHandlers ( ) ; if ( isset ( $ handlers [ $ entity ] [ 'mapping' ] ) && isset ( $ handlers [ $ entity ] [ 'pattern' ] ) ) { $ data += array ( 'placeholders' => $ handlers [ $ entity ] [ 'mapping' ] ) ; return $ this -> generate ( $ handlers [ $ entity ] [ 'pattern' ] , $ data ) ; } return null ; }
docstring: Generates an alias for an entity
  @param string $entity
  @param array $data
  @return string|null
docstring_tokens: Generates an alias for an entity