Comments (2)
Nice catch, @Wirone. I was recently wondering what black magic PHP-CS-Fixer used to not remove imports used in commented out code; turns out it's not that magic! 🙂
from php-cs-fixer.
I believe it's a duplicate of #2814 - no_unused_imports
just uses naive lookup and doesn't remove imports if it finds any usage of short name. In your case it's most probably here, basically any occurrence of Month
(case-insensitive) will prevent use Brick\DateTime\Month;
from being removed.
When I changed all the month
usages in the PHPDoc, fixer removes the import:
from php-cs-fixer.
Related Issues (20)
- constant_case rule alters constant names
- Add support for `*` syntax in `OrderedAttributesFixer`
- New rule: Interface implemenations split across lines HOT 1
- cs-fixer multicore bug with --path-mode and a specified file HOT 4
- Parallel runner not fixing any files HOT 22
- Displaying sum memory usage from all workers when parallel runner is used HOT 1
- Install documentation misses recommended "tools/php-cs-fixer" dir method HOT 5
- `ParallelConfigFactory` using named parameters behaves unexpectedly when omiting first argument
- `statement_indentation` and arrays defined in a multiline const breaks indentation
- The phpExecutable config is no longer used HOT 9
- Improve cookbook about creating custom fixers HOT 1
- Conflicting rules with PHPUnit fixers (?) HOT 2
- Unable to sort group_import by length
- `simplified_null_return` errors out with `TypeError: Illegal offset type` HOT 4
- Improve stack trace when running the tool with parallel runner HOT 5
- Error regarding conflicting fixers HOT 4
- phpdoc_align not aligning to left on multiline descriptions
- phpcs wants to rewrite a class constant named NULL HOT 4
- constant_case rule changes consts name HOT 4
- Cache is ignored by the parallel runner when using certain cachefile paths
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-cs-fixer.