Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ushahidlee committed Oct 21, 2024
1 parent 5f57128 commit 4478b32
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ protected function savePostValues(Post $post, array $post_content, int $post_id)
return $errors;
}

protected function savePostMedia($post, $attr_id, $media) {
protected function savePostMedia($post, $attr_id, $media)
{
if (!is_array($media)) {
throw new \Exception("$attr_id: media format is invalid.");
}
Expand Down
1 change: 0 additions & 1 deletion src/Ushahidi/Modules/V5/Http/Resources/MediaResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ public function toArray($request)
'media_id' => $this->value,
];
}

}
3 changes: 1 addition & 2 deletions src/Ushahidi/Modules/V5/Models/Post/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,7 @@ function ($attribute, $value, $fail) {
$get_value = RequestFacade::input(str_replace('.type', '.value.value', $attribute));
if ($value === 'tags' && !is_array($get_value)) {
return $fail(trans('validation.tag_field_must_be_array'));
}
elseif ($value === 'media' && !is_array($get_value)) {
} elseif ($value === 'media' && !is_array($get_value)) {
return $fail(trans('validation.media_field_must_be_array'));
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/Ushahidi/Modules/V5/Requests/PostRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ function ($attribute, $value, $fail) {
$get_value = RequestFacade::input(str_replace('.type', '.value.value', $attribute));
if ($value === 'tags' && !is_array($get_value)) {
return $fail(trans('validation.tag_field_must_be_array'));
}
elseif ($value === 'media' && !is_array($get_value)) {
} elseif ($value === 'media' && !is_array($get_value)) {
return $fail(trans('validation.media_field_must_be_array'));
}
}
Expand Down

0 comments on commit 4478b32

Please sign in to comment.