Partially fix broken tests
This commit is contained in:
parent
3ca606d6f5
commit
818fcf114d
@ -37,7 +37,7 @@ abstract class AbstractType implements ArrayAccess, Countable {
|
||||
* @param array $data
|
||||
* @return array|null
|
||||
*/
|
||||
final public static function check($data = []): ?array
|
||||
final public static function check(array $data = []): ?array
|
||||
{
|
||||
$currentClass = static::class;
|
||||
|
||||
@ -199,7 +199,7 @@ abstract class AbstractType implements ArrayAccess, Countable {
|
||||
*/
|
||||
final public function count(): int
|
||||
{
|
||||
$keys = array_keys((array)$this->toArray());
|
||||
$keys = array_keys($this->toArray());
|
||||
return count($keys);
|
||||
}
|
||||
|
||||
@ -224,7 +224,7 @@ abstract class AbstractType implements ArrayAccess, Countable {
|
||||
*/
|
||||
final public function isEmpty(): bool
|
||||
{
|
||||
$self = (array)$this->toArray();
|
||||
$self = $this->toArray();
|
||||
foreach ($self as $value)
|
||||
{
|
||||
if ( ! empty($value))
|
||||
|
@ -36,8 +36,6 @@ class Anime extends AbstractType {
|
||||
|
||||
public string $id = '';
|
||||
|
||||
public array $included = [];
|
||||
|
||||
public ?string $show_type;
|
||||
|
||||
public ?string $slug;
|
||||
|
@ -26,8 +26,6 @@ final class Character extends AbstractType {
|
||||
|
||||
public string $id;
|
||||
|
||||
public array $included = [];
|
||||
|
||||
public ?Media $media;
|
||||
|
||||
public ?string $name;
|
||||
|
@ -6,6 +6,7 @@ data:
|
||||
notes: ''
|
||||
private: true
|
||||
progress: 12
|
||||
ratingTwenty: null
|
||||
reconsumeCount: 0
|
||||
reconsuming: true
|
||||
status: current
|
||||
|
Loading…
Reference in New Issue
Block a user