- Issue created by @gorkagr
- 🇧🇪Belgium gorkagr
I am not sure if you have also planned to do smth in the constructors and declare the variables directly in the params:
smth like
original:/** * The private store factory. * * @var \Drupal\Core\TempStore\PrivateTempStoreFactory */ protected $privateTempStoreFactory; /** * The renderer. * * @var \Drupal\Core\Render\RendererInterface */ protected $renderer; /** * Constructs a new GroupController. * * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory * The private store factory. * @param \Drupal\Core\Render\RendererInterface $renderer * The renderer. */ public function __construct(PrivateTempStoreFactory $temp_store_factory, RendererInterface $renderer) { $this->privateTempStoreFactory = $temp_store_factory; $this->renderer = $renderer; }
idea:
/** * Constructs a new GroupController. * * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory * The private store factory. * @param \Drupal\Core\Render\RendererInterface $renderer * The renderer. */ public function __construct( protected PrivateTempStoreFactory $privateTempStoreFactory, protected RendererInterface $renderer, ) { }
But then i assume that should be done to all files that have a __construct(), so all of them are unified
- 🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium
Uh yeah, property promotion and the omission of constructor docblocks is also on my todo list