diff --git a/src/Server/Query/CreateFilter/AbstractCreateFilter.php b/src/Server/Query/CreateFilter/AbstractCreateFilter.php index 6d10cb7f..f1d511b7 100644 --- a/src/Server/Query/CreateFilter/AbstractCreateFilter.php +++ b/src/Server/Query/CreateFilter/AbstractCreateFilter.php @@ -13,12 +13,12 @@ abstract class AbstractCreateFilter implements ObjectManagerAwareInterface, QueryCreateFilterInterface { /** - * @param ResourceEvent $event + * @param ResourceEvent|null $event * @param string $entityClass * @param array $data * @return array */ - abstract public function filter(ResourceEvent $event, $entityClass, $data); + abstract public function filter(ResourceEvent $event = null, $entityClass, $data); /** * @var ObjectManager diff --git a/src/Server/Query/CreateFilter/DefaultCreateFilter.php b/src/Server/Query/CreateFilter/DefaultCreateFilter.php index aa46ce5b..f0118e9a 100644 --- a/src/Server/Query/CreateFilter/DefaultCreateFilter.php +++ b/src/Server/Query/CreateFilter/DefaultCreateFilter.php @@ -11,12 +11,12 @@ class DefaultCreateFilter extends AbstractCreateFilter { /** - * @param ResourceEvent $event + * @param ResourceEvent|null $event * @param string $entityClass * @param array $data * @return array */ - public function filter(ResourceEvent $event, $entityClass, $data) + public function filter(ResourceEvent $event = null, $entityClass, $data) { return $data; } diff --git a/src/Server/Query/CreateFilter/QueryCreateFilterInterface.php b/src/Server/Query/CreateFilter/QueryCreateFilterInterface.php index 1fab3b16..b6eadf54 100644 --- a/src/Server/Query/CreateFilter/QueryCreateFilterInterface.php +++ b/src/Server/Query/CreateFilter/QueryCreateFilterInterface.php @@ -12,10 +12,10 @@ interface QueryCreateFilterInterface extends ObjectManagerAwareInterface { /** - * @param ResourceEvent $event + * @param ResourceEvent|null $event * @param string $entityClass * @param array $data * @return array */ - public function filter(ResourceEvent $event, $entityClass, $data); + public function filter(ResourceEvent $event = null, $entityClass, $data); } diff --git a/src/Server/Query/Provider/AbstractQueryProvider.php b/src/Server/Query/Provider/AbstractQueryProvider.php index 1fffefa4..ac639a69 100644 --- a/src/Server/Query/Provider/AbstractQueryProvider.php +++ b/src/Server/Query/Provider/AbstractQueryProvider.php @@ -40,12 +40,12 @@ public function getObjectManager() } /** - * @param ResourceEvent $event + * @param ResourceEvent|null $event * @param string $entityClass * @param array $parameters * @return mixed This will return an ORM or ODM Query\Builder */ - abstract public function createQuery(ResourceEvent $event, $entityClass, $parameters); + abstract public function createQuery(ResourceEvent $event = null, $entityClass, $parameters); /** * @param $queryBuilder diff --git a/src/Server/Query/Provider/DefaultOdm.php b/src/Server/Query/Provider/DefaultOdm.php index cad999f4..553d8e35 100644 --- a/src/Server/Query/Provider/DefaultOdm.php +++ b/src/Server/Query/Provider/DefaultOdm.php @@ -14,7 +14,7 @@ class DefaultOdm extends AbstractQueryProvider /** * {@inheritDoc} */ - public function createQuery(ResourceEvent $event, $entityClass, $parameters) + public function createQuery(ResourceEvent $event = null, $entityClass, $parameters) { /** @var \Doctrine\Odm\MongoDB\Query\Builder $queryBuilder */ $queryBuilder = $this->getObjectManager()->createQueryBuilder(); diff --git a/src/Server/Query/Provider/DefaultOrm.php b/src/Server/Query/Provider/DefaultOrm.php index 2827a0b5..43459a88 100644 --- a/src/Server/Query/Provider/DefaultOrm.php +++ b/src/Server/Query/Provider/DefaultOrm.php @@ -11,12 +11,12 @@ class DefaultOrm extends AbstractQueryProvider { /** - * @param ResourceEvent $event + * @param ResourceEvent|null $event * @param string $entityClass * @param array $parameters * @return mixed This will return an ORM or ODM Query\Builder */ - public function createQuery(ResourceEvent $event, $entityClass, $parameters) + public function createQuery(ResourceEvent $event = null, $entityClass, $parameters) { $queryBuilder = $this->getObjectManager()->createQueryBuilder(); $queryBuilder diff --git a/src/Server/Query/Provider/QueryProviderInterface.php b/src/Server/Query/Provider/QueryProviderInterface.php index 373dc48e..3146264e 100644 --- a/src/Server/Query/Provider/QueryProviderInterface.php +++ b/src/Server/Query/Provider/QueryProviderInterface.php @@ -13,12 +13,12 @@ interface QueryProviderInterface extends ObjectManagerAwareInterface { /** - * @param ResourceEvent $event + * @param ResourceEvent|null $event * @param string $entityClass * @param array $parameters * @return mixed This will return an ORM or ODM Query\Builder */ - public function createQuery(ResourceEvent $event, $entityClass, $parameters); + public function createQuery(ResourceEvent $event = null, $entityClass, $parameters); /** * This function is not necessary for any but fetch-all queries