mirror of
https://github.com/elyby/php-code-style.git
synced 2025-05-31 14:12:05 +05:30
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
08483a26e2 | |||
3d5d40b2b7 | |||
e617efc11c | |||
a6d1aa7265 | |||
3ab60f5bd5 | |||
06a37576ee | |||
95e0f0f702 |
10
.travis.yml
10
.travis.yml
@ -3,7 +3,7 @@ php:
|
||||
- '7.0'
|
||||
- '7.1'
|
||||
- '7.2'
|
||||
- nightly
|
||||
- '7.3'
|
||||
|
||||
cache:
|
||||
directories:
|
||||
@ -25,11 +25,11 @@ stages:
|
||||
jobs:
|
||||
include:
|
||||
- stage: Static Code Analysis
|
||||
php: 7.2
|
||||
php: 7.3
|
||||
script:
|
||||
- vendor/bin/php-cs-fixer fix -v --dry-run
|
||||
- stage: Test
|
||||
script:
|
||||
- vendor/bin/phpunit
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
|
||||
script:
|
||||
- vendor/bin/phpunit
|
||||
|
@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.2.1] - 2019-02-22
|
||||
### Fixed
|
||||
- Compatibility with the `friendsofphp/php-cs-fixer` version 2.13.3 and above.
|
||||
|
||||
## [0.2.0] - 2018-08-08
|
||||
### Added
|
||||
- Enh #4: `Ely\remove_class_name_method_usages` fixer.
|
||||
|
@ -34,7 +34,7 @@
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "7.0.0"
|
||||
"php": "7.0.8"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
204
composer.lock
generated
204
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "70eecd9b529cd72627b990072a7e0ff5",
|
||||
"content-hash": "80849b188628ffdf06b4ffc4be3edb84",
|
||||
"packages": [
|
||||
{
|
||||
"name": "composer/semver",
|
||||
@ -70,16 +70,16 @@
|
||||
},
|
||||
{
|
||||
"name": "composer/xdebug-handler",
|
||||
"version": "1.1.0",
|
||||
"version": "1.3.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/xdebug-handler.git",
|
||||
"reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08"
|
||||
"reference": "d17708133b6c276d6e42ef887a877866b909d892"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/c919dc6c62e221fc6406f861ea13433c0aa24f08",
|
||||
"reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08",
|
||||
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/d17708133b6c276d6e42ef887a877866b909d892",
|
||||
"reference": "d17708133b6c276d6e42ef887a877866b909d892",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -110,7 +110,7 @@
|
||||
"Xdebug",
|
||||
"performance"
|
||||
],
|
||||
"time": "2018-04-11T15:42:36+00:00"
|
||||
"time": "2019-01-28T20:25:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/annotations",
|
||||
@ -236,27 +236,27 @@
|
||||
},
|
||||
{
|
||||
"name": "friendsofphp/php-cs-fixer",
|
||||
"version": "v2.12.2",
|
||||
"version": "v2.14.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
|
||||
"reference": "dcc87d5414e9d0bd316fce81a5bedb9ce720b183"
|
||||
"reference": "ff401e58261ffc5934a58f795b3f95b355e276cb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/dcc87d5414e9d0bd316fce81a5bedb9ce720b183",
|
||||
"reference": "dcc87d5414e9d0bd316fce81a5bedb9ce720b183",
|
||||
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/ff401e58261ffc5934a58f795b3f95b355e276cb",
|
||||
"reference": "ff401e58261ffc5934a58f795b3f95b355e276cb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer/semver": "^1.4",
|
||||
"composer/xdebug-handler": "^1.0",
|
||||
"composer/xdebug-handler": "^1.2",
|
||||
"doctrine/annotations": "^1.2",
|
||||
"ext-json": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"php": "^5.6 || >=7.0 <7.3",
|
||||
"php": "^5.6 || ^7.0",
|
||||
"php-cs-fixer/diff": "^1.3",
|
||||
"symfony/console": "^3.2 || ^4.0",
|
||||
"symfony/console": "^3.4.17 || ^4.1.6",
|
||||
"symfony/event-dispatcher": "^3.0 || ^4.0",
|
||||
"symfony/filesystem": "^3.0 || ^4.0",
|
||||
"symfony/finder": "^3.0 || ^4.0",
|
||||
@ -266,13 +266,10 @@
|
||||
"symfony/process": "^3.0 || ^4.0",
|
||||
"symfony/stopwatch": "^3.0 || ^4.0"
|
||||
},
|
||||
"conflict": {
|
||||
"hhvm": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0",
|
||||
"justinrainbow/json-schema": "^5.0",
|
||||
"keradus/cli-executor": "^1.1",
|
||||
"keradus/cli-executor": "^1.2",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"php-cs-fixer/accessible-object": "^1.0",
|
||||
@ -323,7 +320,7 @@
|
||||
}
|
||||
],
|
||||
"description": "A tool to automatically fix PHP code style",
|
||||
"time": "2018-07-06T10:37:40+00:00"
|
||||
"time": "2019-02-17T17:44:13+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
@ -423,16 +420,16 @@
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
|
||||
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
|
||||
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -466,49 +463,52 @@
|
||||
"psr",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2016-10-10T12:19:37+00:00"
|
||||
"time": "2018-11-20T15:27:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v3.3.6",
|
||||
"version": "v3.4.22",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "b0878233cb5c4391347e5495089c7af11b8e6201"
|
||||
"reference": "069bf3f0e8f871a2169a06e43d9f3f03f355e9be"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/b0878233cb5c4391347e5495089c7af11b8e6201",
|
||||
"reference": "b0878233cb5c4391347e5495089c7af11b8e6201",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/069bf3f0e8f871a2169a06e43d9f3f03f355e9be",
|
||||
"reference": "069bf3f0e8f871a2169a06e43d9f3f03f355e9be",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.9",
|
||||
"symfony/debug": "~2.8|~3.0",
|
||||
"php": "^5.5.9|>=7.0.8",
|
||||
"symfony/debug": "~2.8|~3.0|~4.0",
|
||||
"symfony/polyfill-mbstring": "~1.0"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/dependency-injection": "<3.3"
|
||||
"symfony/dependency-injection": "<3.4",
|
||||
"symfony/process": "<3.3"
|
||||
},
|
||||
"provide": {
|
||||
"psr/log-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/log": "~1.0",
|
||||
"symfony/config": "~3.3",
|
||||
"symfony/dependency-injection": "~3.3",
|
||||
"symfony/event-dispatcher": "~2.8|~3.0",
|
||||
"symfony/filesystem": "~2.8|~3.0",
|
||||
"symfony/http-kernel": "~2.8|~3.0",
|
||||
"symfony/process": "~2.8|~3.0"
|
||||
"symfony/config": "~3.3|~4.0",
|
||||
"symfony/dependency-injection": "~3.4|~4.0",
|
||||
"symfony/event-dispatcher": "~2.8|~3.0|~4.0",
|
||||
"symfony/lock": "~3.4|~4.0",
|
||||
"symfony/process": "~3.3|~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/log": "For using the console logger",
|
||||
"symfony/event-dispatcher": "",
|
||||
"symfony/filesystem": "",
|
||||
"symfony/lock": "",
|
||||
"symfony/process": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.3-dev"
|
||||
"dev-master": "3.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -535,7 +535,7 @@
|
||||
],
|
||||
"description": "Symfony Console Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-07-29T21:27:59+00:00"
|
||||
"time": "2019-01-25T10:42:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
@ -810,16 +810,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.9.0",
|
||||
"version": "v1.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8"
|
||||
"reference": "c79c051f5b3a46be09205c73b80b346e4153e494"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8",
|
||||
"reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494",
|
||||
"reference": "c79c051f5b3a46be09205c73b80b346e4153e494",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -865,20 +865,20 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2018-08-06T14:22:27+00:00"
|
||||
"time": "2018-09-21T13:07:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php70",
|
||||
"version": "v1.9.0",
|
||||
"version": "v1.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php70.git",
|
||||
"reference": "1e24b0c4a56d55aaf368763a06c6d1c7d3194934"
|
||||
"reference": "6b88000cdd431cd2e940caa2cb569201f3f84224"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/1e24b0c4a56d55aaf368763a06c6d1c7d3194934",
|
||||
"reference": "1e24b0c4a56d55aaf368763a06c6d1c7d3194934",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/6b88000cdd431cd2e940caa2cb569201f3f84224",
|
||||
"reference": "6b88000cdd431cd2e940caa2cb569201f3f84224",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -924,20 +924,20 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2018-08-06T14:22:27+00:00"
|
||||
"time": "2018-09-21T06:26:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php72",
|
||||
"version": "v1.9.0",
|
||||
"version": "v1.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
||||
"reference": "95c50420b0baed23852452a7f0c7b527303ed5ae"
|
||||
"reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/95c50420b0baed23852452a7f0c7b527303ed5ae",
|
||||
"reference": "95c50420b0baed23852452a7f0c7b527303ed5ae",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9050816e2ca34a8e916c3a0ae8b9c2fccf68b631",
|
||||
"reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -979,7 +979,7 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2018-08-06T14:22:27+00:00"
|
||||
"time": "2018-09-21T13:07:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
@ -1748,16 +1748,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "6.5.11",
|
||||
"version": "6.5.14",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "7bab54cb366076023bbf457a2a0d513332cd40f2"
|
||||
"reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7bab54cb366076023bbf457a2a0d513332cd40f2",
|
||||
"reference": "7bab54cb366076023bbf457a2a0d513332cd40f2",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bac23fe7ff13dbdb461481f706f0e9fe746334b7",
|
||||
"reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1828,20 +1828,20 @@
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2018-08-07T07:05:35+00:00"
|
||||
"time": "2019-02-01T05:22:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
"version": "5.0.9",
|
||||
"version": "5.0.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
|
||||
"reference": "141129c578f58f38f55eccf15a1039bd413ea57c"
|
||||
"reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/141129c578f58f38f55eccf15a1039bd413ea57c",
|
||||
"reference": "141129c578f58f38f55eccf15a1039bd413ea57c",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f",
|
||||
"reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1854,7 +1854,7 @@
|
||||
"phpunit/phpunit": "<6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6.5"
|
||||
"phpunit/phpunit": "^6.5.11"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-soap": "*"
|
||||
@ -1887,7 +1887,8 @@
|
||||
"mock",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2018-08-07T07:02:44+00:00"
|
||||
"abandoned": true,
|
||||
"time": "2018-08-09T05:50:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/code-unit-reverse-lookup",
|
||||
@ -2448,6 +2449,64 @@
|
||||
"homepage": "https://github.com/sebastianbergmann/version",
|
||||
"time": "2016-10-03T07:35:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
|
||||
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-ctype": "For best performance"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.9-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Ctype\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
},
|
||||
{
|
||||
"name": "Gert de Pagter",
|
||||
"email": "BackEndTea@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for ctype functions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"ctype",
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"time": "2018-08-06T14:22:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "theseer/tokenizer",
|
||||
"version": "1.1.0",
|
||||
@ -2490,20 +2549,21 @@
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/webmozart/assert.git",
|
||||
"reference": "0df1908962e7a3071564e857d86874dad1ef204a"
|
||||
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a",
|
||||
"reference": "0df1908962e7a3071564e857d86874dad1ef204a",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
|
||||
"reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.3 || ^7.0"
|
||||
"php": "^5.3.3 || ^7.0",
|
||||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.6",
|
||||
@ -2536,7 +2596,7 @@
|
||||
"check",
|
||||
"validate"
|
||||
],
|
||||
"time": "2018-01-29T19:49:41+00:00"
|
||||
"time": "2018-12-25T11:19:39+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
@ -2549,6 +2609,6 @@
|
||||
},
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "7.0.0"
|
||||
"php": "7.0.8"
|
||||
}
|
||||
}
|
||||
|
@ -10,10 +10,10 @@ use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
|
||||
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
|
||||
use PhpCsFixer\FixerDefinition\CodeSample;
|
||||
use PhpCsFixer\FixerDefinition\FixerDefinition;
|
||||
use PhpCsFixer\Preg;
|
||||
use PhpCsFixer\Tokenizer\Token;
|
||||
use PhpCsFixer\Tokenizer\Tokens;
|
||||
use PhpCsFixer\Tokenizer\TokensAnalyzer;
|
||||
use PhpCsFixer\Utils;
|
||||
|
||||
/**
|
||||
* This is copy of the PR https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3688
|
||||
@ -142,7 +142,8 @@ new class extends Foo {
|
||||
}
|
||||
|
||||
// The final bit of the whitespace must be the next statement's indentation
|
||||
$lines = Utils::splitLines($content);
|
||||
Preg::matchAll('/[^\n\r]+[\r\n]*/', $content, $matches);
|
||||
$lines = $matches[0];
|
||||
$eol = $this->whitespacesConfig->getLineEnding();
|
||||
$tokens[$index] = new Token([T_WHITESPACE, str_repeat($eol, $countLines + 1) . end($lines)]);
|
||||
}
|
||||
|
@ -7,9 +7,9 @@ use Ely\CS\Fixer\AbstractFixer;
|
||||
use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
|
||||
use PhpCsFixer\FixerDefinition\CodeSample;
|
||||
use PhpCsFixer\FixerDefinition\FixerDefinition;
|
||||
use PhpCsFixer\Preg;
|
||||
use PhpCsFixer\Tokenizer\Token;
|
||||
use PhpCsFixer\Tokenizer\Tokens;
|
||||
use PhpCsFixer\Utils;
|
||||
use SplFileInfo;
|
||||
|
||||
/**
|
||||
@ -123,7 +123,8 @@ class Foo
|
||||
}
|
||||
|
||||
// The final bit of the whitespace must be the next statement's indentation
|
||||
$lines = Utils::splitLines($content);
|
||||
Preg::matchAll('/[^\n\r]+[\r\n]*/', $content, $matches);
|
||||
$lines = $matches[0];
|
||||
$eol = $this->whitespacesConfig->getLineEnding();
|
||||
$tokens[$index] = new Token([T_WHITESPACE, str_repeat($eol, $countLines + 1) . end($lines)]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user