#5642 closed enhancement (wontfix)
Lots of problems in BuddyPress when opening it in PHPStorm
Reported by: | slaFFik | Owned by: | |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | minor | Version: | |
Component: | Core | Keywords: | |
Cc: |
Description
It's yellow, like the whole WordPress:
PHPDoc issues, Field accessed via magic method, methods not found (fixed using /** @var $wpdb WPDB */
) etc.
Is it possible to review all that and perhaps clean the code a bit, so it will become nicer in PHPStorm?
Or I can do that, creating patches using per file or per component basis.
Change History (6)
#2
@
11 years ago
I'm referring to this: http://screencast.com/t/Sp72MI0mst
http://www.jetbrains.com/phpstorm/webhelp/code-inspection.html
Basically PSR-0 standards are used.
#3
@
11 years ago
I'm not totally sure what's being pointed out here. Reference to a global that's not being specified the docblock? An overloaded activity property on the $bp global? If you could write a sample patch, it would make things clearer.
PSR-0 is about naming standards for autoloading, so I don't think it's related: http://www.php-fig.org/psr/psr-0/
I don't see anything obvious in PSR-1 that would throw the exact flags you are pointing to here: http://www.php-fig.org/psr/psr-1/
So, any more clarification you could provide would be great.
This ticket was mentioned in IRC in #buddypress-dev by tw2113. View the logs.
11 years ago
#5
@
11 years ago
- Keywords dev-feedback removed
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
BuddyPress' PHP coding standards are pretty much the same as WordPress. We don't need to make changes to keep a PSR-* linter happy, unless of course some of those rules happen to match some of the rules in the WordPress standards. We also know there's a lot more phpdoc/jsdoc we can add to the codebase, and as you know, that's something we continue to try to iterate on and make better in each release. :)
I am going to close this ticket because I'm pretty sure we have other open tickets about inline documentation, and that I'm pretty sure we don't want to meet all of PHPStorm's expectations.
If you're still interested in writing patches to fix some of the reported issues, we'd love that. It'd be super. :) Pick areas that are being reported that are inline with WordPress' coding standards, and send in patches or a pull request on Github (etc), and we'll get those in.
Will you write a small patch that fixes just a couple of functions, and then post it here for us to look at? I'm not clear on what you're proposing, and I'd like to see an example.
Also, if you have links to any "official" documentation about why PHPStorm is throwing the errors (such as PHP Documentation standards), that'd be helpful. I don't want to introduce a bunch of changes just to address the idiosyncracies of a single IDE. On the other hand, if PHPStorm is actually implementing some independent best practices, it'd make the case more convincing. Thanks.