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

Commit72d3722

Browse files
committed
CS Fixes: lowercase null constants
1 parentc4a8041 commit72d3722

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

‎src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,11 @@ private function exportParameters($parameters, $path = '', $indent = 12)
10721072
thrownewInvalidArgumentException(sprintf('You cannot dump a container with parameters that contain expressions. Expression "%s" found in "%s".',$value,$path.'/'.$key));
10731073
}else {
10741074
$value =$this->export($value);
1075+
1076+
// If exported value is `null` then standardize it: `true` and `false` are exported in lower-case, so let do the same with `null`.
1077+
if ('NULL' ===$value) {
1078+
$value ='null';
1079+
}
10751080
}
10761081

10771082
$php[] =sprintf('%s%s => %s,',str_repeat('',$indent),var_export($key,true),$value);

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct()
3131
'values' =>array(
3232
0 =>true,
3333
1 =>false,
34-
2 =>NULL,
34+
2 =>null,
3535
3 =>0,
3636
4 =>1000.3,
3737
5 =>'true',

‎src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ protected function getMethodCall1Service()
268268
$this->services['method_call1'] =$instance =new \Bar\FooClass();
269269

270270
$instance->setBar($this->get('foo'));
271-
$instance->setBar(NULL);
272-
$instance->setBar(($this->get("foo")->foo() .(($this->hasparameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
271+
$instance->setBar(null);
272+
$instance->setBar(($this->get("foo")->foo().(($this->hasparameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
273273

274274
return$instance;
275275
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp