@@ -88,6 +88,9 @@ |
||
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); |
@@ -130,10 +130,10 @@ discard block |
||
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 |
||
208 | 208 | |
209 | 209 | /** |
210 | 210 | * @return Comparator |
211 | - |
|
212 | 211 | */ |
213 | 212 | private static function instance() |
214 | 213 | { |
@@ -133,7 +133,7 @@ |
||
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) { |
@@ -67,7 +67,9 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -24,7 +24,7 @@ |
||
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 | } |