From b15b3a116daa1c992bc7668ea7d59dc5a401b619 Mon Sep 17 00:00:00 2001 From: Menno Holtkamp Date: Mon, 10 Jul 2017 18:39:48 +0200 Subject: [PATCH 1/2] Add PHP-CS-fixer --- composer.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/composer.json b/composer.json index 8ccf4eb..2011040 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,7 @@ ], "require": {}, "require-dev": { + "friendsofphp/php-cs-fixer": "@stable", "phpunit/phpunit": "< 6", "satooshi/php-coveralls": "dev-master" }, @@ -19,5 +20,13 @@ "psr-4": { "Cloudflare\\": "src/CloudFlare" } + }, + "scripts": { + "phpcs": [ + "./vendor/bin/php-cs-fixer --verbose fix --dry-run --using-cache=no src" + ], + "phpcs-fix": [ + "./vendor/bin/php-cs-fixer --verbose fix --using-cache=no src" + ] } } From 37057a3f9a54e41c83819e7b098de834a57debff Mon Sep 17 00:00:00 2001 From: Menno Holtkamp Date: Mon, 10 Jul 2017 18:42:34 +0200 Subject: [PATCH 2/2] Add missing PHPDoc parameters --- composer.json | 4 ++-- src/CloudFlare/Certificates.php | 3 +++ src/CloudFlare/Organizations/LoadBalancers/Pools.php | 1 + src/CloudFlare/User.php | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 2011040..6de4c51 100644 --- a/composer.json +++ b/composer.json @@ -23,10 +23,10 @@ }, "scripts": { "phpcs": [ - "./vendor/bin/php-cs-fixer --verbose fix --dry-run --using-cache=no src" + "./vendor/bin/php-cs-fixer --verbose --rules=phpdoc_add_missing_param_annotation fix --dry-run --using-cache=no src" ], "phpcs-fix": [ - "./vendor/bin/php-cs-fixer --verbose fix --using-cache=no src" + "./vendor/bin/php-cs-fixer --verbose --rules=phpdoc_add_missing_param_annotation fix --using-cache=no src" ] } } diff --git a/src/CloudFlare/Certificates.php b/src/CloudFlare/Certificates.php index c4ece74..4705c76 100644 --- a/src/CloudFlare/Certificates.php +++ b/src/CloudFlare/Certificates.php @@ -20,6 +20,9 @@ class Certificates extends Api * List Certificates * List all existing CloudFlare-issued Certificates for a given zone. Use your Certificates API Key as your * User Service Key when calling this endpoint + * @param null|mixed $page + * @param null|mixed $per_page + * @param null|mixed $direction */ public function certificates($page = null, $per_page = null, $direction = null) { diff --git a/src/CloudFlare/Organizations/LoadBalancers/Pools.php b/src/CloudFlare/Organizations/LoadBalancers/Pools.php index 8f95714..c3fa667 100644 --- a/src/CloudFlare/Organizations/LoadBalancers/Pools.php +++ b/src/CloudFlare/Organizations/LoadBalancers/Pools.php @@ -107,6 +107,7 @@ public function update($organization_identifier, $identifier, $name, $origins, $ * Delete a pool * Delete a configured pool * + * @param string $organization_identifier * @param string $identifier */ public function delete_pool($organization_identifier, $identifier) diff --git a/src/CloudFlare/User.php b/src/CloudFlare/User.php index 642b473..aa8b9f4 100644 --- a/src/CloudFlare/User.php +++ b/src/CloudFlare/User.php @@ -133,6 +133,7 @@ public function finalize_two_factor_authentication($auth_token) * Disable two-factor authentication for your CloudFlare user account * * @param int The token provided by the two-factor authenticator + * @param mixed $auth_token */ public function disable_two_factor_authentication($auth_token) {