Completed
Branch master (899a66)
by Reen
58:20
created
src/Comparator.php 4 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.
Indentation   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -130,10 +130,10 @@  discard block
 block discarded – undo
130 130
         if (is_array($data)) {
131 131
 
132 132
             if (isset($structure['assoc'])) {
133
-				return $this->assoc($structure['assoc'], $data);
133
+                return $this->assoc($structure['assoc'], $data);
134 134
             }
135 135
 			
136
-			if(isset($structure['values'])) {
136
+            if(isset($structure['values'])) {
137 137
 
138 138
                 if (is_array($structure['values'])) {
139 139
                     foreach ($data as $key => $subData) {
@@ -208,7 +208,6 @@  discard block
 block discarded – undo
208 208
 
209 209
     /**
210 210
      * @return Comparator
211
-
212 211
      */
213 212
     private static function instance()
214 213
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
 				return $this->assoc($structure['assoc'], $data);
134 134
             }
135 135
 			
136
-			if(isset($structure['values'])) {
136
+			if (isset($structure['values'])) {
137 137
 
138 138
                 if (is_array($structure['values'])) {
139 139
                     foreach ($data as $key => $subData) {
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,7 +67,9 @@  discard block
 block discarded – undo
67 67
          * К примеру формата даты или длины
68 68
          */
69 69
 
70
-        if (in_array($this->getType($value), $types)) return /* success */;
70
+        if (in_array($this->getType($value), $types)) {
71
+            return /* success */;
72
+        }
71 73
 
72 74
         if ($this->exists) {
73 75
 
@@ -75,7 +77,9 @@  discard block
 block discarded – undo
75 77
                 foreach ($intersect as $key) {
76 78
                     $diff = $this->compare($value, $this->temporaryCustom[$key]);
77 79
 
78
-                    if (empty($diff)) return /* success */;
80
+                    if (empty($diff)) {
81
+                        return /* success */;
82
+                    }
79 83
                 }
80 84
 
81 85
                 /**
@@ -108,7 +112,9 @@  discard block
 block discarded – undo
108 112
 
109 113
 
110 114
         foreach ($data as $value) {
111
-            if (in_array($value, $set, true)) continue;
115
+            if (in_array($value, $set, true)) {
116
+                continue;
117
+            }
112 118
 
113 119
             return $this->createDiff('var:type', StructureDiffInfo::TYPE);
114 120
         }
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.