commit e289be5390bddb29ba8fade5b2ff55a4fdc8f0da
parent ea2b25e22418a3b9495047526d77379edace095a
Author: Timo A. Hummel <felicitus@felicitus.org>
Date: Fri, 6 Nov 2015 23:53:32 +0100
Removed legacy exceptions
Diffstat:
3 files changed, 0 insertions(+), 39 deletions(-)
diff --git a/src/PartKeepr/AuthBundle/Services/UserPreferenceService.php b/src/PartKeepr/AuthBundle/Services/UserPreferenceService.php
@@ -6,7 +6,6 @@ use Doctrine\ORM\NoResultException;
use PartKeepr\AuthBundle\Entity\User;
use PartKeepr\AuthBundle\Entity\UserPreference;
use PartKeepr\AuthBundle\Exceptions\UserPreferenceNotFoundException;
-use PartKeepr\Util\Exceptions\EntityNotPersistantException;
class UserPreferenceService
{
@@ -28,8 +27,6 @@ class UserPreferenceService
* @param string $value The value to set
*
* @return UserPreference The user preference
- *
- * @throws EntityNotPersistantException Thrown if the entity is not persistant
*/
public function setPreference(User $user, $key, $value)
{
@@ -65,7 +62,6 @@ class UserPreferenceService
*
* @return string The preference string
* @throws \PartKeepr\AuthBundle\Exceptions\UserPreferenceNotFoundException Thrown if the preference key was not found
- * @throws EntityNotPersistantException Thrown if the entity is not persistant
*/
public function getPreferenceValue(User $user, $key)
{
@@ -80,7 +76,6 @@ class UserPreferenceService
* @param \PartKeepr\AuthBundle\Entity\User $user The user
*
* @return UserPreference[] An array of UserPreference objects
- * @throws EntityNotPersistantException Thrown if the user entity is not persistent
*/
public function getPreferences(User $user)
{
@@ -100,7 +95,6 @@ class UserPreferenceService
*
* @return UserPreference The preference object
* @throws \PartKeepr\AuthBundle\Exceptions\UserPreferenceNotFoundException Thrown if the preference key was not found
- * @throws EntityNotPersistantException Thrown if the entity is not persistant
*/
public function getPreference(User $user, $key)
{
@@ -125,8 +119,6 @@ class UserPreferenceService
*
* @param \PartKeepr\AuthBundle\Entity\User $user The user to delete the preference for
* @param string $key The key to delete
- *
- * @throws EntityNotPersistantException Thrown if the entity is not persistant
*/
public function deletePreference(User $user, $key)
{
diff --git a/src/backend/PartKeepr/Util/Exceptions/EntityNotFoundException.php b/src/backend/PartKeepr/Util/Exceptions/EntityNotFoundException.php
@@ -1,17 +0,0 @@
-<?php
-namespace PartKeepr\Util\Exceptions;
-
-use PartKeepr\Util\SerializableException,
- PartKeepr\PartKeepr;
-
-/**
- * Thrown when an entity via loadById() was not found.
- */
-class EntityNotFoundException extends SerializableException {
- public function __construct ($class, $id) {
- parent::__construct(
- sprintf(
- PartKeepr::i18n("The entity %s with the id %d could not be found"),
- $class, $id));
- }
-}
diff --git a/src/backend/PartKeepr/Util/Exceptions/EntityNotPersistantException.php b/src/backend/PartKeepr/Util/Exceptions/EntityNotPersistantException.php
@@ -1,14 +0,0 @@
-<?php
-namespace PartKeepr\Util\Exceptions;
-
-use PartKeepr\Util\SerializableException,
- PartKeepr\PartKeepr;
-
-/**
- * Thrown when an entity via loadById() was not found.
- */
-class EntityNotPersistantException extends SerializableException {
- public function __construct () {
- parent::__construct("The entity is not persistant.");
- }
-}