File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1313
1414use Doctrine \Persistence \ManagerRegistry ;
1515use FOS \ElasticaBundle \Provider \PagerfantaPager ;
16+ use FOS \ElasticaBundle \Provider \PagerInterface ;
1617use FOS \ElasticaBundle \Provider \PagerProviderInterface ;
1718use Pagerfanta \Adapter \DoctrineODMMongoDBAdapter ;
1819use Pagerfanta \Pagerfanta ;
@@ -53,7 +54,7 @@ public function __construct(ManagerRegistry $doctrine, RegisterListenersService
5354 /**
5455 * {@inheritdoc}
5556 */
56- public function provide (array $ options = [])
57+ public function provide (array $ options = []): PagerInterface
5758 {
5859 $ options = array_replace ($ this ->baseOptions , $ options );
5960
Original file line number Diff line number Diff line change 1515use Doctrine \ORM \QueryBuilder ;
1616use Doctrine \Persistence \ManagerRegistry ;
1717use FOS \ElasticaBundle \Provider \PagerfantaPager ;
18+ use FOS \ElasticaBundle \Provider \PagerInterface ;
1819use FOS \ElasticaBundle \Provider \PagerProviderInterface ;
1920use Pagerfanta \Adapter \DoctrineORMAdapter ;
2021use Pagerfanta \Pagerfanta ;
@@ -57,7 +58,7 @@ public function __construct(ManagerRegistry $doctrine, RegisterListenersService
5758 /**
5859 * {@inheritdoc}
5960 */
60- public function provide (array $ options = [])
61+ public function provide (array $ options = []): PagerInterface
6162 {
6263 $ options = array_replace ($ this ->baseOptions , $ options );
6364
Original file line number Diff line number Diff line change 1313
1414use Doctrine \Persistence \ManagerRegistry ;
1515use FOS \ElasticaBundle \Provider \PagerfantaPager ;
16+ use FOS \ElasticaBundle \Provider \PagerInterface ;
1617use FOS \ElasticaBundle \Provider \PagerProviderInterface ;
1718use Pagerfanta \Adapter \DoctrineODMPhpcrAdapter ;
1819use Pagerfanta \Pagerfanta ;
@@ -55,7 +56,7 @@ public function __construct(ManagerRegistry $doctrine, RegisterListenersService
5556 /**
5657 * {@inheritdoc}
5758 */
58- public function provide (array $ options = [])
59+ public function provide (array $ options = []): PagerInterface
5960 {
6061 $ options = array_replace ($ this ->baseOptions , $ options );
6162
Original file line number Diff line number Diff line change 1313
1414interface PagerProviderInterface
1515{
16- /**
17- * @return PagerInterface
18- */
19- public function provide (array $ options = []);
16+ public function provide (array $ options = []): PagerInterface ;
2017}
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public function getProviders()
4545 *
4646 * @throws \InvalidArgumentException if no provider was registered for the index and type
4747 */
48- public function getProvider (string $ index ): ? PagerProviderInterface
48+ public function getProvider (string $ index ): PagerProviderInterface
4949 {
5050 if (!$ this ->providers ->has ($ index )) {
5151 throw new \InvalidArgumentException (sprintf ('No provider was registered for index "%s". ' , $ index ));
You can’t perform that action at this time.
0 commit comments