@@ -24,7 +24,7 @@ |
||
| 24 | 24 | public static function get(MockingStrategyInterface $mockingStrategy): ProxyGenerator |
| 25 | 25 | { |
| 26 | 26 | $key = self::key($mockingStrategy); |
| 27 | - if (!array_key_exists($key, self::$proxyGenerators) || !self::$proxyGenerators[$key] instanceof ProxyGenerator) { |
|
| 27 | + if ( ! array_key_exists($key, self::$proxyGenerators) || ! self::$proxyGenerators[$key] instanceof ProxyGenerator) { |
|
| 28 | 28 | self::$proxyGenerators[$key] = static::build($mockingStrategy); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -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( |
@@ -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()"', |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | { |
| 132 | 132 | $backtrace = debug_backtrace(); |
| 133 | 133 | foreach ($backtrace as $frame) { |
| 134 | - if (!isset($frame['object'])) { |
|
| 134 | + if ( ! isset($frame['object'])) { |
|
| 135 | 135 | continue; |
| 136 | 136 | } |
| 137 | 137 | |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | */ |
| 180 | 180 | private static function ensurePluginLoad(string $pluginName): void |
| 181 | 181 | { |
| 182 | - if (!array_key_exists($pluginName, self::$mockingStrategies)) { |
|
| 182 | + if ( ! array_key_exists($pluginName, self::$mockingStrategies)) { |
|
| 183 | 183 | self::$mockingStrategies[$pluginName] = loadPlugin($pluginName); |
| 184 | 184 | } |
| 185 | 185 | } |
@@ -21,7 +21,7 @@ |
||
| 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', |
@@ -13,5 +13,5 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | function isMethodName(string $name): bool |
| 15 | 15 | { |
| 16 | - return !isPropertyName($name); |
|
| 16 | + return ! isPropertyName($name); |
|
| 17 | 17 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | ? $functionName($name) |
| 26 | 26 | : preg_match(REGEX_NAME, $name); |
| 27 | 27 | |
| 28 | - if (!$nameIsValid) { |
|
| 28 | + if ( ! $nameIsValid) { |
|
| 29 | 29 | $message = $isAPrefix |
| 30 | 30 | ? sprintf( |
| 31 | 31 | 'Name must be prefixed by "%s", "%s" given', |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | ? array_intersect(array_keys(PREFIXES), $prefixes) |
| 15 | 15 | : array_keys(PREFIXES); |
| 16 | 16 | |
| 17 | - return array_reduce($prefixes, function (string $name, string $prefix) { |
|
| 17 | + return array_reduce($prefixes, function(string $name, string $prefix) { |
|
| 18 | 18 | return preg_replace( |
| 19 | 19 | sprintf(TEMPLATE_NAME, PREFIXES[$prefix]), |
| 20 | 20 | '', |