Skip to content

Commit

Permalink
Use Override everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
apfelbox committed Oct 23, 2024
1 parent f115bf9 commit a0483c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/Bundle/BundleExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ public function __construct (
}

/**
* @inheritDoc
*
*/
#[\Override]
public function load (array $configs, ContainerBuilder $container) : void
{
$configDir = "{$this->bundle->getPath()}/config";
Expand All @@ -43,8 +44,9 @@ public function load (array $configs, ContainerBuilder $container) : void
}

/**
* @inheritDoc
*
*/
#[\Override]
public function getAlias () : string
{
if (null !== $this->alias)
Expand All @@ -54,7 +56,7 @@ public function getAlias () : string

$className = \get_class($this->bundle);

if ('Bundle' !== substr($className, -6))
if (!str_ends_with($className, 'Bundle'))
{
throw new BundleHelpersException(sprintf(
"The bundle does not follow the naming convention; you must pass an explicit alias. Its name should end on 'Bundle', but it is '%s'.",
Expand Down
3 changes: 2 additions & 1 deletion src/Bundle/ConfigurableBundleExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ public function __construct (
}

/**
* @inheritDoc
*
*/
#[\Override]
public function load (array $configs, ContainerBuilder $container) : void
{
parent::load($configs, $container);
Expand Down

0 comments on commit a0483c1

Please sign in to comment.