mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-10 00:16:13 +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
### Changed
- Use typed properties instead of `@var` annotations (#599)
- Return `ResponseInterface` in controller actions (#597)
- 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
{
/**
* @var TeaRepository
*/
private $teaRepository;
private TeaRepository $teaRepository;
public function injectTeaRepository(TeaRepository $teaRepository): void
{

View file

@ -14,15 +14,9 @@ use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
*/
class Tea extends AbstractEntity
{
/**
* @var string
*/
protected $title = '';
protected string $title = '';
/**
* @var string
*/
protected $description = '';
protected string $description = '';
/**
* @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
{
/**
* @var QuerySettingsInterface
*/
private $querySettings;
private QuerySettingsInterface $querySettings;
public function injectQuerySettings(QuerySettingsInterface $querySettings): void
{

View file

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

View file

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

View file

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