Fix tests

This commit is contained in:
Timothy Warren 2022-03-03 13:52:06 -05:00
parent 496ba418c9
commit b6db0f5ab3
17 changed files with 71 additions and 70 deletions

View File

@ -22,15 +22,15 @@ class MediaListEntry extends AbstractType {
public int|string $id;
public ?string $notes = null;
public ?string $notes;
public ?bool $private = null;
public ?bool $private;
public int $progress;
public ?int $repeat = null;
public ?int $repeat;
public string $status;
public ?int $score = null;
public ?int $score;
}

View File

@ -22,45 +22,45 @@ use Aviat\AnimeClient\API\Kitsu\Enum\AnimeAiringStatus;
* Type representing an anime within a watch list
*/
class Anime extends AbstractType {
public ?string $age_rating = null;
public ?string $age_rating;
public ?string $age_rating_guide = null;
public ?string $age_rating_guide;
public ?string $cover_image = null;
public ?string $cover_image;
public ?int $episode_count = null;
public ?int $episode_count;
public ?int $episode_length = null;
public ?int $episode_length;
public array $genres = [];
public string $id = '';
public ?string $show_type = null;
public ?string $show_type;
public ?string $slug = null;
public ?string $slug;
public string $status = AnimeAiringStatus::FINISHED_AIRING;
public ?array $streaming_links = [];
public ?string $synopsis = null;
public ?string $synopsis;
public ?string $title = null;
public ?string $title;
public array $titles = [];
public array $titles_more = [];
public ?string $trailer_id = null;
public ?string $trailer_id;
/**
* Length of the entire series in seconds
*/
public ?int $total_length = null;
public ?int $total_length;
/**
* Kitsu detail page url
*/
public ?string $url = null;
public ?string $url;
}

View File

