B
B
BonBon Slick2019-01-28 18:30:10
phpstorm
BonBon Slick, 2019-01-28 18:30:10

Class FullName or Class self doc block?

use App\Entity\User;

/**
* Class ProfileController. // or class self
*/
class ProfileController extends AbstractController
{
   use UserTypeTrait;

   /**
    * @var MessageManager
    */
   private $messageManager;

What is preferred and why?
Personally, I have always used self. However, I am being scolded about this in a work project, without any particular arguments.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Decadal, 2019-01-28
@BonBonSlick

Storm makes no difference. The difference may be for older versions of NetBeans - and if you have someone working with them, then writing the full class name is a tribute to such people :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question