original_string: public function hasPermissionThroughRole($permission)
      {
          if (! $this->isMethodRolesExists()) {
              return false;
          }
  
          if (! $permission = $this->preparePermission($permission)) {
              return false;   
          }
  
          foreach ($permission->roles as $role) { 
              if ($this->roles->contains($role)) {
                  return true;
              }
          }
  
          return false;
      }
code: public function hasPermissionThroughRole($permission)
      {
          if (! $this->isMethodRolesExists()) {
              return false;
          }
  
          if (! $permission = $this->preparePermission($permission)) {
              return false;   
          }
  
          foreach ($permission->roles as $role) { 
              if ($this->roles->contains($role)) {
                  return true;
              }
          }
  
          return false;
      }
code_tokens: public function hasPermissionThroughRole ( $ permission ) { if ( ! $ this -> isMethodRolesExists ( ) ) { return false ; } if ( ! $ permission = $ this -> preparePermission ( $ permission ) ) { return false ; } foreach ( $ permission -> roles as $ role ) { if ( $ this -> roles -> contains ( $ role ) ) { return true ; } } return false ; }
docstring: Has permission through role
  
  @param Permission|string $permission
  @return boolean
docstring_tokens: Has permission through role