diff --git a/.php_cs.dist b/.php_cs.dist index ebef7f8b1..322c9ab88 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -6,6 +6,7 @@ return PhpCsFixer\Config::create() '@PHP56Migration:risky' => true, '@PHPUnit57Migration:risky' => true, '@PSR2' => true, + 'align_multiline_comment' => true, 'array_syntax' => ['syntax' => 'short'], 'blank_line_after_opening_tag' => true, 'class_attributes_separation' => [ @@ -13,6 +14,8 @@ return PhpCsFixer\Config::create() ], 'linebreak_after_opening_tag' => true, 'native_function_invocation' => true, + 'no_blank_lines_after_phpdoc' => true, + 'no_empty_phpdoc' => true, 'phpdoc_add_missing_param_annotation' => true, 'phpdoc_indent' => true, 'phpdoc_inline_tag' => true, @@ -20,10 +23,12 @@ return PhpCsFixer\Config::create() 'phpdoc_no_alias_tag' => true, 'phpdoc_no_empty_return' => true, 'phpdoc_no_useless_inheritdoc' => true, + 'phpdoc_order' => true, 'phpdoc_return_self_reference' => true, 'phpdoc_scalar' => true, 'phpdoc_separation' => true, 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_to_comment' => true, 'phpdoc_trim' => true, 'phpdoc_trim_consecutive_blank_line_separation' => true, 'phpdoc_types' => true, diff --git a/lib/ApiRequestor.php b/lib/ApiRequestor.php index 9c7475e90..ed4783286 100644 --- a/lib/ApiRequestor.php +++ b/lib/ApiRequestor.php @@ -102,9 +102,9 @@ private static function _encodeObjects($d) * @param array|null $params * @param array|null $headers * - * @return array tuple containing (ApiReponse, API key) - * * @throws Exception\ApiErrorException + * + * @return array tuple containing (ApiReponse, API key) */ public function request($method, $url, $params = null, $headers = null) { @@ -295,10 +295,10 @@ private static function _defaultHeaders($apiKey, $clientInfo = null) * @param array $params * @param array $headers * - * @return array - * * @throws Exception\AuthenticationException * @throws Exception\ApiConnectionException + * + * @return array */ private function _requestRaw($method, $url, $params, $headers) { @@ -384,9 +384,9 @@ private function _requestRaw($method, $url, $params, $headers) /** * @param resource $resource * - * @return \CURLFile|string - * * @throws Exception\InvalidArgumentException + * + * @return \CURLFile|string */ private function _processResourceParam($resource) { @@ -412,10 +412,10 @@ private function _processResourceParam($resource) * @param int $rcode * @param array $rheaders * - * @return array - * * @throws Exception\UnexpectedValueException * @throws Exception\ApiErrorException + * + * @return array */ private function _interpretResponse($rbody, $rcode, $rheaders) { diff --git a/lib/ApiResource.php b/lib/ApiResource.php index a62f844dc..174344fca 100644 --- a/lib/ApiResource.php +++ b/lib/ApiResource.php @@ -48,9 +48,9 @@ public function __set($k, $v) } /** - * @return ApiResource The refreshed resource. - * * @throws Exception\ApiErrorException + * + * @return ApiResource The refreshed resource. */ public function refresh() { diff --git a/lib/Webhook.php b/lib/Webhook.php index a34771fa8..4369147e4 100644 --- a/lib/Webhook.php +++ b/lib/Webhook.php @@ -19,10 +19,10 @@ abstract class Webhook * @param int $tolerance maximum difference allowed between the header's * timestamp and the current time * - * @return Event the Event instance - * * @throws Exception\UnexpectedValueException if the payload is not valid JSON, * @throws Exception\SignatureVerificationException if the verification fails. + * + * @return Event the Event instance */ public static function constructEvent($payload, $sigHeader, $secret, $tolerance = self::DEFAULT_TOLERANCE) {