@@ -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 |
@@ -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 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | $methods = $class->getMethods(\ReflectionMethod::IS_PUBLIC); |
68 | 68 | $methodsCode = []; |
69 | - $methodNames = array_map(function (\ReflectionMethod $method) { |
|
69 | + $methodNames = array_map(function(\ReflectionMethod $method) { |
|
70 | 70 | return $method->name; |
71 | 71 | }, $methods); |
72 | 72 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $getNameType = ''; |
75 | 75 | |
76 | 76 | foreach ($properties as $property) { |
77 | - if (!in_array($property->name, $methodNames)) { |
|
77 | + if ( ! in_array($property->name, $methodNames)) { |
|
78 | 78 | continue; |
79 | 79 | } |
80 | 80 | |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | |
86 | 86 | foreach ($methods as $method) { |
87 | 87 | if ( |
88 | - !$method->isFinal() && |
|
89 | - !in_array($method->name, self::UNSAFE_METHODS, true) |
|
88 | + ! $method->isFinal() && |
|
89 | + ! in_array($method->name, self::UNSAFE_METHODS, true) |
|
90 | 90 | ) { |
91 | 91 | $methodsCode[] = MethodTemplate::generate($method); |
92 | 92 | } |
@@ -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 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | final protected static function checkDependencies(string $dependencyClassName, string $dependencyPackageName) |
33 | 33 | { |
34 | - if (!class_exists($dependencyClassName)) { |
|
34 | + if ( ! class_exists($dependencyClassName)) { |
|
35 | 35 | throw new MissingDependencyException( |
36 | 36 | sprintf( |
37 | 37 | 'Class "%s" does not exist, please install package "%s"', |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | { |
147 | 147 | $this->verifyMockType(); |
148 | 148 | |
149 | - if (!is_a($mock, $this->mockType)) { |
|
149 | + if ( ! is_a($mock, $this->mockType)) { |
|
150 | 150 | throw new InvalidArgumentException( |
151 | 151 | sprintf( |
152 | 152 | 'Mock object must be an instance of "%s", "%s" given', |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | */ |
165 | 165 | private function verifyMockType() |
166 | 166 | { |
167 | - if (!$this->mockType) { |
|
167 | + if ( ! $this->mockType) { |
|
168 | 168 | throw new NotImplementedException('Mock type was not defined'); |
169 | 169 | } |
170 | 170 | } |
@@ -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 StubInterface) { |
|
23 | + if ( ! $elem instanceof StubInterface) { |
|
24 | 24 | throw new InvalidArgumentException( |
25 | 25 | sprintf( |
26 | 26 | 'Element must be an instance of "%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\Stub; |
5 | 5 | |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public function __construct(string $name, $value) |
34 | 34 | { |
35 | - if (!preg_match(self::REGEX_NAME, $name)) { |
|
35 | + if ( ! preg_match(self::REGEX_NAME, $name)) { |
|
36 | 36 | throw new InvalidArgumentException( |
37 | 37 | sprintf( |
38 | 38 | 'Name must be a valid variable or method name, "%s" given', |