Skip to content

Commit

Permalink
apply fixes (I told you so!)
Browse files Browse the repository at this point in the history
  • Loading branch information
garak committed Jan 27, 2025
1 parent ab57314 commit e5689a0
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/DependencyInjection/Compiler/AddExtensionsPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* @author Christophe Coevoet <[email protected]>
*
* @internal
* @final
*/
final class AddExtensionsPass implements CompilerPassInterface
{
Expand Down
1 change: 0 additions & 1 deletion src/DependencyInjection/Compiler/AddProvidersPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* @author Christophe Coevoet <[email protected]>
*
* @internal
* @final
*/
final class AddProvidersPass implements CompilerPassInterface
{
Expand Down
1 change: 0 additions & 1 deletion src/DependencyInjection/Compiler/AddRenderersPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* @author Christophe Coevoet <[email protected]>
*
* @internal
* @final
*/
final class AddRenderersPass implements CompilerPassInterface
{
Expand Down
1 change: 0 additions & 1 deletion src/DependencyInjection/Compiler/AddVotersPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* @author Christophe Coevoet <[email protected]>
*
* @internal
* @final
*/
final class AddVotersPass implements CompilerPassInterface
{
Expand Down
1 change: 0 additions & 1 deletion src/DependencyInjection/Compiler/MenuBuilderPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* @author Christophe Coevoet <[email protected]>
*
* @internal
* @final
*/
final class MenuBuilderPass implements CompilerPassInterface
{
Expand Down
1 change: 0 additions & 1 deletion src/DependencyInjection/Compiler/RegisterMenusPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* @author Christophe Coevoet <[email protected]>
*
* @internal
* @final
*/
final class RegisterMenusPass implements CompilerPassInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/KnpMenuExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function load(array $configs, ContainerBuilder $container): void
$container->setParameter('knp_menu.renderer.twig.template', $config['twig']['template']);
}
if ($config['templating']) {
trigger_deprecation('knplabs/knp-menu-bundle', '3.3', 'Using the templating component is deprecated since version 3.3, this option will be removed in version 4.');
\trigger_deprecation('knplabs/knp-menu-bundle', '3.3', 'Using the templating component is deprecated since version 3.3, this option will be removed in version 4.');
$loader->load('templating.xml');
}

Expand Down
4 changes: 2 additions & 2 deletions src/Provider/BuilderAliasProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ final class BuilderAliasProvider implements MenuProviderInterface
private array $builders = [];

public function __construct(private KernelInterface $kernel, private ContainerInterface $container, private FactoryInterface $menuFactory)
{}
{
}

/**
* Looks for a menu with the bundle:class:method format.
Expand Down Expand Up @@ -79,7 +80,6 @@ private function getBuilder(string $bundleName, string $className): object
$name = \sprintf('%s:%s', $bundleName, $className);

if (!isset($this->builders[$name])) {

$bundle = $this->kernel->getBundle($bundleName);
$try = $bundle->getNamespace().'\\Menu\\'.$className;

Expand Down
11 changes: 6 additions & 5 deletions src/Templating/Helper/MenuHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
class MenuHelper extends TemplatingHelper
{
public function __construct(private Helper $helper, private MatcherInterface $matcher, private MenuManipulator $menuManipulator)
{}
{
}

/**
* Retrieves an item following a path in the tree.
*
* @param \Knp\Menu\ItemInterface|string $menu
* @param ItemInterface|string $menu
*
* @return \Knp\Menu\ItemInterface
* @return ItemInterface
*/
public function get($menu, array $path = [], array $options = [])
{
Expand All @@ -28,8 +29,8 @@ public function get($menu, array $path = [], array $options = [])
/**
* Renders a menu with the specified renderer.
*
* @param \Knp\Menu\ItemInterface|string|array $menu
* @param string $renderer
* @param ItemInterface|string|array $menu
* @param string $renderer
*
* @return string
*/
Expand Down

0 comments on commit e5689a0

Please sign in to comment.