thecodingmachine /
cms-middleware
| 1 | <?php |
||
| 2 | |||
| 3 | |||
| 4 | namespace TheCodingMachine\CMS\Middleware; |
||
| 5 | |||
| 6 | |||
| 7 | use Interop\Container\ServiceProvider; |
||
| 8 | use Interop\Container\ServiceProviderInterface; |
||
| 9 | use Psr\Container\ContainerInterface; |
||
| 10 | use TheCodingMachine\CMS\Block\BlockRendererInterface; |
||
| 11 | use TheCodingMachine\CMS\Page\PageRegistryInterface; |
||
| 12 | use TheCodingMachine\CMS\Theme\ThemeFactoryInterface; |
||
| 13 | use TheCodingMachine\MiddlewareListServiceProvider; |
||
| 14 | use TheCodingMachine\MiddlewareOrder; |
||
| 15 | |||
| 16 | class CMSMiddlewareServiceProvider implements ServiceProviderInterface |
||
| 17 | { |
||
| 18 | |||
| 19 | public function getFactories() |
||
| 20 | { |
||
| 21 | return [ |
||
| 22 | CMSMiddleware::class => [self::class, 'createCmsMiddleware'], |
||
| 23 | ]; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function getExtensions() |
||
| 27 | { |
||
| 28 | return [ |
||
| 29 | MiddlewareListServiceProvider::MIDDLEWARES_QUEUE => [self::class,'updatePriorityQueue'], |
||
| 30 | ]; |
||
| 31 | } |
||
| 32 | |||
| 33 | |||
| 34 | public static function createCmsMiddleware(ContainerInterface $container): CMSMiddleware |
||
| 35 | { |
||
| 36 | return new CMSMiddleware($container->get(PageRegistryInterface::class), $container->get(BlockRendererInterface::class)); |
||
| 37 | } |
||
| 38 | |||
| 39 | public static function updatePriorityQueue(ContainerInterface $container, \SplPriorityQueue $queue = null) : \SplPriorityQueue |
||
| 40 | { |
||
| 41 | $queue->insert($container->get(CMSMiddleware::class), MiddlewareOrder::ROUTER); |
||
|
0 ignored issues
–
show
|
|||
| 42 | return $queue; |
||
|
0 ignored issues
–
show
|
|||
| 43 | } |
||
| 44 | } |
||
| 45 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.