@ -20,9 +20,11 @@ namespace Aviat\AnimeClient\Types;
* Type representing an anime watch list item
*/
final class AnimeListItem extends AbstractType {
public ?string $id = null;
public ?string $id;
public ?string $mal_id = null;
public ?string $anilist_id;
public ?string $mal_id;
public array $episodes = [
'length' => 0,
@ -36,9 +38,9 @@ final class AnimeListItem extends AbstractType {
'ended' => '',
];
public ?Anime $anime = null;
public ?Anime $anime;
public ?string $notes = null;
public ?string $notes;
public bool $private = FALSE;

View File

@ -22,15 +22,15 @@ namespace Aviat\AnimeClient\Types;
final class Character extends AbstractType {
public array $castings = [];
public ?string $description = null;
public ?string $description;
public string $id;
public ?Media $media = null;
public ?Media $media;
public string $image;
public ?string $name = null;
public ?string $name;
public array $names = [];

View File

@ -45,27 +45,27 @@ class Config extends AbstractType {
* Default Anime list status page, values are listed in
* Aviat\AnimeClient\API\Enum\AnimeWatchingStatus\Title
*/
public ?string $default_anime_list_path = null;
public ?string $default_anime_list_path;
/**
* The list to redirect to from the root url
* 'anime' or 'manga'
*/
public ?string $default_list = null;
public ?string $default_list;
/**
* Default Manga list status page, values are listed in
* Aviat\AnimeClient\API\Enum\MangaReadingStatus\Title
*/
public ?string $default_manga_list_path = null;
public ?string $default_manga_list_path;
/**
* Default list view type
* 'cover_view' or 'list_view'
*/
public ?string $default_view_type = null;
public ?string $default_view_type;
public ?string $kitsu_username = null;
public ?string $kitsu_username;
public bool $secure_urls = TRUE;

View File

@ -21,15 +21,15 @@ use Aviat\AnimeClient\Types\AbstractType;
class Anilist extends AbstractType {
public bool|string $enabled = FALSE;
public ?string $client_id = null;
public ?string $client_id;
public ?string $client_secret = null;
public ?string $client_secret;
public ?string $access_token = null;
public ?string $access_token;
public int|string|null $access_token_expires;
public ?string $refresh_token = null;
public ?string $refresh_token;
public ?string $username = null;
public ?string $username;
}

View File

@ -21,13 +21,13 @@ use Aviat\AnimeClient\Types\AbstractType;
class Cache extends AbstractType {
public string $driver = 'null';
public ?string $host = null;
public ?string $host;
public string|int|null $port;
public ?string $database = null;
public ?string $database;
public array $connection = [];
public ?array $options = null;
public ?array $options;
}

View File

@ -22,15 +22,15 @@ class Database extends AbstractType {
public string $type = 'sqlite';
public ?string $host = null;
public ?string $host;
public ?string $user = null;
public ?string $user;
public ?string $pass = null;
public ?string $pass;
public string|int|null $port;
public ?string $database = null;
public ?string $database;
public ?string $file = null;
public ?string $file;
}

View File

@ -24,7 +24,7 @@ class FormItem extends AbstractType {
public string|int|null $mal_id;
public ?FormItemData $data = null;
public ?FormItemData $data;
public function setData(mixed $value): void
{

View File

@ -20,13 +20,13 @@ namespace Aviat\AnimeClient\Types;
* Type representing a Media object for editing/syncing
*/
class FormItemData extends AbstractType {
public ?string $notes = null;
public ?string $notes;
public ?bool $private = FALSE;
public ?int $progress = NULL;
public ?int $rating = null;
public ?int $rating;
public ?int $ratingTwenty = NULL;
@ -39,5 +39,5 @@ class FormItemData extends AbstractType {
/**
* W3C Format Date string
*/
public ?string $updatedAt = null;
public ?string $updatedAt;
}

View File

@ -23,7 +23,9 @@ final class MangaListItem extends AbstractType {
public string $id;
public ?string $mal_id = null;
public ?string $anilist_id;
public ?string $mal_id;
public array $chapters = [
'read' => 0,
@ -39,11 +41,11 @@ final class MangaListItem extends AbstractType {
public string $reading_status;
public ?string $notes = null;
public ?string $notes;
public bool $rereading = false;
public ?int $reread = null;
public ?int $reread;
public string|int|null $user_rating;
}

View File

@ -32,7 +32,7 @@ final class MangaListItemDetail extends AbstractType {
public array $titles;
public ?string $type = null;
public ?string $type;
public string $url;
}

View File

@ -22,15 +22,15 @@ use Aviat\AnimeClient\API\Kitsu\Enum\MangaPublishingStatus;
* Type representing an Anime object for display
*/
final class MangaPage extends AbstractType {
public ?string $age_rating = null;
public ?string $age_rating;
public ?string $age_rating_guide = null;
public ?string $age_rating_guide;
public array $characters;
public ?int $chapter_count = null;
public ?int $chapter_count;
public ?string $cover_image = null;
public ?string $cover_image;
public array $genres;
@ -57,5 +57,5 @@ final class MangaPage extends AbstractType {
public string $url;
public ?int $volume_count = null;
public ?int $volume_count;
}

View File

@ -23,13 +23,13 @@ final class Person extends AbstractType {
public string $id;
public ?string $name = null;
public ?string $name;
public string $image;
public array $names = [];
public ?string $description = null;
public ?string $description;
public array $characters = [];

View File

@ -20,21 +20,21 @@ namespace Aviat\AnimeClient\Types;
* Type representing a Kitsu user for display
*/
final class User extends AbstractType {
public ?string $about = null;
public ?string $about;
public ?string $avatar = null;
public ?string $avatar;
public ?array $favorites = null;
public ?array $favorites;
public ?string $location = null;
public ?string $location;
public ?string $name = null;
public ?string $name;
public ?string $slug = null;
public ?string $slug;
public ?array $stats = null;
public ?array $stats;
public ?array $waifu = null;
public ?array $waifu;
public ?string $website = null;
public ?string $website;
}

View File

@ -17,12 +17,11 @@
namespace Aviat\Ion\Di\Exception;
use Exception;
use Psr\Container\ContainerExceptionInterface;
/**
* Generic exception for Di Container
*/
class ContainerException extends Exception implements ContainerExceptionInterface {
class ContainerException extends Exception {
}

View File

@ -16,13 +16,11 @@
namespace Aviat\Ion\Di\Exception;
use Psr\Container\NotFoundExceptionInterface;
/**
* Exception for Di Container when trying to access a
* key that doesn't exist in the container
*/
class NotFoundException extends ContainerException implements NotFoundExceptionInterface {
class NotFoundException extends ContainerException {
}