Plugin-php: Formatting of `::`

Created on 23 May 2018  路  9Comments  路  Source: prettier/plugin-php

I'm super excited for this plugin. Letting hybrid web-apps use one formatter for everything is awesome.

Please note that this plugin is currently in alpha stage and still under active development. We encourage everyone to try it and give feedback

On the note of "We encourage everyone to try it and give feedback" I have the following feedback:

Recently the plugin formatted like this

DB::table('identity')->insert([
    'ref' => $ref,
    'handle' => $handle
]);

however, something changed the last week so it now formats like this

    ::table('identity')
        ->insert([
            'ref' => $ref,
            'handle' => $handle
        ]);

Is anyone aware if this reflects a change I prettier itself, or the plugin-php?

Asked a few programmers and they all really prefer the previous formatting. I have a feeling the cognitive connection of having "table", "Identity" and "Insert" is helpful.

Is there a thread discussing the effects of, for example, placing the :: part on a new line?

bug help wanted

Most helpful comment

Need add tests

All 9 comments

@mathiasrw thanks for PR, it is bug

Should be easy fix :+1:

Interesting though that it changed recently... I don't think there have been any changes deployed to this repo in at least a couple weeks

@mgrip let's just add tests if problem still exists fix it if not just close with comment what already fixed :+1:

Sounds good. Ill close it...

Need add tests

Need add tests

$page = TableRegistry
  ::get('Pages')
  ->findByPath($path)
  ->find('published')
  ->find('frontend')
  ->find('somethingElse')
  ->first();

馃帀

Was this page helpful?
0 / 5 - 0 ratings