original_string: protected function _scope($query)
      {
          $scope = $this->getConfig('scope');
  
          if (is_array($scope)) {
              return $query->where($scope);
          }
          if (is_callable($scope)) {
              return $scope($query);
          }
  
          return $query;
      }
code: protected function _scope($query)
      {
          $scope = $this->getConfig('scope');
  
          if (is_array($scope)) {
              return $query->where($scope);
          }
          if (is_callable($scope)) {
              return $scope($query);
          }
  
          return $query;
      }
code_tokens: protected function _scope ( $ query ) { $ scope = $ this -> getConfig ( 'scope' ) ; if ( is_array ( $ scope ) ) { return $ query -> where ( $ scope ) ; } if ( is_callable ( $ scope ) ) { return $ scope ( $ query ) ; } return $ query ; }
docstring: Alters the passed query so that it only returns scoped records as defined
  in the tree configuration.
  
  @param \Cake\ORM\Query $query the Query to modify
  @return \Cake\ORM\Query
docstring_tokens: Alters the passed query so that it only returns scoped records as defined in the tree configuration .