Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
12 changed files with 29 additions and 190 deletions
Showing only changes of commit 4524885a79 - Show all commits

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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