diff --git a/src/Parser/User/Profile/LastUpdatesParser.php b/src/Parser/User/Profile/LastUpdatesParser.php index 1f946222..001c54b0 100644 --- a/src/Parser/User/Profile/LastUpdatesParser.php +++ b/src/Parser/User/Profile/LastUpdatesParser.php @@ -14,7 +14,7 @@ class LastUpdatesParser /** * @var Crawler */ - private $crawler; + private Crawler $crawler; /** * LastUpdates constructor. @@ -41,7 +41,7 @@ public function getModel(): LastUpdates public function getLastAnimeUpdates(): array { $arr = $this->parseBaseListUpdates('anime'); - $results = array(); + $results = []; /** * @var $baseLastUpdate BaseLastUpdate */ @@ -58,7 +58,7 @@ public function getLastAnimeUpdates(): array public function getLastMangaUpdates(): array { $arr = $this->parseBaseListUpdates('manga'); - $results = array(); + $results = []; /** * @var $baseLastUpdate BaseLastUpdate */ @@ -88,7 +88,6 @@ private function parseBaseListUpdates(string $updateType): array /** @var $progressed int|null */ $progressed = null; - $status = ""; $progressedTotalSeparatorIndex = strpos($progressTypeValueUnparsed, '/'); if ($progressedTotalSeparatorIndex != false) { $totalUnparsed = substr($progressTypeValueUnparsed, $progressedTotalSeparatorIndex + 1); @@ -97,9 +96,10 @@ private function parseBaseListUpdates(string $updateType): array $progressed = ctype_digit($progressedUnparsed) ? intval($progressedUnparsed) : null; $status = trim(substr($progressTypeValueUnparsed, 0, $progressedTotalSeparatorIndex - 2)); } else { + $progressTypeValueUnparsed = str_replace(" -", "", $progressTypeValueUnparsed); $status = trim($progressTypeValueUnparsed); } return new BaseLastUpdate($url, $title, $imageUrl, $progressed, $total, $status, $score, $date); }); } -} \ No newline at end of file +}