Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

Commit

Permalink
Fix unnecessary is_countable()
Browse files Browse the repository at this point in the history
  • Loading branch information
leocavalcante committed Sep 16, 2020
1 parent bee4f15 commit b588ed6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Request.php
Expand Up @@ -339,7 +339,7 @@ function accepted_locales(): array
$lang_parse
);

if (is_countable($lang_parse[1]) && count($lang_parse[1]) > 0) {
if (count($lang_parse) > 1 && count($lang_parse[1]) > 0) {
// create a list like "en" => 0.8
/** @var array<mixed, array-key> $lang_parse_1 */
$lang_parse_1 = $lang_parse[1];
Expand Down

0 comments on commit b588ed6

Please sign in to comment.