Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
3 changed files with 14 additions and 14 deletions
Showing only changes of commit 2d7d511ab1 - Show all commits

View File

@ -50,7 +50,7 @@
"laminas/laminas-httphandlerrunner": "^1.0", "laminas/laminas-httphandlerrunner": "^1.0",
"maximebf/consolekit": "^1.0", "maximebf/consolekit": "^1.0",
"monolog/monolog": "^2.0.1", "monolog/monolog": "^2.0.1",
"php": "^7.4 || ^8", "php": ">=7.4",
"psr/container": "~1.0", "psr/container": "~1.0",
"psr/http-message": "~1.0", "psr/http-message": "~1.0",
"psr/log": "~1.0", "psr/log": "~1.0",

View File

@ -20,17 +20,17 @@ use PDO;
class RequirementsTest extends AnimeClientTestCase { class RequirementsTest extends AnimeClientTestCase {
public function testPHPVersion() public function testPHPVersion(): void
{ {
$this->assertTrue(version_compare(PHP_VERSION, "5.4", "ge")); $this->assertTrue(version_compare(PHP_VERSION, "5.4", "ge"));
} }
public function testHasPDO() public function testHasPDO(): void
{ {
$this->assertTrue(class_exists('PDO')); $this->assertTrue(class_exists('PDO'));
} }
public function testHasPDOSqlite() public function testHasPDOSqlite(): void
{ {
$drivers = PDO::getAvailableDrivers(); $drivers = PDO::getAvailableDrivers();
$this->assertTrue(in_array('sqlite', $drivers)); $this->assertTrue(in_array('sqlite', $drivers));

View File

@ -32,24 +32,24 @@ class TestEnum extends Enum {
} }
class FriendGrandParentTestClass { class FriendGrandParentTestClass {
protected $grandParentProtected = 84; protected int $grandParentProtected = 84;
} }
class FriendParentTestClass extends FriendGrandParentTestClass { class FriendParentTestClass extends FriendGrandParentTestClass {
protected $parentProtected = 47; protected int $parentProtected = 47;
private $parentPrivate = 654; private int $parentPrivate = 654;
} }
class FriendTestClass extends FriendParentTestClass { class FriendTestClass extends FriendParentTestClass {
protected $protected = 356; protected int $protected = 356;
private $private = 486; private int $private = 486;
protected function getProtected() protected function getProtected(): int
{ {
return 4; return 4;
} }
private function getPrivate() private function getPrivate(): int
{ {
return 23; return 23;
} }
@ -57,7 +57,7 @@ class FriendTestClass extends FriendParentTestClass {
class TestTransformer extends AbstractTransformer { class TestTransformer extends AbstractTransformer {
public function transform($item) public function transform($item): array
{ {
$out = []; $out = [];
$genre_list = (array) $item; $genre_list = (array) $item;
@ -95,7 +95,7 @@ trait MockViewOutputTrait {
} }
class MockUtil { class MockUtil {
public function get_cached_image($api_path, $series_slug, $type = "anime") public function get_cached_image($api_path, $series_slug, $type = "anime"): string
{ {
return "/public/images/{$type}/{$series_slug}.jpg"; return "/public/images/{$type}/{$series_slug}.jpg";
} }
@ -144,7 +144,7 @@ trait MockInjectionTrait {
class MockBaseApiModel extends BaseApiModel { class MockBaseApiModel extends BaseApiModel {
use MockInjectionTrait; use MockInjectionTrait;
protected $base_url = 'https://httpbin.org/'; protected string $base_url = 'https://httpbin.org/';
protected function _get_list_from_api(string $status): array protected function _get_list_from_api(string $status): array
{ {