From ee4a42ea0689ba965772f6a25cc142ff68ec8d1d Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Tue, 21 Nov 2017 17:41:21 +0100 Subject: [PATCH] Replace alias functions with origin functions --- src/Endpoints/Zones.php | 2 +- tests/Auth/APIKeyTest.php | 2 +- tests/Auth/UserServiceKeyTest.php | 2 +- tests/Configurations/ConfigurationsUARulesTest.php | 2 +- tests/Configurations/PageRulesTargetTest.php | 2 +- tests/Configurations/ZoneLockdownTest.php | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Endpoints/Zones.php b/src/Endpoints/Zones.php index c06fd27..90427d7 100644 --- a/src/Endpoints/Zones.php +++ b/src/Endpoints/Zones.php @@ -96,7 +96,7 @@ class Zones implements API { $zones = $this->listZones($name); - if (sizeof($zones->result) < 1) { + if (count($zones->result) < 1) { throw new EndpointException('Could not find zones with specified name.'); } diff --git a/tests/Auth/APIKeyTest.php b/tests/Auth/APIKeyTest.php index 039f71a..6e7768b 100644 --- a/tests/Auth/APIKeyTest.php +++ b/tests/Auth/APIKeyTest.php @@ -18,6 +18,6 @@ class APIKeyTest extends TestCase $this->assertEquals('example@example.com', $headers['X-Auth-Email']); $this->assertEquals('1234567893feefc5f0q5000bfo0c38d90bbeb', $headers['X-Auth-Key']); - $this->assertEquals(2, sizeof($headers)); + $this->assertEquals(2, count($headers)); } } diff --git a/tests/Auth/UserServiceKeyTest.php b/tests/Auth/UserServiceKeyTest.php index 48b1893..f746785 100644 --- a/tests/Auth/UserServiceKeyTest.php +++ b/tests/Auth/UserServiceKeyTest.php @@ -19,6 +19,6 @@ class UserServiceKeyTest extends TestCase $headers['X-Auth-User-Service-Key'] ); - $this->assertEquals(1, sizeof($headers)); + $this->assertEquals(1, count($headers)); } } diff --git a/tests/Configurations/ConfigurationsUARulesTest.php b/tests/Configurations/ConfigurationsUARulesTest.php index c9a6301..a2fe0a1 100644 --- a/tests/Configurations/ConfigurationsUARulesTest.php +++ b/tests/Configurations/ConfigurationsUARulesTest.php @@ -14,7 +14,7 @@ class ConfigurationsUARulesTest extends TestCase $configuration->addUA('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4'); $array = $configuration->getArray(); - $this->assertEquals(1, sizeof($array)); + $this->assertEquals(1, count($array)); $this->assertObjectHasAttribute('target', $array[0]); $this->assertEquals('ua', $array[0]->target); diff --git a/tests/Configurations/PageRulesTargetTest.php b/tests/Configurations/PageRulesTargetTest.php index dbae7aa..fcf2a51 100644 --- a/tests/Configurations/PageRulesTargetTest.php +++ b/tests/Configurations/PageRulesTargetTest.php @@ -15,7 +15,7 @@ class PageRulesTargetTest extends TestCase $targets = new PageRulesTargets('junade.com/*'); $array = $targets->getArray(); - $this->assertEquals(1, sizeof($array)); + $this->assertEquals(1, count($array)); $this->assertEquals('junade.com/*', $array[0]->constraint->value); $this->assertEquals('matches', $array[0]->constraint->operator); } diff --git a/tests/Configurations/ZoneLockdownTest.php b/tests/Configurations/ZoneLockdownTest.php index 96ee1a8..dd37165 100644 --- a/tests/Configurations/ZoneLockdownTest.php +++ b/tests/Configurations/ZoneLockdownTest.php @@ -14,7 +14,7 @@ class ConfigurationZoneLockdownTest extends TestCase $configuration->addIP('1.2.3.4'); $array = $configuration->getArray(); - $this->assertEquals(1, sizeof($array)); + $this->assertEquals(1, count($array)); $this->assertObjectHasAttribute('target', $array[0]); $this->assertEquals('ip', $array[0]->target); @@ -24,7 +24,7 @@ class ConfigurationZoneLockdownTest extends TestCase $configuration->addIPRange('1.2.3.4/24'); $array = $configuration->getArray(); - $this->assertEquals(2, sizeof($array)); + $this->assertEquals(2, count($array)); $this->assertObjectHasAttribute('target', $array[1]); $this->assertEquals('ip_range', $array[1]->target);