where('id', $scope) ->get(); if (count($result) === 0) { return null; } return (new ScopeEntity($this->server)) ->setId($result[0]['id']) ->setDescription($result[0]['description']); } }