From 45cb8ee539961c066617b0a5d3fc943896c3499b Mon Sep 17 00:00:00 2001 From: Darin Randal Date: Tue, 23 Jan 2018 09:57:14 -0500 Subject: [PATCH 1/4] Fix name of jumpstart zone add option to jump_start --- src/Endpoints/Zones.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Endpoints/Zones.php b/src/Endpoints/Zones.php index c58f529..4b20deb 100644 --- a/src/Endpoints/Zones.php +++ b/src/Endpoints/Zones.php @@ -23,15 +23,15 @@ class Zones implements API * @SuppressWarnings(PHPMD.BooleanArgumentFlag) * * @param string $name - * @param bool $jumpstart + * @param bool $jump_start * @param string $organizationID * @return \stdClass */ - public function addZone(string $name, bool $jumpstart = false, string $organizationID = ''): \stdClass + public function addZone(string $name, bool $jump_start = false, string $organizationID = ''): \stdClass { $options = [ 'name' => $name, - 'jumpstart' => $jumpstart + 'jump_start' => $jump_start ]; if (!empty($organizationID)) { From fe854e1b215ec19aeb9b0b01686103eb37469e22 Mon Sep 17 00:00:00 2001 From: Darin Randal Date: Tue, 23 Jan 2018 10:01:51 -0500 Subject: [PATCH 2/4] Update zone tests to reflect correctly named jumpstart option --- tests/Endpoints/ZonesTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Endpoints/ZonesTest.php b/tests/Endpoints/ZonesTest.php index e0bb396..aceef12 100644 --- a/tests/Endpoints/ZonesTest.php +++ b/tests/Endpoints/ZonesTest.php @@ -20,7 +20,7 @@ class ZonesTest extends TestCase ->with( $this->equalTo('zones'), $this->equalTo([]), - $this->equalTo(['name' => 'example.com', 'jumpstart' => false]) + $this->equalTo(['name' => 'example.com', 'jump_start' => false]) ); $zones = new \Cloudflare\API\Endpoints\Zones($mock); @@ -41,7 +41,7 @@ class ZonesTest extends TestCase $this->equalTo([]), $this->equalTo([ 'name' => 'example.com', - 'jumpstart' => true, + 'jump_start' => true, 'organization' => (object)['id' => '01a7362d577a6c3019a474fd6f485823'] ]) ); From 0112425a6171899d6722443552744851c0f17d65 Mon Sep 17 00:00:00 2001 From: Darin Randal Date: Tue, 23 Jan 2018 10:08:40 -0500 Subject: [PATCH 3/4] Rename $jump_start to $jumpStart to follow camelCase conventions for variables --- src/Endpoints/Zones.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Endpoints/Zones.php b/src/Endpoints/Zones.php index 4b20deb..2e91a80 100644 --- a/src/Endpoints/Zones.php +++ b/src/Endpoints/Zones.php @@ -27,11 +27,11 @@ class Zones implements API * @param string $organizationID * @return \stdClass */ - public function addZone(string $name, bool $jump_start = false, string $organizationID = ''): \stdClass + public function addZone(string $name, bool $jumpStart = false, string $organizationID = ''): \stdClass { $options = [ 'name' => $name, - 'jump_start' => $jump_start + 'jump_start' => $jumpStart ]; if (!empty($organizationID)) { From a628cac283e25ac7d62533fe114e23419c95dcc2 Mon Sep 17 00:00:00 2001 From: Darin Randal Date: Tue, 23 Jan 2018 10:09:36 -0500 Subject: [PATCH 4/4] Update phpdoc to match camelCase variable --- src/Endpoints/Zones.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Endpoints/Zones.php b/src/Endpoints/Zones.php index 2e91a80..ec85f28 100644 --- a/src/Endpoints/Zones.php +++ b/src/Endpoints/Zones.php @@ -23,7 +23,7 @@ class Zones implements API * @SuppressWarnings(PHPMD.BooleanArgumentFlag) * * @param string $name - * @param bool $jump_start + * @param bool $jumpStart * @param string $organizationID * @return \stdClass */