Skip to content

Commit 216b022

Browse files
committed
Fix CS
1 parent 1593ad5 commit 216b022

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

src/Storage/StorageFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public static function factory($config): StorageInterface
4141
}
4242

4343
throw new \InvalidArgumentException(sprintf('File with extension %s is not supported', $extension));
44+
// no break
4445
default:
4546
throw new \InvalidArgumentException(sprintf('The 1st argument for %s expects an array, string or instance of StorageInterface, %s given', __METHOD__, is_object($config) ? get_class($config) : gettype($config)));
4647
}

tests/ToggleTest.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,18 @@ public function testIsActiveExpression(): void
115115
public function testIsActiveStringClass(): void
116116
{
117117
$features = [
118-
'foo' => new class { public function __toString() { return '1'; }},
119-
'bar' => new class { public function __toString() { return '0'; }},
118+
'foo' => new class() {
119+
public function __toString()
120+
{
121+
return '1';
122+
}
123+
},
124+
'bar' => new class() {
125+
public function __toString()
126+
{
127+
return '0';
128+
}
129+
},
120130
];
121131

122132
$instance = new Toggle(StorageFactory::factory($features));

tests/UtilTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
namespace SolidWorx\Toggler\Tests;
1515

1616
use PHPUnit\Framework\TestCase;
17-
use SolidWorx\Toggler\Storage\StorageFactory;
18-
use SolidWorx\Toggler\Toggle;
1917
use SolidWorx\Toggler\Util;
20-
use Symfony\Component\ExpressionLanguage\Expression;
2118

2219
class UtilTest extends TestCase
2320
{
@@ -62,7 +59,7 @@ public function isNotTruthyProvider(): iterable
6259
yield ['NO'];
6360
yield ['N'];
6461
yield [null];
65-
yield [new \stdClass];
62+
yield [new \stdClass()];
6663
yield [[]];
6764
}
6865
}

0 commit comments

Comments
 (0)