original_string: public function isNameAvailable( $name, $fields = array() )
      {
          $fields = (object) $fields;
  
          return ! $this->getMapper()
                        ->isNameExists(
                              $name .
                              ( empty( $fields->type ) ? '' : '.' . $fields->type )
                          );
      }
code: public function isNameAvailable( $name, $fields = array() )
      {
          $fields = (object) $fields;
  
          return ! $this->getMapper()
                        ->isNameExists(
                              $name .
                              ( empty( $fields->type ) ? '' : '.' . $fields->type )
                          );
      }
code_tokens: public function isNameAvailable ( $ name , $ fields = array ( ) ) { $ fields = ( object ) $ fields ; return ! $ this -> getMapper ( ) -> isNameExists ( $ name . ( empty ( $ fields -> type ) ? '' : '.' . $ fields -> type ) ) ; }
docstring: Find a structure is available
  
  @param   string          $name
  @param   array|object    $fields [optional]
  @return  bool
docstring_tokens: Find a structure is available