@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Moka; |
| 5 | 5 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | { |
| 130 | 130 | $backtrace = debug_backtrace(); |
| 131 | 131 | foreach ($backtrace as $frame) { |
| 132 | - if (!isset($frame['object'])) { |
|
| 132 | + if ( ! isset($frame['object'])) { |
|
| 133 | 133 | continue; |
| 134 | 134 | } |
| 135 | 135 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | */ |
| 177 | 177 | private static function ensurePluginLoad(string $pluginName): void |
| 178 | 178 | { |
| 179 | - if (!array_key_exists($pluginName, self::$mockingStrategies)) { |
|
| 179 | + if ( ! array_key_exists($pluginName, self::$mockingStrategies)) { |
|
| 180 | 180 | self::$mockingStrategies[$pluginName] = loadPlugin($pluginName); |
| 181 | 181 | } |
| 182 | 182 | } |
@@ -11,7 +11,6 @@ |
||
| 11 | 11 | use Moka\Stub\MethodStub; |
| 12 | 12 | use Moka\Stub\PropertyStub; |
| 13 | 13 | use Moka\Stub\StubInterface; |
| 14 | -use Moka\Stub\StubSet; |
|
| 15 | 14 | |
| 16 | 15 | /** |
| 17 | 16 | * Class AbstractMockingStrategy |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Moka\Strategy; |
| 5 | 5 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | final protected static function checkDependencies(string $dependencyClassName, string $dependencyPackageName) |
| 34 | 34 | { |
| 35 | - if (!class_exists($dependencyClassName)) { |
|
| 35 | + if ( ! class_exists($dependencyClassName)) { |
|
| 36 | 36 | throw new MissingDependencyException( |
| 37 | 37 | sprintf( |
| 38 | 38 | 'Class "%s" does not exist, please install package "%s"', |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | { |
| 151 | 151 | $this->verifyMockType(); |
| 152 | 152 | |
| 153 | - if (!is_a($mock, $this->mockType)) { |
|
| 153 | + if ( ! is_a($mock, $this->mockType)) { |
|
| 154 | 154 | throw new InvalidArgumentException( |
| 155 | 155 | sprintf( |
| 156 | 156 | 'Mock object must be an instance of "%s", "%s" given', |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | */ |
| 169 | 169 | private function verifyMockType(): void |
| 170 | 170 | { |
| 171 | - if (!$this->mockType) { |
|
| 171 | + if ( ! $this->mockType) { |
|
| 172 | 172 | throw new NotImplementedException('Mock type was not defined'); |
| 173 | 173 | } |
| 174 | 174 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Moka\Generator\Template; |
| 5 | 5 | |
@@ -84,8 +84,8 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | foreach ($methods as $method) { |
| 86 | 86 | if ( |
| 87 | - !$method->isFinal() && |
|
| 88 | - !\in_array($method->name, self::UNSAFE_METHODS, $strict = true) |
|
| 87 | + ! $method->isFinal() && |
|
| 88 | + ! \in_array($method->name, self::UNSAFE_METHODS, $strict = true) |
|
| 89 | 89 | ) { |
| 90 | 90 | $methodsCode[] = MethodTemplate::generate($method); |
| 91 | 91 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Moka\Generator\Template; |
| 5 | 5 | use Moka\Exception\InvalidArgumentException; |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Moka\Plugin\Phake\Matcher; |
| 5 | 5 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $this->methodName = $methodName; |
| 40 | 40 | |
| 41 | 41 | $mockHash = spl_object_hash($mock); |
| 42 | - if (!isset(self::$stubsPerMock[$mockHash])) { |
|
| 42 | + if ( ! isset(self::$stubsPerMock[$mockHash])) { |
|
| 43 | 43 | self::$stubsPerMock[$mockHash] = []; |
| 44 | 44 | } |
| 45 | 45 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function doArgumentsMatch(array &$arguments): void |
| 60 | 60 | { |
| 61 | - if (!$this->isFirstStub) { |
|
| 61 | + if ( ! $this->isFirstStub) { |
|
| 62 | 62 | throw new MethodMatcherException( |
| 63 | 63 | sprintf( |
| 64 | 64 | 'Cannot override definition for method "%s()"', |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Moka\Stub; |
| 5 | 5 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function add($elem): void |
| 23 | 23 | { |
| 24 | - if (!$elem instanceof StubInterface) { |
|
| 24 | + if ( ! $elem instanceof StubInterface) { |
|
| 25 | 25 | throw new InvalidArgumentException( |
| 26 | 26 | sprintf( |
| 27 | 27 | 'Element must be an instance of "%s", "%s" given', |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Moka\Generator\Template; |
| 5 | 5 | use Moka\Exception\InvalidArgumentException; |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Moka\Plugin; |
| 5 | 5 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | function loadPlugin(string $pluginName): MockingStrategyInterface |
| 23 | 23 | { |
| 24 | - $generateFQCN = function (string $pluginName): string { |
|
| 24 | + $generateFQCN = function(string $pluginName): string { |
|
| 25 | 25 | return sprintf( |
| 26 | 26 | PLUGIN_FQCN_TEMPLATE, |
| 27 | 27 | ucfirst($pluginName), |
@@ -32,8 +32,8 @@ discard block |
||
| 32 | 32 | $pluginFQCN = $generateFQCN($pluginName); |
| 33 | 33 | |
| 34 | 34 | if ( |
| 35 | - !class_exists($pluginFQCN) || |
|
| 36 | - !\in_array(PluginInterface::class, class_implements($pluginFQCN), true) |
|
| 35 | + ! class_exists($pluginFQCN) || |
|
| 36 | + ! \in_array(PluginInterface::class, class_implements($pluginFQCN), true) |
|
| 37 | 37 | ) { |
| 38 | 38 | throw new NotImplementedException( |
| 39 | 39 | sprintf( |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | require_once __DIR__ . '/Plugin/loadPlugin.php'; |
| 6 | 6 | \ No newline at end of file |