Merge branch 'php74' of github.com:timw4mail/HummingBirdAnimeClient into php74
All checks were successful
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good

This commit is contained in:
Timothy Warren 2020-04-13 09:20:45 -04:00
commit dccdd62707
2 changed files with 13 additions and 13 deletions

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
{ {