PluginProbe
Media Cloud Sync / 1.4.2
Media Cloud Sync v1.4.2
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
← All changes | includes/sdk/s3/Aws/Api/Validator.php +2 -10 1.2.13 → 1.4.2 View file →
@@ -17,9 +17,9 @@
17 17 * Accepts the following keys: "required", "min",
18 18 * "max", and "pattern". If a key is not
19 19 * provided, the constraint will assume false.
20 20 */
21 - public function __construct(array $constraints = null)
21 + public function __construct(?array $constraints = null)
22 22 {
23 23 static $assumedFalseValues = ['required' => \false, 'min' => \false, 'max' => \false, 'pattern' => \false];
24 24 $this->constraints = empty($constraints) ? self::$defaultConstraints : $constraints + $assumedFalseValues;
25 25 }
@@ -172,17 +172,9 @@
172 172 }
173 173 }
174 174 private function checkArray($arr)
175 175 {
176 - return $this->isIndexed($arr) || $this->isAssociative($arr);
177 - }
178 - private function isAssociative($arr)
179 - {
180 - return \count(\array_filter(\array_keys($arr), "is_string")) == \count($arr);
181 - }
182 - private function isIndexed(array $arr)
183 - {
184 - return $arr == \array_values($arr);
176 + return \array_is_list($arr) || Aws\is_associative($arr);
185 177 }
186 178 private function checkCanString($value)
187 179 {
188 180 static $valid = ['string' => \true, 'integer' => \true, 'double' => \true, 'NULL' => \true];