Completed
Push — master ( 001bdf...40bb6e )
by Reen
02:01
created
src/Comparator.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -88,6 +88,9 @@
 block discarded – undo
88 88
         return $this->createDiff('var:type', StructureDiffInfo::TYPE);
89 89
     }
90 90
 
91
+    /**
92
+     * @param string $structure
93
+     */
91 94
     private function diffType($data, $structure)
92 95
     {
93 96
         $needTypes = explode('|', $structure);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,8 @@
 block discarded – undo
91 91
 
92 92
     private function diffSet($data, $set)
93 93
     {
94
-        $data = (array)$data;
95
-        $set = (array)$set;
94
+        $data = (array) $data;
95
+        $set = (array) $set;
96 96
 
97 97
         if (array_diff($data, $set)) {
98 98
             return $this->createDiff('set:out', StructureDiffInfo::TYPE);
Please login to merge, or discard this patch.
Braces   +11 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,14 +65,20 @@  discard block
 block discarded – undo
65 65
          * К примеру формата даты или длины
66 66
          */
67 67
 
68
-        if (in_array($this->getType($value), $types)) return; /* success */
68
+        if (in_array($this->getType($value), $types)) {
69
+            return;
70
+        }
71
+        /* success */
69 72
 
70 73
         if ($this->exists) {
71 74
             if ($intersect = array_intersect($types, $this->exists)) {
72 75
                 foreach ($intersect as $key) {
73 76
                     $diff = $this->compare($value, $this->temporaryCustom[$key]);
74 77
 
75
-                    if (empty($diff)) return; /* success */
78
+                    if (empty($diff)) {
79
+                        return;
80
+                    }
81
+                    /* success */
76 82
                 }
77 83
 
78 84
                 return $this->processDiff($diff, "custom:type:$key");
@@ -99,7 +105,9 @@  discard block
 block discarded – undo
99 105
         }
100 106
 
101 107
         foreach ($data as $value) {
102
-            if (in_array($value, $set, true)) continue;
108
+            if (in_array($value, $set, true)) {
109
+                continue;
110
+            }
103 111
 
104 112
             return $this->createDiff('var:type', StructureDiffInfo::TYPE);
105 113
         }
Please login to merge, or discard this patch.
src/StructureDiffInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
     public static function createDiff($message)
26 26
     {
27
-        $self =  new self(false);
27
+        $self = new self(false);
28 28
         $self->message = $message;
29 29
         return $self;
30 30
     }
Please login to merge, or discard this patch.