lint fixes

This commit is contained in:
prateek banga
2023-08-03 17:39:13 +05:30
parent f797c2574a
commit ea57a303d0
2 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -466,7 +466,7 @@ class Response extends SwooleResponse
* return void
* @throws Exception
*/
public function static(array $output): void
public function static(array $output): void
{
switch ($this->getContentType()) {
case self::CONTENT_TYPE_JSON:
@@ -523,7 +523,7 @@ class Response extends SwooleResponse
if (!is_array($document[$key])) {
throw new Exception($key . ' must be an array of type ' . $rule['type']);
}
foreach ($document[$key] as $index => $item) {
if ($item instanceof Document) {
if (\is_array($rule['type'])) {
@@ -543,11 +543,11 @@ class Response extends SwooleResponse
} else {
$ruleType = $rule['type'];
}
if (!array_key_exists($ruleType, $this->models)) {
throw new Exception('Missing model for rule: ' . $ruleType);
}
$data[$key][$index] = $this->output($item, $ruleType);
}
}