Model/Validator/ScopeValidator.php
public function validate($scope, $scopeId)
    {
        $valid = true;
        if ($scope === 'default') { // Default Store only valid for id 0
            if ($scopeId !== 0) {
                $valid = false;
            }
        } elseif ($scope === 'websites') { // Check if website with id exists
            $valid = $this->isValidWebsiteId($scopeId);
        } elseif ($scope === 'stores') { // Check if store with id exists
            $valid = $this->isValidStoreId($scopeId);
        }

        return $valid;
    }
public function validate($scope, $scopeId)
    {
        $valid = true;
        if ($scope === 'default') { // Default Store only valid for id 0
            if ($scopeId !== 0) {
                $valid = false;
            }
        } elseif ($scope === 'websites') { // Check if website with id exists
            $valid = $this->isValidWebsiteId($scopeId);
        } elseif ($scope === 'stores') { // Check if store with id exists
            $valid = $this->isValidStoreId($scopeId);
        }

        return $valid;
    }
public function validate ( $ scope , $ scopeId ) { $ valid = true ; if ( $ scope === 'default' ) { // Default Store only valid for id 0 if ( $ scopeId !== 0 ) { $ valid = false ; } } elseif ( $ scope === 'websites' ) { // Check if website with id exists $ valid = $ this -> isValidWebsiteId ( $ scopeId ) ; } elseif ( $ scope === 'stores' ) { // Check if store with id exists $ valid = $ this -> isValidStoreId ( $ scopeId ) ; } return $ valid ; }
Validates the given scope and scope id

@param string $scope   Scope
@param int    $scopeId Scope ID
@return bool
Validates the given scope and scope id