original_string: public function hasDirectPermission($permission)
      {
          $name = $permission instanceof Permission ? $permission->name : $permission;
          return (bool) $this->permissions->where('name', $name)->count();
      }
code: public function hasDirectPermission($permission)
      {
          $name = $permission instanceof Permission ? $permission->name : $permission;
          return (bool) $this->permissions->where('name', $name)->count();
      }
code_tokens: public function hasDirectPermission ( $ permission ) { $ name = $ permission instanceof Permission ? $ permission -> name : $ permission ; return ( bool ) $ this -> permissions -> where ( 'name' , $ name ) -> count ( ) ; }
docstring: Has direct permission
  
  @param Permission|string $permission
  @return boolean
docstring_tokens: Has direct permission