I ran into some issues using PhpStorm to review Drupal code today and I was able to track it down to improperly commented code found in Drupal. In every code block where we refer to an object we need to start the PSR-0 syntax with at "\".

Files: 
CommentFileSizeAuthor
#1 2100329-1.patch190.01 KBcosmicdreams
PASSED: [[SimpleTest]]: [MySQL] 58,927 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new190.01 KB
PASSED: [[SimpleTest]]: [MySQL] 58,927 pass(es).
[ View ]

Here's a patch that shows what I'm saying

Status:Needs review» Reviewed & tested by the community

a) This is correct
b) We just did #2053489: Standardize on \Drupal throughout core

RTBC if green.

Status:Reviewed & tested by the community» Needs work

Need to convert params, new patch coming soon.

Status:Needs work» Reviewed & tested by the community

nope I got the params, nevermind.

+1

+1

Title:Use \Drupal instead of Drupal to make PhpStorm happyUse \Drupal instead of Drupal to make IDEs and static code analyse tools happy

.

+1

this need avoid commit conflicts tag
Also there could be a new hunks introduced with latest commits

Let's see if this needs a reroll

#1: 2100329-1.patch queued for re-testing.

@cosmicdreams is there a pattern to quickly grep for? to make sure all places are fixed

Yea, the patterns are :
replace all "@return Drupal\" with @return \Drupal\
replace all "@see Drupal\" with @see \Drupal\
replace all "@param Drupal\" with @param \Drupal\

Also these:
replace all "@var Drupal\" with @var \Drupal\
replace all "@throws Drupal\" with @throws \Drupal\

Status:Reviewed & tested by the community» Fixed

Getting this in whilst it still applies - we can pick up any stragglers in a followup.

Committed 3cee107 and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.