Skip to content

Commit

Permalink
Fix: Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Dec 21, 2023
1 parent 36f0e50 commit b40dc36
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
4 changes: 0 additions & 4 deletions psalm-baseline.xml
Expand Up @@ -16,10 +16,6 @@
<MoreSpecificReturnType>
<code>iterable</code>
</MoreSpecificReturnType>
<PossiblyUnusedMethod>
<code>configureContainer</code>
<code>configureRoutes</code>
</PossiblyUnusedMethod>
<UnresolvableInclude>
<code><![CDATA[require $this->getProjectDir() . '/config/bundles.php']]></code>
</UnresolvableInclude>
Expand Down
28 changes: 0 additions & 28 deletions src/Kernel.php
Expand Up @@ -14,16 +14,11 @@
namespace App;

use Symfony\Bundle\FrameworkBundle;
use Symfony\Component\Config;
use Symfony\Component\DependencyInjection;
use Symfony\Component\HttpKernel;
use Symfony\Component\Routing;

final class Kernel extends HttpKernel\Kernel
{
use FrameworkBundle\Kernel\MicroKernelTrait;
private const CONFIG_EXTS = '.{php,xml,yaml,yml}';

public function registerBundles(): iterable
{
$contents = require $this->getProjectDir() . '/config/bundles.php';
Expand All @@ -39,27 +34,4 @@ public function getProjectDir(): string
{
return \dirname(__DIR__);
}

protected function configureContainer(DependencyInjection\ContainerBuilder $containerBuilder, Config\Loader\LoaderInterface $loader): void
{
$containerBuilder->addResource(new Config\Resource\FileResource($this->getProjectDir() . '/config/bundles.php'));
$containerBuilder->setParameter('container.dumper.inline_class_loader', $this->debug);
$containerBuilder->setParameter('container.dumper.inline_factories', true);

$confDir = $this->getProjectDir() . '/config';

$loader->load($confDir . '/{packages}/*' . self::CONFIG_EXTS, 'glob');
$loader->load($confDir . '/{packages}/' . $this->environment . '/*' . self::CONFIG_EXTS, 'glob');
$loader->load($confDir . '/{services}' . self::CONFIG_EXTS, 'glob');
$loader->load($confDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob');
}

protected function configureRoutes(Routing\Loader\Configurator\RoutingConfigurator $routingConfigurator): void
{
$confDir = $this->getProjectDir() . '/config';

$routingConfigurator->import($confDir . '/{routes}/' . $this->environment . '/*' . self::CONFIG_EXTS);
$routingConfigurator->import($confDir . '/{routes}/*' . self::CONFIG_EXTS);
$routingConfigurator->import($confDir . '/{routes}' . self::CONFIG_EXTS);
}
}

0 comments on commit b40dc36

Please sign in to comment.