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;
    }
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;
    }
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 ; }
Normalizes an array with scope data.

@param array  $scopes
@param string $parentKey
@return array
Normalizes an array with scope data .