Skip to content

Commit

Permalink
fix: add phpdoc to shut up phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckadams committed Oct 22, 2024
1 parent 041c56b commit ab1e4e5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
28 changes: 28 additions & 0 deletions app/Data/WpOrg/Themes/ThemeResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,34 @@

class ThemeResponse extends Data
{
/**
* @param string $name
* @param string $slug
* @param string $version
* @param string $preview_url
* @param Author $author
* @param string $screenshot_url
* @param array{1:int, 2:int, 3:int, 4:int} $ratings
* @param int $rating
* @param int $num_ratings
* @param string $reviews_url
* @param int $downloaded
* @param int $active_installs
* @param CarbonImmutable $last_updated
* @param CarbonImmutable $last_updated_time
* @param CarbonImmutable $creation_time
* @param string $homepage
* @param array<string,string> $sections
* @param string $download_link
* @param array<string,string> $tags
* @param array<string,string> $versions
* @param bool $requires
* @param string $requires_php
* @param bool $is_commercial
* @param string|bool $external_support_url
* @param bool $is_community
* @param string $external_repository_url
*/
public function __construct(
public readonly string $name,
public readonly string $slug,
Expand Down
4 changes: 3 additions & 1 deletion app/Http/Controllers/API/WpOrg/Themes/ThemeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Http\Controllers\API\WpOrg\Themes;

use App\Data\WpOrg\Themes\HotTagsRequest;
use App\Data\WpOrg\Themes\QueryThemesRequest;
use App\Data\WpOrg\Themes\ThemeInformationRequest;
use App\Http\Controllers\Controller;
Expand Down Expand Up @@ -39,16 +38,19 @@ private function doQueryThemes(QueryThemesRequest $req): ApiResultsResponse
return new ApiResultsResponse('themes', $themes, $page, $perPage, $total);
}

/** @return array<string, mixed> */
private function doThemeInformation(ThemeInformationRequest $req): array
{
return ['req' => $req];
}

/** @return array<string, mixed> */
private function doHotTags(Request $request): array
{
return ['error' => 'not implemented'];
}

/** @return array<string, mixed> */
private function doFeatureList(Request $request): array
{
return ['error' => 'not implemented'];
Expand Down

0 comments on commit ab1e4e5

Please sign in to comment.