diff --git a/.gitignore b/.gitignore index 6df236f2..f4581bc8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.php_cs.cache +.php-cs-fixer.cache .phpunit.result.cache composer.lock composer.phar diff --git a/.php_cs b/.php-cs-fixer.php similarity index 84% rename from .php_cs rename to .php-cs-fixer.php index 8527a007..0662d9e6 100644 --- a/.php_cs +++ b/.php-cs-fixer.php @@ -7,8 +7,8 @@ ]) ; -return PhpCsFixer\Config::create() - ->setRules([ +$config = new PhpCsFixer\Config(); +return $config->setRules([ '@Symfony' => true, 'array_syntax' => ['syntax' => 'short'], diff --git a/composer.json b/composer.json index 684cd01a..fab8e39a 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "psr/http-factory": "^1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.0", + "friendsofphp/php-cs-fixer": "^3.0", "phpunit/phpunit": "^9.5", "guzzlehttp/psr7": "^2.0", "php-mock/php-mock-phpunit": "^2.6" diff --git a/src/Redmine/Api/Issue.php b/src/Redmine/Api/Issue.php index 10a8b68d..78418786 100644 --- a/src/Redmine/Api/Issue.php +++ b/src/Redmine/Api/Issue.php @@ -11,11 +11,11 @@ */ class Issue extends AbstractApi { - const PRIO_LOW = 1; - const PRIO_NORMAL = 2; - const PRIO_HIGH = 3; - const PRIO_URGENT = 4; - const PRIO_IMMEDIATE = 5; + public const PRIO_LOW = 1; + public const PRIO_NORMAL = 2; + public const PRIO_HIGH = 3; + public const PRIO_URGENT = 4; + public const PRIO_IMMEDIATE = 5; /** * List issues. diff --git a/tests/Unit/Client/NativeCurlClientTest.php b/tests/Unit/Client/NativeCurlClientTest.php index 904fd61c..612f2235 100644 --- a/tests/Unit/Client/NativeCurlClientTest.php +++ b/tests/Unit/Client/NativeCurlClientTest.php @@ -16,9 +16,9 @@ class NativeCurlClientTest extends TestCase { use PHPMock; - const __NAMESPACE__ = 'Redmine\Client'; + public const __NAMESPACE__ = 'Redmine\Client'; - const DEFAULT_CURL_OPTIONS = [ + public const DEFAULT_CURL_OPTIONS = [ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_PORT => 80, CURLOPT_URL => 'http://test.local/path',