Comments (3)
It's not supported and I doubt it will be.
from php-cs-fixer.
I'd say this works as intended in this case: there's a new line between =
and [
so not only the array is multiline but also the property declaration block itself, so it gets indented as well.
To remove one indentation level from the array, you need to remove that newline:
class Test
{
- protected $names =
- [
+ protected $names = [
'first_name' => 'John',
'last_name' => 'Doe',
];
}
from php-cs-fixer.
I see, in our scenario we are writing that because we're trying to follow PSR-12 but with the exception of using Allman indentation style which means we're using next_line_unless_newline_at_signature_end
in all of its rules related to braces_position
. Is there a way to configure php-cs-fixer
to follow our braces_position
from the said statement indentation
?
from php-cs-fixer.
Related Issues (20)
- statement_indentation doesn't like multiline const
- `multiline_whitespace_before_semicolons` doesn't work with multiline const HOT 1
- php_unit_test_class_requires_covers does not understand PHPUnit 10 attributes
- global_namespace_import ignores imports for symbols that exist in code but ain't detected HOT 5
- statement_indentation is indenting already correct line HOT 2
- How disable no_break_comment check? HOT 1
- Add double_quote option HOT 2
- trim_array_spaces fails to remove extra spaces before commas HOT 2
- no_trailing_whitespace_in_string new parameter to allow single white space if it exists HOT 6
- [InvalidArgumentException] Token at index xx is not the start of an alternative syntax block. HOT 1
- multiline_whitespace_before_semicolons behaves inconsistently with multline conditions
- Option's deprecation warning is misplaced in docs HOT 5
- `switch` should be followed by a space HOT 5
- no_unused_imports does not remove some unused imports HOT 2
- Separat sorting for enum cases HOT 1
- "no-return" phpdoc not removed because superflous HOT 9
- Remove or add redundant `readonly` property modifier HOT 4
- ClassAttributesSeparationFixer - ['property' => 'none'] Add unwanted blank line when comment present
- Allow custom assertion methods in php_unit_test_case_static_method_calls
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.