From 9955166ae8641a6255c84b239ff0c08338c8dcff Mon Sep 17 00:00:00 2001 From: Phil Young Date: Tue, 15 Jun 2021 00:56:23 +0100 Subject: [PATCH] Tidy Up Longer Method/Function Signatures/Calls I've added a few new parameters which has made these lines rather long --- src/Endpoints/CustomHostnames.php | 14 ++++++++++++-- tests/Endpoints/CustomHostnamesTest.php | 13 ++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/Endpoints/CustomHostnames.php b/src/Endpoints/CustomHostnames.php index 8846c06..6e4281e 100644 --- a/src/Endpoints/CustomHostnames.php +++ b/src/Endpoints/CustomHostnames.php @@ -38,8 +38,18 @@ class CustomHostnames implements API * @param string $customCertificate * @return \stdClass */ - public function addHostname(string $zoneID, string $hostname, string $sslMethod = 'http', string $sslType = 'dv', array $sslSettings = [], string $customOriginServer = '', bool $wildcard = false, string $bundleMethod = '', string $customKey = '', string $customCertificate = ''): \stdClass - { + public function addHostname( + string $zoneID, + string $hostname, + string $sslMethod = 'http', + string $sslType = 'dv', + array $sslSettings = [], + string $customOriginServer = '', + bool $wildcard = false, + string $bundleMethod = '', + string $customKey = '', + string $customCertificate = '' + ): \stdClass { $options = [ 'hostname' => $hostname, 'ssl' => [ diff --git a/tests/Endpoints/CustomHostnamesTest.php b/tests/Endpoints/CustomHostnamesTest.php index 4cfd971..5c19ccf 100644 --- a/tests/Endpoints/CustomHostnamesTest.php +++ b/tests/Endpoints/CustomHostnamesTest.php @@ -101,7 +101,18 @@ CERTIFICATE; 'http3' => 'on', 'min_tls_version' => '1.2' ]; - $hostname->addHostname('023e105f4ecef8ad9ca31a8372d0c353', 'app.example.com', 'http', 'dv', $sslSettings, 'origin.example.com', true, 'optimal', $customKey, $customCertificate); + $hostname->addHostname( + '023e105f4ecef8ad9ca31a8372d0c353', + 'app.example.com', + 'http', + 'dv', + $sslSettings, + 'origin.example.com', + true, + 'optimal', + $customKey, + $customCertificate + ); $this->assertEquals('0d89c70d-ad9f-4843-b99f-6cc0252067e9', $hostname->getBody()->result->id); }