Remove redundant docblocks from Type classes

This commit is contained in:
Timothy Warren 2021-02-23 17:08:16 -05:00
parent 7990b3ad68
commit 4524885a79
12 changed files with 29 additions and 190 deletions

View File

@ -34,9 +34,6 @@ class Anime extends AbstractType {
public array $genres = [];
/**
* @var string
*/
public string $id = '';
public array $included = [];

View File

@ -46,9 +46,6 @@ final class AnimeListItem extends AbstractType {
public int $rewatched = 0;
/**
* @var string|int
*/
public string|int $user_rating = '';
/**

View File

@ -24,9 +24,6 @@ final class Character extends AbstractType {
public ?string $description;
/**
* @var string
*/
public string $id;
public array $included = [];

View File

@ -19,10 +19,7 @@ namespace Aviat\AnimeClient\Types\Config;
use Aviat\AnimeClient\Types\AbstractType;
class Anilist extends AbstractType {
/**
* @var bool|string
*/
public $enabled = FALSE;
public bool|string $enabled = FALSE;
public ?string $client_id;
@ -30,10 +27,7 @@ class Anilist extends AbstractType {
public ?string $access_token;
/**
* @var int|string|null
*/
public $access_token_expires;
public int|string|null $access_token_expires;
public ?string $refresh_token;

View File

@ -23,10 +23,7 @@ class Cache extends AbstractType {
public ?string $host;
/**
* @var string|int|null
*/
public $port;
public string|int|null $port;
public ?string $database;

View File

@ -19,38 +19,18 @@ namespace Aviat\AnimeClient\Types\Config;
use Aviat\AnimeClient\Types\AbstractType;
class Database extends AbstractType {
/**
* @var string
*/
public string $type = 'sqlite';
/**
* @var string|null
*/
public ?string $host;
/**
* @var string|null
*/
public ?string $user;
/**
* @var string|null
*/
public ?string $pass;
/**
* @var string|int|null
*/
public $port;
public string|int|null $port;
/**
* @var string|null
*/
public ?string $database;
/**
* @var string|null
*/
public ?string $file;
}

View File

@ -20,14 +20,8 @@ namespace Aviat\AnimeClient\Types;
* Type representing an Anime object for display
*/
class FormItem extends AbstractType {
/**
* @var string|int
*/
public string|int $id;
/**
* @var string|int|null
*/
public string|int|null $mal_id;
public ?FormItemData $data;

View File

@ -24,32 +24,17 @@ class FormItemData extends AbstractType {
public ?bool $private = FALSE;
/**
* @var int
*/
public $progress;
public ?int $progress;
/**
* @var int
*/
public $rating;
public ?int $rating;
/**
* @var int
*/
public $ratingTwenty;
public ?int $ratingTwenty = NULL;
/**
* @var string|int
*/
public $reconsumeCount;
public string|int $reconsumeCount;
public bool $reconsuming = FALSE;
/**
* @var string
*/
public $status;
public string $status;
/**
* W3C Format Date string

View File

@ -20,60 +20,31 @@ namespace Aviat\AnimeClient\Types;
* Type representing an Anime object for display
*/
final class MangaListItem extends AbstractType {
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $mal_id;
public string $id;
/**
* @var array
*/
public $chapters = [
public ?string $mal_id;
public array $chapters = [
'read' => 0,
'total' => 0,
];
/**
* @var array
*/
public $volumes = [
public array $volumes = [
'read' => '-',
'total' => 0,
];
/**
* @var object
*/
public $manga;
public object $manga;
/**
* @var string
*/
public $reading_status;
public string $reading_status;
/**
* @var string
*/
public $notes;
public ?string $notes;
/**
* @var bool
*/
public $rereading;
public bool $rereading = false;
/**
* @var int
*/
public $reread;
public ?int $reread;
/**
* @var int
*/
public $user_rating;
public string|int|null $user_rating;
}

View File

@ -20,43 +20,19 @@ namespace Aviat\AnimeClient\Types;
* Type representing the manga represented by the list item
*/
final class MangaListItemDetail extends AbstractType {
/**
* @var array
*/
public $genres;
public array $genres = [];
/**
* @var string
*/
public $id;
public string $id;
/**
* @var string
*/
public $image;
public string $image;
/**
* @var string
*/
public $slug;
public string $slug;
/**
* @var string
*/
public $title;
public string $title;
/**
* @var array
*/
public $titles;
public array $titles;
/**
* @var string
*/
public $type;
public ?string $type;
/**
* @var string
*/
public $url;
public string $url;
}

View File

@ -22,74 +22,32 @@ use Aviat\AnimeClient\API\Kitsu\Enum\MangaPublishingStatus;
* Type representing an Anime object for display
*/
final class MangaPage extends AbstractType {
/**
* @var string|null
*/
public ?string $age_rating;
/**
* @var string|null
*/
public ?string $age_rating_guide;
/**
* @var array
*/
public array $characters;
/**
* @var int|null
*/
public ?int $chapter_count;
/**
* @var string|null
*/
public ?string $cover_image;
/**
* @var array
*/
public array $genres;
/**
* @var array
*/
public array $links;
/**
* @var string
*/
public string $id;
/**
* @var string
*/
public string $manga_type;
/**
* @var string
*/
public string $status = MangaPublishingStatus::FINISHED;
/**
* @var array
*/
public array $staff;
/**
* @var string
*/
public string $synopsis;
/**
* @var string
*/
public string $title;
/**
* @var array
*/
public array $titles;
/**
@ -97,13 +55,7 @@ final class MangaPage extends AbstractType {
*/
public array $titles_more;
/**
* @var string
*/
public string $url;
/**
* @var int|null
*/
public ?int $volume_count;
}

View File

@ -17,7 +17,6 @@
namespace Aviat\AnimeClient\Tests\Types;
use Aviat\AnimeClient\Types\Config;
use Aviat\AnimeClient\Types\UndefinedPropertyException;
class ConfigTest extends ConfigTestCase {
public function setUp(): void