original_string: protected function getScopeCounts()
      {
          if ( ! $this->areScopesEnabled()) {
              return [];
          }
  
          $info = $this->getModelInformation();
  
          if ( ! $info->list->scopes || ! count($info->list->scopes)) {
              // @codeCoverageIgnoreStart
              return [];
              // @codeCoverageIgnoreEnd
          }
  
          $counts = [];
  
          $repository = $this->getModelRepository();
  
          foreach (array_keys($info->list->scopes) as $key) {
  
              $this->applyScope($repository, $key);
  
              $query = $this->getModelRepository()->query();
  
              $this->applyListParentToQuery($query);
  
              $counts[ $key ] = $query->count();
          }
  
          return $counts;
      }
code: protected function getScopeCounts()
      {
          if ( ! $this->areScopesEnabled()) {
              return [];
          }
  
          $info = $this->getModelInformation();
  
          if ( ! $info->list->scopes || ! count($info->list->scopes)) {
              // @codeCoverageIgnoreStart
              return [];
              // @codeCoverageIgnoreEnd
          }
  
          $counts = [];
  
          $repository = $this->getModelRepository();
  
          foreach (array_keys($info->list->scopes) as $key) {
  
              $this->applyScope($repository, $key);
  
              $query = $this->getModelRepository()->query();
  
              $this->applyListParentToQuery($query);
  
              $counts[ $key ] = $query->count();
          }
  
          return $counts;
      }
code_tokens: protected function getScopeCounts ( ) { if ( ! $ this -> areScopesEnabled ( ) ) { return [ ] ; } $ info = $ this -> getModelInformation ( ) ; if ( ! $ info -> list -> scopes || ! count ( $ info -> list -> scopes ) ) { // @codeCoverageIgnoreStart return [ ] ; // @codeCoverageIgnoreEnd } $ counts = [ ] ; $ repository = $ this -> getModelRepository ( ) ; foreach ( array_keys ( $ info -> list -> scopes ) as $ key ) { $ this -> applyScope ( $ repository , $ key ) ; $ query = $ this -> getModelRepository ( ) -> query ( ) ; $ this -> applyListParentToQuery ( $ query ) ; $ counts [ $ key ] = $ query -> count ( ) ; } return $ counts ; }
docstring: Returns total amount of matches for each available scope.
  
  @return int[]    assoc, keyed by scope key
docstring_tokens: Returns total amount of matches for each available scope .