Completed
Pull Request — master (#44)
by Angelo
02:00
created
src/Proxy/ProxyTrait.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Moka\Proxy;
5 5
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     protected function doCall(string $name, array $arguments)
77 77
     {
78
-        if (!$this->__moka_mockingStrategy instanceof MockingStrategyInterface) {
78
+        if ( ! $this->__moka_mockingStrategy instanceof MockingStrategyInterface) {
79 79
             return null;
80 80
         }
81 81
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     protected function doGet(string $name)
92 92
     {
93
-        if (!$this->__moka_mockingStrategy instanceof MockingStrategyInterface) {
93
+        if ( ! $this->__moka_mockingStrategy instanceof MockingStrategyInterface) {
94 94
             return null;
95 95
         }
96 96
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     private $__moka_methods = [];
36 36
 
37 37
     /**
38
-     * @return object
38
+     * @return \PHPUnit\Framework\MockObject\MockObject
39 39
      */
40 40
     public function __moka_getMock()
41 41
     {
Please login to merge, or discard this patch.
src/Stub/MethodStub.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Moka\Stub;
5 5
 
Please login to merge, or discard this patch.
src/Stub/AbstractStub.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Moka\Stub;
5 5
 
Please login to merge, or discard this patch.
src/Stub/PropertyStub.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Moka\Stub;
5 5
 
Please login to merge, or discard this patch.
src/Stub/StubSet.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 block discarded – undo
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',
Please login to merge, or discard this patch.
src/Stub/StubHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Moka\Stub;
5 5
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public static function isMethodName(string $name): bool
93 93
     {
94
-        return !static::isPropertyName($name);
94
+        return ! static::isPropertyName($name);
95 95
     }
96 96
 
97 97
     /**
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             ? array_intersect(array_keys(static::PREFIXES), $prefixes)
130 130
             : array_keys(static::PREFIXES);
131 131
 
132
-        return array_reduce($prefixes, function (string $name, string $prefix) {
132
+        return array_reduce($prefixes, function(string $name, string $prefix) {
133 133
             return preg_replace(
134 134
                 sprintf('/^%s/', static::PREFIXES[$prefix]),
135 135
                 '',
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
             ? static::$methodName($name)
153 153
             : preg_match(static::REGEX_NAME, $name);
154 154
 
155
-        if (!$nameIsValid) {
155
+        if ( ! $nameIsValid) {
156 156
             $message = isset(static::PREFIXES[$type])
157 157
                 ? sprintf(
158 158
                     'Name must be prefixed by "%s", "%s" given',
Please login to merge, or discard this patch.
src/Stub/StubInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Moka\Stub;
5 5
 
Please login to merge, or discard this patch.
src/Plugin/plugin.helper.functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Moka\Plugin;
5 5
 
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
     $pluginFQCN = generateFQCN($pluginName);
25 25
 
26 26
     if (
27
-        !class_exists($pluginFQCN) ||
28
-        !\in_array(PluginInterface::class, class_implements($pluginFQCN), true)
27
+        ! class_exists($pluginFQCN) ||
28
+        ! \in_array(PluginInterface::class, class_implements($pluginFQCN), true)
29 29
     ) {
30 30
         throw new NotImplementedException(
31 31
             sprintf(
Please login to merge, or discard this patch.
src/Moka.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.