original_string: protected function normalizeScopeArray(array $scopes, $parentKey = 'list.scopes')
      {
          $scopes = $this->normalizeStandardArrayProperty(
              $scopes,
              'strategy',
              ModelScopeData::class,
              $parentKey
          );
  
          // Make sure that each scope entry has at least a method or a strategy
          foreach ($scopes as $key => &$value) {
              if ( ! $value['method'] && ! $value['strategy']) {
                  $value['method'] = $key;
              }
          }
  
          unset($value);
  
          return $scopes;
      }
code: protected function normalizeScopeArray(array $scopes, $parentKey = 'list.scopes')
      {
          $scopes = $this->normalizeStandardArrayProperty(
              $scopes,
              'strategy',
              ModelScopeData::class,
              $parentKey
          );
  
          // Make sure that each scope entry has at least a method or a strategy
          foreach ($scopes as $key => &$value) {
              if ( ! $value['method'] && ! $value['strategy']) {
                  $value['method'] = $key;
              }
          }
  
          unset($value);
  
          return $scopes;
      }
code_tokens: protected function normalizeScopeArray ( array $ scopes , $ parentKey = 'list.scopes' ) { $ scopes = $ this -> normalizeStandardArrayProperty ( $ scopes , 'strategy' , ModelScopeData :: class , $ parentKey ) ; // Make sure that each scope entry has at least a method or a strategy foreach ( $ scopes as $ key => & $ value ) { if ( ! $ value [ 'method' ] && ! $ value [ 'strategy' ] ) { $ value [ 'method' ] = $ key ; } } unset ( $ value ) ; return $ scopes ; }
docstring: Normalizes an array with scope data.
  
  @param array  $scopes
  @param string $parentKey
  @return array
docstring_tokens: Normalizes an array with scope data .