Skip to content

Commit

Permalink
add fallback to pass test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar Rida committed Aug 13, 2024
1 parent 307bda6 commit 2225e48
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ public function toSearchableArray()

return [
'id' => (string) $packageAttributes['id'],
'name' => (string) $packageAttributes['name'],
'url' => (string) $packageAttributes['url'],
'instructions' => (string) $packageAttributes['instructions'],
'composer_name' => (string) $packageAttributes['composer_name'],
'repo_url' => (string) $packageAttributes['repo_url'],
'readme' => (string) $packageAttributes['readme'],
'abstract' => (string) $packageAttributes['abstract'],
'_tags' => $packageAttributes['_tags'],
'name' => (string) ($packageAttributes['name'] ?? ''),
'url' => (string) ($packageAttributes['url'] ?? ''),
'instructions' => (string) ($packageAttributes['instructions'] ?? ''),
'composer_name' => (string) ($packageAttributes['composer_name'] ?? ''),
'repo_url' => (string) ($packageAttributes['repo_url'] ?? ''),
'readme' => (string) ($packageAttributes['readme'] ?? ''),
'abstract' => (string) ($packageAttributes['abstract'] ?? ''),
'_tags' => ($packageAttributes['_tags'] ?? []),
'created_at' => $packageAttributes['created_at'],
];
}
Expand Down

0 comments on commit 2225e48

Please sign in to comment.