Passed
Pull Request — master (#5)
by
unknown
08:17
created
zendframework/zend-hydrator/src/NamingStrategy/UnderscoreNamingStrategy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     private function getUnderscoreToCamelCaseFilter() : UnderscoreToCamelCaseFilter
44 44
     {
45
-        if (! static::$underscoreToCamelCaseFilter) {
45
+        if (!static::$underscoreToCamelCaseFilter) {
46 46
             static::$underscoreToCamelCaseFilter = new UnderscoreToCamelCaseFilter();
47 47
         }
48 48
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     private function getCamelCaseToUnderscoreFilter() : CamelCaseToUnderscoreFilter
53 53
     {
54
-        if (! static::$camelCaseToUnderscoreFilter) {
54
+        if (!static::$camelCaseToUnderscoreFilter) {
55 55
             static::$camelCaseToUnderscoreFilter = new CamelCaseToUnderscoreFilter();
56 56
         }
57 57
 
Please login to merge, or discard this patch.
src/NamingStrategy/UnderscoreNamingStrategy/CamelCaseToUnderscoreFilter.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -38,21 +38,21 @@  discard block
 block discarded – undo
38 38
     {
39 39
         return $this->hasPcreUnicodeSupport()
40 40
             ? [
41
-                [ // pattern
41
+                [// pattern
42 42
                     '#(?<=(?:\p{Lu}))(\p{Lu}\p{Ll})#',
43 43
                     '#(?<=(?:\p{Ll}|\p{Nd}))(\p{Lu})#',
44 44
                 ],
45
-                [ // replacement
45
+                [// replacement
46 46
                     '_\1',
47 47
                     '_\1',
48 48
                 ],
49 49
             ]
50 50
             : [
51
-                [ // pattern
51
+                [// pattern
52 52
                     '#(?<=(?:[A-Z]))([A-Z]+)([A-Z][a-z])#',
53 53
                     '#(?<=(?:[a-z0-9]))([A-Z])#',
54 54
                 ],
55
-                [ // replacement
55
+                [// replacement
56 56
                     '\1_\2',
57 57
                     '_\1',
58 58
                 ],
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
     private function getLowerFunction() : callable
63 63
     {
64 64
         return $this->hasMbStringSupport()
65
-            ? function ($value) {
65
+            ? function($value) {
66 66
                 return mb_strtolower($value, 'UTF-8');
67 67
             }
68
-            : function ($value) {
68
+            : function($value) {
69 69
                 // ignore unicode characters w/ strtolower
70
-                return preg_replace_callback('#([A-Z])#', function ($matches) {
70
+                return preg_replace_callback('#([A-Z])#', function($matches) {
71 71
                     return strtolower($matches[1]);
72 72
                 }, $value);
73 73
             };
Please login to merge, or discard this patch.
src/NamingStrategy/UnderscoreNamingStrategy/UnderscoreToCamelCaseFilter.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         return $this->hasPcreUnicodeSupport()
46 46
             ? $this->getUnicodePatternAndReplacement($pregQuotedSeparator)
47 47
             : new PcreReplacement(
48
-                '#(' . $pregQuotedSeparator . ')([\S]{1})#',
49
-                function ($matches) {
48
+                '#('.$pregQuotedSeparator.')([\S]{1})#',
49
+                function($matches) {
50 50
                     return strtoupper($matches[2]);
51 51
                 }
52 52
             );
@@ -56,15 +56,15 @@  discard block
 block discarded – undo
56 56
     {
57 57
         return $this->hasMbStringSupport()
58 58
             ? new PcreReplacement(
59
-                '#(' . $pregQuotedSeparator . ')(\P{Z}{1})#u',
60
-                function ($matches) {
59
+                '#('.$pregQuotedSeparator.')(\P{Z}{1})#u',
60
+                function($matches) {
61 61
                     return mb_strtoupper($matches[2], 'UTF-8');
62 62
                 }
63 63
             )
64 64
             : new PcreReplacement(
65
-                '#(' . $pregQuotedSeparator . ')'
65
+                '#('.$pregQuotedSeparator.')'
66 66
                     . '([^\p{Z}\p{Ll}]{1}|[a-zA-Z]{1})#u',
67
-                function ($matches) {
67
+                function($matches) {
68 68
                     return strtoupper($matches[2]);
69 69
                 }
70 70
             );
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
     private function getLcFirstFunction() : callable
74 74
     {
75 75
         return $this->hasMbStringSupport()
76
-            ? function ($value) {
77
-                return mb_strtolower($value[0], 'UTF-8') . substr($value, 1);
76
+            ? function($value) {
77
+                return mb_strtolower($value[0], 'UTF-8').substr($value, 1);
78 78
             }
79 79
             : 'lcfirst';
80 80
     }
Please login to merge, or discard this patch.
zendframework/zend-hydrator/src/NamingStrategy/CompositeNamingStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     public function __construct(array $strategies, ?NamingStrategyInterface $defaultNamingStrategy = null)
30 30
     {
31 31
         $this->namingStrategies = array_map(
32
-            function (NamingStrategyInterface $strategy) {
32
+            function(NamingStrategyInterface $strategy) {
33 33
                 // this callback is here only to ensure type-safety
34 34
                 return $strategy;
35 35
             },
Please login to merge, or discard this patch.
vendor/zendframework/zend-hydrator/src/NamingStrategy/MapNamingStrategy.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,14 +100,14 @@
 block discarded – undo
100 100
      */
101 101
     private function flipMapping(array $array) : array
102 102
     {
103
-        array_walk($array, function ($value, $key) {
104
-            if (! is_string($value) || $value === '') {
103
+        array_walk($array, function($value, $key) {
104
+            if (!is_string($value) || $value === '') {
105 105
                 throw new Exception\InvalidArgumentException(
106 106
                     'Mapping array can not be flipped because of invalid value'
107 107
                 );
108 108
             }
109 109
 
110
-            if (! is_string($key) || $key === '') {
110
+            if (!is_string($key) || $key === '') {
111 111
                 throw new Exception\InvalidArgumentException(
112 112
                     'Mapping array can not be flipped because of invalid key'
113 113
                 );
Please login to merge, or discard this patch.
vendor/zendframework/zend-hydrator/src/ReflectionHydrator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         $result = [];
34 34
         foreach (self::getReflProperties($object) as $property) {
35 35
             $propertyName = $this->extractName($property->getName(), $object);
36
-            if (! $this->getCompositeFilter()->filter($propertyName)) {
36
+            if (!$this->getCompositeFilter()->filter($propertyName)) {
37 37
                 continue;
38 38
             }
39 39
 
Please login to merge, or discard this patch.
vendor/zendframework/zend-hydrator/src/StandaloneHydratorPluginManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     public function __construct()
69 69
     {
70
-        $invokableFactory = function (ContainerInterface $container, string $class) {
70
+        $invokableFactory = function(ContainerInterface $container, string $class) {
71 71
             return new $class();
72 72
         };
73 73
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function get($id)
87 87
     {
88 88
         $class = $this->resolveName($id);
89
-        if (! $class) {
89
+        if (!$class) {
90 90
             throw Exception\MissingHydratorServiceException::forService($id);
91 91
         }
92 92
 
Please login to merge, or discard this patch.
vendor/zendframework/zend-hydrator/src/HydratorPluginManagerFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function __invoke(ContainerInterface $container, string $name, ?array $options = []) : HydratorPluginManager
33 33
     {
34
-        if (! class_exists(Config::class)) {
34
+        if (!class_exists(Config::class)) {
35 35
             throw new Exception\DomainException(sprintf(
36 36
                 '%s requires the zendframework/zend-servicemanager package, which is not installed.'
37 37
                 . ' If you do not want to install that package, you can use the %s instead;'
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
         }
53 53
 
54 54
         // If we do not have a config service, nothing more to do
55
-        if (! $container->has('config')) {
55
+        if (!$container->has('config')) {
56 56
             return $pluginManager;
57 57
         }
58 58
 
59 59
         $config = $container->get('config');
60 60
 
61 61
         // If we do not have hydrators configuration, nothing more to do
62
-        if (! isset($config['hydrators']) || ! is_array($config['hydrators'])) {
62
+        if (!isset($config['hydrators']) || !is_array($config['hydrators'])) {
63 63
             return $pluginManager;
64 64
         }
65 65
 
Please login to merge, or discard this patch.
vendor/mockery/mockery/tests/Mockery/MockTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,16 +74,16 @@
 block discarded – undo
74 74
     public function testMockToStringMayBeDeferred()
75 75
     {
76 76
         $mock = mock('ClassWithToString')->makePartial();
77
-        $this->assertEquals("foo", (string)$mock);
77
+        $this->assertEquals("foo", (string) $mock);
78 78
     }
79 79
 
80 80
     public function testMockToStringShouldIgnoreMissingAlwaysReturnsString()
81 81
     {
82 82
         $mock = mock('ClassWithNoToString')->shouldIgnoreMissing();
83
-        $this->assertNotEquals('', (string)$mock);
83
+        $this->assertNotEquals('', (string) $mock);
84 84
 
85 85
         $mock->asUndefined();
86
-        $this->assertNotEquals('', (string)$mock);
86
+        $this->assertNotEquals('', (string) $mock);
87 87
     }
88 88
 
89 89
     public function testShouldIgnoreMissing()
Please login to merge, or discard this patch.