diff --git a/composer.json b/composer.json index f0a4a82..5a67363 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "wrapper" ], "type": "library", - "minimum-stability": "dev", + "minimum-stability": "stable", "require": { "php": "^8.1", "ext-json": "*", @@ -26,7 +26,7 @@ "larastan/larastan": "^2.9.2", "laravel/pint": "^1.13", "pestphp/pest": "^2", - "pestphp/pest-plugin-type-coverage": "2.x-dev" + "pestphp/pest-plugin-type-coverage": "^2.8.3" }, "license": "MIT", "authors": [ diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index f210962..a987bfd 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,14 +1,9 @@ parameters: ignoreErrors: - - message: "#^Expression on left side of \\?\\? is not nullable\\.$#" + message: "#^Unable to resolve the template type TMapValue in call to method Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\),mixed\\>\\:\\:map\\(\\)$#" count: 1 - path: src/Console/CreateWebhook.php - - - - message: "#^Parameter \\#2 \\$array of function preg_grep expects array, array\\\\|false given\\.$#" - count: 1 - path: src/Console/CreateWebhook.php + path: src/Models/Model.php - message: "#^Cannot call method assertExitCode\\(\\) on Illuminate\\\\Testing\\\\PendingCommand\\|int\\.$#" diff --git a/phpstan.neon b/phpstan.neon index d6626bd..6c9a47f 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -13,5 +13,5 @@ parameters: - '#Call to an undefined static method MarcReichel\\IGDBLaravel\\Models\\Game::foo\(\).#' - '#Unable to resolve the template type TValue in call to function collect#' - '#Unable to resolve the template type TKey in call to function collect#' - checkMissingIterableValueType: false - checkGenericClassInNonGenericObjectType: false + - identifier: missingType.iterableValue + - identifier: missingType.generics diff --git a/src/Console/CreateWebhook.php b/src/Console/CreateWebhook.php index 9535fbb..bb306a1 100644 --- a/src/Console/CreateWebhook.php +++ b/src/Console/CreateWebhook.php @@ -89,9 +89,9 @@ public function handle(): int private function getModels(): array { - $glob = glob(__DIR__ . '/../Models/*.php') ?? []; + $glob = glob(__DIR__ . '/../Models/*.php') ?: []; - $pattern = '/\/(?:Model|Search|Webhook|Image)\.php$/'; + $pattern = '/\/(?:Model|PopularityPrimitive|Search|Webhook|Image)\.php$/'; $grep = preg_grep($pattern, $glob, PREG_GREP_INVERT); return collect($grep ?: []) diff --git a/src/Enums/Popularity/Source.php b/src/Enums/Popularity/Source.php new file mode 100644 index 0000000..50742d1 --- /dev/null +++ b/src/Enums/Popularity/Source.php @@ -0,0 +1,10 @@ +data = $data; + } +} diff --git a/src/Events/PopularityTypeDeleted.php b/src/Events/PopularityTypeDeleted.php new file mode 100644 index 0000000..59b3ca7 --- /dev/null +++ b/src/Events/PopularityTypeDeleted.php @@ -0,0 +1,9 @@ + PopularityType::class, + ]; +} diff --git a/src/Models/PopularityType.php b/src/Models/PopularityType.php new file mode 100644 index 0000000..7ed3a77 --- /dev/null +++ b/src/Models/PopularityType.php @@ -0,0 +1,9 @@ +