bshaffer / oauth2-server-php

A library for implementing an OAuth2 Server in php
http://bshaffer.github.io/oauth2-server-php-docs
MIT License
3.26k stars 950 forks source link

Fix PHPDoc #851

Closed maxailloud closed 7 years ago

maxailloud commented 7 years ago

Basically just some PHPDoc fix.

bshaffer commented 7 years ago

Dumb question, is the leading \ necessary? I assume the answer is PHPDoc reads from the same namespace as the executing PHP code does, and since we don't have a use statement and we are in a different namespace, PHPDoc sees this as \OAuth2\Controller\OAuth2\GrantType\ClientCredentials (for instance)

maxailloud commented 7 years ago

In PHPStorm not putting the leading \ gives me an error. And rightfully as the class \OAuth2\Controller\OAuth2\GrantType\ClientCredentials doesn't exist, but \OAuth2\GrantType\ClientCredentials does.

bluebaroncanada commented 7 years ago

If you use use, you don't need the preceding \.

maxailloud commented 7 years ago

Yes but importing a class just for the PHPDoc is pointless. It's just updating the namespace of the classes use in the PHPDoc to have the real namespace.

bluebaroncanada commented 7 years ago

Yeah. Sorry. I think that made some of you think that I actually care. :p