mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-22 12: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:
parent
5d3fcee00e
commit
e469041db7
7 changed files with 9 additions and 32 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue