Closed joseluisq closed 7 years ago
Hey @joseluisq - As long as you're using the latest release (https://github.com/bobsta63/netbeans-psr-formatting/releases/tag/v1.0.2) this is already resolved buddy :)
Cheers for logging though, I'll close the issue. - Do you me know if you have further issues.
It appears that doesn't work I have the v1.0.2
Sorry - Re-reading your original issue, appears you want a blank line before the namespace
Maybe I'm wrong but this isn't PSR1/PSR2 recommendations? See this page: http://www.php-fig.org/psr/psr-2/
If you feel I'm incorrect please let me know but as far as I'm concerned it's working fine for me?
It appears that new lines before namespaces is not mandatory in PSR-2 specs.. http://www.php-fig.org/psr/psr-2/#3-namespace-and-use-declarations
Anyway, I still think that'll be an idea to consider 👍 Thanks
Yeah, given that my package currently does make the auto-formatting of code look as per their valid example, I'd prefer to keep it as it now (namespace on a new line but not a blank line between the opening PHP tag and the namespace).
Obviously, you can override as per your own requirements but I think it's probably better to keep consistent with their example screenshots.
If others want to comment/request me to change this I will otherwise, personally I feel this is the currently correct and don't intend to change.
Alternatively you could use my previous version that supported a blank line given the previous bug with NetBeans. https://github.com/bobsta63/netbeans-psr-formatting/releases/tag/v1.0.1
:)
Sure, consistence is the rule. I don't pretend to change your plugin in favor to 😄
instead I think is would be a good option to consider only..
For example (this is only a particular preference):
<?php
namespace App\Http\Controllers;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController
{
function hello()
{
dd('Hello!')
}
}
Instead:
<?php
namespace App\Http\Controllers;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController
{
function hello()
{
dd('Hello!')
}
}
Actually it looks like :
This solves the issue :