Test Setup Failed
Branch master (931226)
by Oguzhan
03:14
created
Category
src/HydratableTrait.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,9 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
             // Convert key to a propertyname in $this
66 66
             $propertyName = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $itemKey))));
67
-            $propertyName = (property_exists($this, $propertyName)) ? $propertyName :
68
-                (property_exists($this, lcfirst($propertyName)) ? lcfirst($propertyName) :
69
-                    preg_replace_callback('/([A-Z])/', function ($match) {
67
+            $propertyName = (property_exists($this, $propertyName)) ? $propertyName : (property_exists($this, lcfirst($propertyName)) ? lcfirst($propertyName) : preg_replace_callback('/([A-Z])/', function($match) {
70 68
                         return strtolower('_' . $match[1]);
71 69
                     }, lcfirst($propertyName))
72 70
                 );
@@ -87,7 +85,7 @@  discard block
 block discarded – undo
87 85
 
88 86
                     if (in_array($propertyClassName, $this->nonObjectTypes)) {
89 87
                         $this->setPropertyValue($propertyName, $itemValue, true);
90
-                    } elseif(interface_exists($propertyClassName)) {
88
+                    } elseif (interface_exists($propertyClassName)) {
91 89
                         // We cannot instantiate an interface, so we skip it
92 90
                         continue;
93 91
                     } else {
Please login to merge, or discard this patch.
src/PropertyTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
      */
68 68
     protected function getMethodName($propertyKey)
69 69
     {
70
-        return ucfirst(preg_replace_callback('/_([a-z])/', function ($match) {
70
+        return ucfirst(preg_replace_callback('/_([a-z])/', function($match) {
71 71
             return strtoupper($match[1]);
72 72
         }, $propertyKey));
73 73
     }
Please login to merge, or discard this patch.
src/ReflectionTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         if (preg_match('~\@var[\s]+([A-Za-z0-9\\\\]+)~', $comment, $matches)) {
26 26
             if ($includeNamespaces) {
27 27
                 if ($reflectionClass instanceof \ReflectionClass && !in_array($matches[1], $this->nonObjectTypes)) {
28
-                    if($reflectionClass->getNamespaceName()) {
28
+                    if ($reflectionClass->getNamespaceName()) {
29 29
                         return sprintf('\%s\%s', $reflectionClass->getNamespaceName(), $matches[1]);
30 30
                     } else {
31 31
                         return sprintf('\%s', $matches[1]);
Please login to merge, or discard this patch.