mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-22 17:36:12 +01:00

[CLEANUP] Use typed properties instead of @var annotations (#599)

The `@var` annotations where left where it is not possible yet to replace them in PHP 7.4.

Fixes #550

Co-authored-by: lina.wolf <lwolf@w-commerce.de>
This commit is contained in:
Lina Wolf 2022-10-03 19:00:55 +02:00 committed by GitHub
parent 5d3fcee00e
commit e469041db7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 32 deletions

View file

@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
### Added ### Added
### Changed ### Changed
- Use typed properties instead of `@var` annotations (#599)
- Return `ResponseInterface` in controller actions (#597) - Return `ResponseInterface` in controller actions (#597)
- Replace switchable controller actions with separate plugins (#575) - Replace switchable controller actions with separate plugins (#575)

View file

@ -14,10 +14,7 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
*/ */
class TeaController extends ActionController class TeaController extends ActionController
{ {
/** private TeaRepository $teaRepository;
* @var TeaRepository
*/
private $teaRepository;
public function injectTeaRepository(TeaRepository $teaRepository): void public function injectTeaRepository(TeaRepository $teaRepository): void
{ {

View file

@ -14,15 +14,9 @@ use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
*/ */
class Tea extends AbstractEntity class Tea extends AbstractEntity
{ {
/** protected string $title = '';
* @var string
*/
protected $title = '';
/** protected string $description = '';
* @var string
*/
protected $description = '';
/** /**
* @phpstan-var \TYPO3\CMS\Extbase\Domain\Model\FileReference|LazyLoadingProxy|null * @phpstan-var \TYPO3\CMS\Extbase\Domain\Model\FileReference|LazyLoadingProxy|null

View file

@ -14,10 +14,7 @@ use TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface;
*/ */
trait StoragePageAgnosticTrait trait StoragePageAgnosticTrait
{ {
/** private QuerySettingsInterface $querySettings;
* @var QuerySettingsInterface
*/
private $querySettings;
public function injectQuerySettings(QuerySettingsInterface $querySettings): void public function injectQuerySettings(QuerySettingsInterface $querySettings): void
{ {

View file

@ -21,15 +21,9 @@ class TeaRepositoryTest extends FunctionalTestCase
{ {
protected $testExtensionsToLoad = ['typo3conf/ext/tea']; protected $testExtensionsToLoad = ['typo3conf/ext/tea'];
/** private TeaRepository $subject;
* @var TeaRepository
*/
private $subject;
/** private PersistenceManager $persistenceManager;
* @var PersistenceManager
*/
private $persistenceManager;
protected function setUp(): void protected function setUp(): void
{ {

View file

@ -14,10 +14,7 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
*/ */
class TeaTest extends UnitTestCase class TeaTest extends UnitTestCase
{ {
/** private Tea $subject;
* @var Tea
*/
private $subject;
protected function setUp(): void protected function setUp(): void
{ {

View file

@ -14,10 +14,7 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
*/ */
class TeaRepositoryTest extends UnitTestCase class TeaRepositoryTest extends UnitTestCase
{ {
/** private TeaRepository $subject;
* @var TeaRepository
*/
private $subject;
protected function setUp(): void protected function setUp(): void
{ {