Skip to content

Commit b484e80

Browse files
committed
Php Inspections (EA Extended): UTs SCA
1 parent 3a047e1 commit b484e80

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

test/unit/command/sfCommandArgumentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
$t->diag('->setDefault()');
6464
$argument = new sfCommandArgument('foo', sfCommandArgument::OPTIONAL, '', 'default');
6565
$argument->setDefault(null);
66-
$t->ok(is_null($argument->getDefault()), '->setDefault() can reset the default value by passing null');
66+
$t->ok(null === $argument->getDefault(), '->setDefault() can reset the default value by passing null');
6767
$argument->setDefault('another');
6868
$t->is($argument->getDefault(), 'another', '->setDefault() changes the default value');
6969

test/unit/command/sfCommandOptionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
$t->is($option->getDefault(), 'default', '->getDefault() returns the default value');
8585

8686
$option = new sfCommandOption('foo', null, sfCommandOption::PARAMETER_REQUIRED);
87-
$t->ok(is_null($option->getDefault()), '->getDefault() returns null if no default value is configured');
87+
$t->ok(null === $option->getDefault(), '->getDefault() returns null if no default value is configured');
8888

8989
$option = new sfCommandOption('foo', null, sfCommandOption::IS_ARRAY);
9090
$t->is($option->getDefault(), array(), '->getDefault() returns an empty array if option is an array');
@@ -96,7 +96,7 @@
9696
$t->diag('->setDefault()');
9797
$option = new sfCommandOption('foo', null, sfCommandOption::PARAMETER_REQUIRED, '', 'default');
9898
$option->setDefault(null);
99-
$t->ok(is_null($option->getDefault()), '->setDefault() can reset the default value by passing null');
99+
$t->ok(null === $option->getDefault(), '->setDefault() can reset the default value by passing null');
100100
$option->setDefault('another');
101101
$t->is($option->getDefault(), 'another', '->setDefault() changes the default value');
102102

test/unit/request/sfWebRequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function resetPathInfoArray()
137137
// ->getRequestFormat() ->setRequestFormat()
138138
$t->diag('->getRequestFormat() ->setRequestFormat()');
139139

140-
$t->ok(is_null($request->getRequestFormat()), '->getRequestFormat() returns null if the format is not defined in the request');
140+
$t->ok(null === $request->getRequestFormat(), '->getRequestFormat() returns null if the format is not defined in the request');
141141
$request->setParameter('sf_format', 'js');
142142
$t->is($request->getRequestFormat(), 'js', '->getRequestFormat() returns the request format');
143143

0 commit comments

Comments
 (0)