Comments (11)
An other example here. I think it can be related to this issue:
{
- return str_replace_array('#', [
- $this->budget->name,
- $this->requester->name,
- 'justif',
- ], '# - # - #');
+ return str_replace_array(
+ '#',
+ [$this->budget->name, $this->requester->name, 'justif'],
+ '# - # - #'
+ );
}
from plugin-php.
Alright, no worries 🙂 If you change your mind, i'd recomment to take a look here and otherwise you can also always ask me!
from plugin-php.
@mgrip i also tried to implement this in #123 based on the JS implementation, but i didn't arrive at a proper solution yet. You might want to take a look 😄
from plugin-php.
So the example in #23:
$this->something->method($argument, $this->more->stuff($this->even->more->things->complicatedMethod()));
Should become
$this->something->method($argument, $this->more->stuff(
$this->even->more->things->complicatedMethod()
));
I think 🙂
from plugin-php.
@MichaelDeBoey yes, i think so too! Do you want to give this a shot? 😉
from plugin-php.
@czosel I'm not really into the codebase 😕
I'm just here because I'd like to use prettier for both my front- and backend in a Laravel project actually... 🙂
from plugin-php.
So I started looking into this but some of the examples outline above get pretty tricky. For reference, this is how prettier (js) handles it
from plugin-php.
So, for me, your examples are:
- ✅
- ❌
- ✅
- ✅
- ❌
- ❌
Do you confirm?
from plugin-php.
Ahhh I was wondering if we would have to use that conditionalGroup
- the docs say to use it as a last resort which scared me off haha
from plugin-php.
@mathieutu yes I agree - I'm wondering if its actually going to be possible to pretty-print in the way that PSR12 is dictating. Wanted to just give examples of how prettier-js does it for reference
from plugin-php.
Most of the examples listed in this issue should be fixed by #123 - let's open new issues for anything that might be missing.
from plugin-php.
Related Issues (20)
- InvalidDocError on Laravel-generated `config/app.php` HOT 3
- Plugin detection issue with prettier v3 HOT 7
- Ignored unknown option: phpVersion, braceStyle HOT 2
- Backward compatibility for CommonJS
- `npx prettier . --check` doesn't check php files HOT 3
- Class and method braces with no body split onto multiple lines
- Brackets vanish in Recursive IIFE
- Attributes removed since 0.19.2 if method argument has an attribute with attributes in them and arrays and some new lines
- Comments in attributes (e.g. for an array item) are weirdly moved to somewhere completely else
- Some comment positions inside attributes can result in prettier failing with an exception
- Docs: specify if prettier follow psr-12 or something else
- Syntax error when attributes are defined to enum cases
- PHP 8.3 support HOT 3
- [bug] singleQuote option from API call does not work on latest release
- INC file extension not recognized
- Issue HOT 1
- Adjobscc.io
- Allow attributes to be placed above constructor properties
- Invoked import/require callable removes necessary parentheses
- Nguyenthaocc727
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 plugin-php.