Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CacheWarmer/EntrypointCacheWarmer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(array $cacheKeys, string $phpArrayFile, CacheItemPoo
/**
* {@inheritdoc}
*/
protected function doWarmUp($cacheDir, ArrayAdapter $arrayAdapter)
protected function doWarmUp($cacheDir, ArrayAdapter $arrayAdapter): bool
{
foreach ($this->cacheKeys as $cacheKey => $path) {
// If the file does not exist then just skip past this entry point.
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

final class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('webpack_encore');
/** @var ArrayNodeDefinition $rootNode */
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/WebpackEncoreExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class WebpackEncoreExtension extends Extension
{
private const ENTRYPOINTS_FILE_NAME = 'entrypoints.json';

public function load(array $configs, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container): void
{
$loader = new XmlFileLoader($container, new FileLocator(\dirname(__DIR__).'/Resources/config'));
$loader->load('services.xml');
Expand Down
2 changes: 1 addition & 1 deletion src/EventListener/ExceptionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(EntrypointLookupCollection $entrypointLookupCollecti
$this->buildNames = $buildNames;
}

public function onKernelException()
public function onKernelException(): void
{
foreach ($this->buildNames as $buildName) {
$this->entrypointLookupCollection->getEntrypointLookup($buildName)->reset();
Expand Down
12 changes: 6 additions & 6 deletions src/EventListener/PreLoadAssetsEventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ public function __construct(TagRenderer $tagRenderer)
$this->tagRenderer = $tagRenderer;
}

/**
* @param ResponseEvent $event
*/
public function onKernelResponse($event)
public function onKernelResponse(ResponseEvent $event): void
{
if (!$event->isMasterRequest()) {
// Handle deprecated `KernelEvent::isMasterRequest() - Can be removed when Symfony < 5.3 support is dropped.
$mainRequestMethod = method_exists($event, 'isMainRequest') ? 'isMainRequest' : 'isMasterRequest';

if (!$event->$mainRequestMethod()) {
return;
}

Expand Down Expand Up @@ -76,7 +76,7 @@ class_exists(GenericLinkProvider::class) ? new GenericLinkProvider() : new FigGe
$request->attributes->set('_links', $linkProvider);
}

public static function getSubscribedEvents()
public static function getSubscribedEvents(): array
{
return [
// must run before AddLinkHeaderListener
Expand Down