User tests: Successful: Unsuccessful:
Updates references to no longer present JRegistry
to the namespaced \Joomla\Registry\Registry
Status | Pending | ⇒ | New |
Labels |
Added:
?
|
@Bakual In docblocks, leading \ is better and clearer. So you do not have to look up if the whole file or section is namespaced and know upfront that it's an absolute namespace.
That said (as just commented on the components PR), our php-doc docblocks for params and return, we should use RegistryInterface instead of Registry, since any alternate implementation that also implements RegistryInterface should be accepted/acceptable. And that's very important for a good implementation-independant framework imho.
When I did #3823 I wondered if the leading slash is needed or not. Do you know?
Because I see you use no leading slash in the use Joomla\Registry\Registry; but have * @var \Joomla\Registry\Registry in some docblocks.
For my IDE it was fine without the leading one.
Mostly personal preference and some clarity. When I'm in a fully namespaced environment, I consider anything without the preceding \
to reference a namespaced class that has a use
statement and anything with the \
is the fully qualified class name.
Thanks for the explanation.
Status | New | ⇒ | Pending |
Merged into 3.4-dev.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-09-04 19:43:49 |
Milestone |
Added: |
When I did #3823 I wondered if the leading slash is needed or not. Do you know?
Because I see you use no leading slash in the
use Joomla\Registry\Registry;
but have* @var \Joomla\Registry\Registry
in some docblocks.For my IDE it was fine without the leading one.