public function addDefaultScope(IScope $scope)
    {
        if (!$this->defaultScopes->contains($scope)) {
            $this->defaultScopes->attach($scope);
        } else {
            throw new \InvalidArgumentException("Scope '{$scope->getId()}' is already registered as default scope.");
        }
    }
public function addDefaultScope(IScope $scope)
    {
        if (!$this->defaultScopes->contains($scope)) {
            $this->defaultScopes->attach($scope);
        } else {
            throw new \InvalidArgumentException("Scope '{$scope->getId()}' is already registered as default scope.");
        }
    }
public function addDefaultScope ( IScope $ scope ) { if ( ! $ this -> defaultScopes -> contains ( $ scope ) ) { $ this -> defaultScopes -> attach ( $ scope ) ; } else { throw new \ InvalidArgumentException ( "Scope '{$scope->getId()}' is already registered as default scope." ) ; } }
Adds scope to default scopes

@param IScope $scope
Adds scope to default scopes