original_string: protected function modelHasTrait($names)
      {
          if ( ! is_array($names)) {
              $names = (array) $names;
          }
  
          return (bool) count(array_intersect($names, $this->getTraitNames()));
      }
code: protected function modelHasTrait($names)
      {
          if ( ! is_array($names)) {
              $names = (array) $names;
          }
  
          return (bool) count(array_intersect($names, $this->getTraitNames()));
      }
code_tokens: protected function modelHasTrait ( $ names ) { if ( ! is_array ( $ names ) ) { $ names = ( array ) $ names ; } return ( bool ) count ( array_intersect ( $ names , $ this -> getTraitNames ( ) ) ) ; }
docstring: Returns whether the model class uses a trait by a name or list of names.
  
  @param string|string[] $names
  @return bool
docstring_tokens: Returns whether the model class uses a trait by a name or list of names .