@@ -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 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public static function __callStatic(string $name, array $arguments) |
| 44 | 44 | { |
| 45 | - if (!isset(self::$mockingStrategies[$name])) { |
|
| 45 | + if ( ! isset(self::$mockingStrategies[$name])) { |
|
| 46 | 46 | self::$mockingStrategies[$name] = PluginHelper::load($name); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -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\Proxy; |
| 5 | 5 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function get($id): Proxy |
| 35 | 35 | { |
| 36 | - if (!$this->has($id)) { |
|
| 36 | + if ( ! $this->has($id)) { |
|
| 37 | 37 | throw new InvalidIdentifierException( |
| 38 | 38 | sprintf( |
| 39 | 39 | 'Cannot find mock object with identifier "%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\Strategy; |
| 5 | 5 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | final protected static function checkDependencies(string $dependencyClassName, string $dependencyPackageName) |
| 31 | 31 | { |
| 32 | - if (!class_exists($dependencyClassName)) { |
|
| 32 | + if ( ! class_exists($dependencyClassName)) { |
|
| 33 | 33 | throw new MissingDependencyException( |
| 34 | 34 | sprintf( |
| 35 | 35 | 'Class "%s" does not exist, please install package "%s"', |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | { |
| 124 | 124 | $this->verifyMockType(); |
| 125 | 125 | |
| 126 | - if (!is_a($mock, $this->mockType)) { |
|
| 126 | + if ( ! is_a($mock, $this->mockType)) { |
|
| 127 | 127 | throw new InvalidArgumentException( |
| 128 | 128 | sprintf( |
| 129 | 129 | 'Mock object must be of type "%s", "%s" given', |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | */ |
| 161 | 161 | private function verifyMockType() |
| 162 | 162 | { |
| 163 | - if (!$this->mockType) { |
|
| 163 | + if ( ! $this->mockType) { |
|
| 164 | 164 | throw new NotImplementedException('Mock type was not defined'); |
| 165 | 165 | } |
| 166 | 166 | } |
@@ -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 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | public function add($elem) |
| 22 | 22 | { |
| 23 | - if (!$elem instanceof Stub) { |
|
| 23 | + if ( ! $elem instanceof Stub) { |
|
| 24 | 24 | throw new InvalidArgumentException( |
| 25 | 25 | sprintf( |
| 26 | 26 | 'Element must be of type "%s", "%s" given', |
@@ -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\Factory; |
| 5 | 5 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | public static function get(MockingStrategyInterface $mockingStrategy): ProxyBuilder |
| 25 | 25 | { |
| 26 | 26 | $key = self::key($mockingStrategy); |
| 27 | - if (!array_key_exists($key, self::$mockBuilders) || !self::$mockBuilders[$key] instanceof ProxyBuilder) { |
|
| 27 | + if ( ! array_key_exists($key, self::$mockBuilders) || ! self::$mockBuilders[$key] instanceof ProxyBuilder) { |
|
| 28 | 28 | self::$mockBuilders[$key] = static::build($mockingStrategy); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -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\Proxy; |
| 5 | 5 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | private function getMock() |
| 73 | 73 | { |
| 74 | - if (!$this->mock) { |
|
| 74 | + if ( ! $this->mock) { |
|
| 75 | 75 | $this->mock = $this->mockingStrategy->build($this->fqcn); |
| 76 | 76 | $this->decorateMock(); |
| 77 | 77 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Moka\Tests; |
| 5 | 5 | |
@@ -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\Tests; |
| 5 | 5 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | public function testMethodForward() |
| 148 | 148 | { |
| 149 | - if (!$this->methodName) { |
|
| 149 | + if ( ! $this->methodName) { |
|
| 150 | 150 | return; |
| 151 | 151 | } |
| 152 | 152 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | ][random_int(0, 1)]; |
| 167 | 167 | |
| 168 | 168 | $this->methodsWithValues = [ |
| 169 | - 'isTrue' => !!random_int(0, 1), |
|
| 169 | + 'isTrue' => ! ! random_int(0, 1), |
|
| 170 | 170 | 'getInt' => mt_rand(), |
| 171 | 171 | 'withArgument' => mt_rand(), |
| 172 | 172 | 'throwException' => new \Exception('' . mt_rand()) |