Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit45878bd

Browse files
committed
Minor tweaks
1 parent855f82d commit45878bd

File tree

4 files changed

+27
-46
lines changed

4 files changed

+27
-46
lines changed

‎src/Symfony/Component/Config/Definition/Configurator/DefinitionConfigurator.php‎

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,12 @@
2121
*/
2222
class DefinitionConfigurator
2323
{
24-
privateTreeBuilder$treeBuilder;
25-
privateDefinitionFileLoader$loader;
26-
privatestring$path;
27-
privatestring$file;
28-
29-
publicfunction__construct(TreeBuilder$treeBuilder,DefinitionFileLoader$loader,string$path,string$file)
30-
{
31-
$this->treeBuilder =$treeBuilder;
32-
$this->loader =$loader;
33-
$this->path =$path;
34-
$this->file =$file;
24+
publicfunction__construct(
25+
privateTreeBuilder$treeBuilder,
26+
privateDefinitionFileLoader$loader,
27+
privatestring$path,
28+
privatestring$file
29+
) {
3530
}
3631

3732
finalpublicfunctionimport(string$resource,string$type =null,bool$ignoreErrors =false):void

‎src/Symfony/Component/Config/Definition/Loader/DefinitionFileLoader.php‎

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,19 @@
1818
useSymfony\Component\DependencyInjection\ContainerBuilder;
1919

2020
/**
21+
* DefinitionFileLoader loads config definitions from a PHP file.
22+
*
23+
* The PHP file is required.
24+
*
2125
* @author Yonel Ceruto <yonelceruto@gmail.com>
2226
*/
2327
class DefinitionFileLoaderextends FileLoader
2428
{
25-
privateTreeBuilder$treeBuilder;
26-
private ?ContainerBuilder$container;
27-
28-
publicfunction__construct(TreeBuilder$treeBuilder,FileLocatorInterface$locator,ContainerBuilder$container =null)
29-
{
30-
$this->treeBuilder =$treeBuilder;
31-
$this->container =$container;
32-
29+
publicfunction__construct(
30+
privateTreeBuilder$treeBuilder,
31+
FileLocatorInterface$locator,
32+
private ?ContainerBuilder$container =null,
33+
) {
3334
parent::__construct($locator);
3435
}
3536

@@ -38,7 +39,7 @@ public function __construct(TreeBuilder $treeBuilder, FileLocatorInterface $loca
3839
*/
3940
publicfunctionload(mixed$resource,string$type =null):mixed
4041
{
41-
// the loader variableare exposed to the included file below
42+
// the loader variableis exposed to the included file below
4243
$loader =$this;
4344

4445
$path =$this->locator->locate($resource);
@@ -77,9 +78,7 @@ public function supports(mixed $resource, string $type = null): bool
7778

7879
privatefunctionexecuteCallback(callable$callback,DefinitionConfigurator$configurator,string$path):void
7980
{
80-
if (!$callbackinstanceof \Closure) {
81-
$callback = \Closure::fromCallable($callback);
82-
}
81+
$callback =$callback(...);
8382

8483
$arguments = [];
8584
$r =new \ReflectionFunction($callback);

‎src/Symfony/Component/HttpKernel/Bundle/BundleConfiguration.php‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,11 @@
2525
*/
2626
class BundleConfigurationimplements ConfigurationInterface
2727
{
28-
privateMicroBundle$bundle;
29-
privateContainerBuilder$container;
30-
privatestring$alias;
31-
32-
publicfunction__construct(MicroBundle$bundle,ContainerBuilder$container,string$alias)
33-
{
34-
$this->bundle =$bundle;
35-
$this->container =$container;
36-
$this->alias =$alias;
28+
publicfunction__construct(
29+
privateMicroBundle$bundle,
30+
privateContainerBuilder$container,
31+
privatestring$alias
32+
) {
3733
}
3834

3935
publicfunctiongetConfigTreeBuilder():TreeBuilder

‎src/Symfony/Component/HttpKernel/Bundle/BundleExtension.php‎

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
useSymfony\Component\Config\Loader\DelegatingLoader;
1818
useSymfony\Component\Config\Loader\LoaderResolver;
1919
useSymfony\Component\DependencyInjection\ContainerBuilder;
20-
useSymfony\Component\DependencyInjection\ContainerInterface;
2120
useSymfony\Component\DependencyInjection\Extension\Extension;
2221
useSymfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
2322
useSymfony\Component\DependencyInjection\Loader\ClosureLoader;
@@ -36,13 +35,10 @@
3635
*/
3736
class BundleExtensionextends Extensionimplements PrependExtensionInterface
3837
{
39-
privateMicroBundle$bundle;
40-
privatestring$alias;
41-
42-
publicfunction__construct(MicroBundle$bundle,string$alias)
43-
{
44-
$this->bundle =$bundle;
45-
$this->alias =$alias;
38+
publicfunction__construct(
39+
privateMicroBundle$bundle,
40+
privatestring$alias
41+
) {
4642
}
4743

4844
publicfunctiongetConfiguration(array$config,ContainerBuilder$container): ?ConfigurationInterface
@@ -55,11 +51,6 @@ public function getAlias(): string
5551
return$this->alias;
5652
}
5753

58-
publicfunctiongetXsdValidationBasePath():string|false
59-
{
60-
returnfalse;
61-
}
62-
6354
publicfunctionprepend(ContainerBuilder$container):void
6455
{
6556
$callback =function (ContainerConfigurator$configurator)use ($container) {
@@ -100,7 +91,7 @@ private function executeConfiguratorCallback(ContainerBuilder $container, \Closu
10091
}
10192
}
10293

103-
privatefunctioncreateContainerLoader(ContainerInterface$container,string$env):DelegatingLoader
94+
privatefunctioncreateContainerLoader(ContainerBuilder$container,string$env):DelegatingLoader
10495
{
10596
$buildDir =$container->getParameter('kernel.build_dir');
10697
$locator =newFileLocator();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp