From f48b16601144401224868651e73fecb5cb41255d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 8 Feb 2023 16:53:50 +0100 Subject: [PATCH] Enhancement: Enable and configure visibility_required fixer (#1436) --- .php-cs-fixer.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index f58457755..28745d70d 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -49,8 +49,13 @@ // needs to be a raw `StripeObject`. 'self_accessor' => false, - // Visibility annotations are not supported by php5.6 - 'visibility_required' => false, + // Visibility for constants requires PHP 7.1, but we support PHP 5.6 + 'visibility_required' => [ + 'elements' => [ + 'method', + 'property', + ], + ], // Apparently "uninitialized" is distinct from "null" in some versions of PHP // so I am defensively disabling this rule so as to not cause breaking changes