Skip to content

Commit

Permalink
[TASK] Enable phpstan DefaultValueTypesAssignedToPropertiesRule
Browse files Browse the repository at this point in the history
Releases: master
Resolves: #90893
Change-Id: Icc339442cded9a268fb66fe932b0f13de292e3b7
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64018
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Benni Mack <benni@typo3.org>
  • Loading branch information
alexanderschnitzler authored and bmack committed Apr 6, 2020
1 parent b6aaba1 commit 555e116
Show file tree
Hide file tree
Showing 24 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Build/phpstan.level3.neon
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rules:
- PHPStan\Rules\Functions\ReturnTypeRule
- PHPStan\Rules\Generators\YieldTypeRule
# - PHPStan\Rules\Methods\ReturnTypeRule
# - PHPStan\Rules\Properties\DefaultValueTypesAssignedToPropertiesRule
- PHPStan\Rules\Properties\DefaultValueTypesAssignedToPropertiesRule
# - PHPStan\Rules\Properties\TypesAssignedToPropertiesRule
- PHPStan\Rules\Variables\ThrowTypeRule
- PHPStan\Rules\Variables\VariableCloningRule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ class EditDocumentController
/**
* Used internally to disable the storage of the document reference (eg. new records)
*
* @var bool
* @var int
*/
protected $dontStoreDocumentRef = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ abstract class AbstractTreeView
* Needs to be initialized with $GLOBALS['BE_USER']
* Done by default in init()
*
* @var \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
* @var \TYPO3\CMS\Core\Authentication\BackendUserAuthentication|string
*/
public $BE_USER = '';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
class ContentCreationPagePositionMap extends PagePositionMap
{
/**
* @var bool
* @var int
*/
public $dontPrintPageInsertIcons = 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class BackendLayout
protected $contentFetcher;

/**
* @var LanguageColumn
* @var LanguageColumn[]
*/
protected $languageColumns = [];

Expand Down
4 changes: 2 additions & 2 deletions typo3/sysext/belog/Classes/Domain/Model/LogEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class LogEntry extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Table name
*
* @var string
* @var string|int
*/
protected $tableName = 0;

Expand Down Expand Up @@ -135,7 +135,7 @@ class LogEntry extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* New ID
*
* @var string
* @var string|int
*/
protected $newId = 0;

Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/core/Classes/DataHandling/DataHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ class DataHandler implements LoggerAwareInterface
* Tells, that this DataHandler instance was called from \TYPO3\CMS\Impext\ImportExport.
* This variable is set by \TYPO3\CMS\Impext\ImportExport
*
* @var array
* @var bool
*/
public $callFromImpExp = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class DefaultRestrictionContainer extends AbstractRestrictionContainer
/**
* Default restriction classes.
*
* @var QueryRestrictionInterface[]
* @var string[]
*/
protected $defaultRestrictionTypes = [
DeletedRestriction::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
class FrontendRestrictionContainer extends AbstractRestrictionContainer
{
/**
* @var QueryRestrictionInterface[]
* @var string[]
*/
protected $defaultRestrictionTypes = [
DeletedRestriction::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
class BootstrapRenderer implements FlashMessageRendererInterface
{
/**
* @var string The message severity class names
* @var string[] The message severity class names
*/
protected static $classes = [
FlashMessage::NOTICE => 'notice',
Expand All @@ -38,7 +38,7 @@ class BootstrapRenderer implements FlashMessageRendererInterface
];

/**
* @var string The message severity icon names
* @var string[] The message severity icon names
*/
protected static $icons = [
FlashMessage::NOTICE => 'lightbulb-o',
Expand Down
4 changes: 2 additions & 2 deletions typo3/sysext/core/Classes/Messaging/Renderer/ListRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
class ListRenderer implements FlashMessageRendererInterface
{
/**
* @var string The message severity class names
* @var string[] The message severity class names
*/
protected static $classes = [
FlashMessage::NOTICE => 'notice',
Expand All @@ -39,7 +39,7 @@ class ListRenderer implements FlashMessageRendererInterface
];

/**
* @var string The message severity icon names
* @var string[] The message severity icon names
*/
protected static $icons = [
FlashMessage::NOTICE => 'lightbulb-o',
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/extbase/Classes/Persistence/Generic/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Query implements QueryInterface
protected $statement;

/**
* @var int
* @var int[]
*/
protected $orderings = [];

Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/extbase/Classes/Validation/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Error extends \TYPO3\CMS\Extbase\Error\Error
protected $message = 'Unknown validation error';

/**
* @var string
* @var int
*/
protected $code = 1201447005;
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class DownloadController extends AbstractController
protected $downloadUtility;

/**
* @var JsonView
* @var string
*/
protected $defaultViewObjectName = JsonView::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class UpdateFromTerController extends AbstractController
protected $extensionRepository;

/**
* @var JsonView
* @var string
*/
protected $defaultViewObjectName = JsonView::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class FileListController extends ActionController implements LoggerAwareInterfac
/**
* BackendTemplateView Container
*
* @var BackendTemplateView
* @var string
*/
protected $defaultViewObjectName = BackendTemplateView::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class FormEditorController extends AbstractBackendController
/**
* Default View Container
*
* @var BackendTemplateView
* @var string
*/
protected $defaultViewObjectName = BackendTemplateView::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function injectDatabaseService(\TYPO3\CMS\Form\Service\DatabaseService $d
/**
* Default View Container
*
* @var BackendTemplateView
* @var string
*/
protected $defaultViewObjectName = BackendTemplateView::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface

/**
* The type (read-only)
* @var int
* @var int|string
*/
public $type = '';

Expand Down Expand Up @@ -189,7 +189,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
/**
* sys_page-object, pagefunctions
*
* @var PageRepository
* @var PageRepository|string
*/
public $sys_page = '';

Expand Down Expand Up @@ -223,7 +223,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
/**
* The frontend user
*
* @var FrontendUserAuthentication
* @var FrontendUserAuthentication|string
*/
public $fe_user = '';

Expand Down Expand Up @@ -318,7 +318,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
/**
* TypoScript configuration of the page-object pointed to by sPre.
* $this->tmpl->setup[$this->sPre.'.']
* @var array
* @var array|string
*/
public $pSetup = '';

Expand Down Expand Up @@ -357,7 +357,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface

/**
* May be set to the pagesTSconfig
* @var array
* @var array|string
* @internal
*/
protected $pagesTSconfig = '';
Expand Down Expand Up @@ -399,7 +399,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
public $additionalCSS = [];

/**
* @var string
* @var string
*/
public $JSCode;

Expand Down Expand Up @@ -593,7 +593,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface
/**
* Page content render object
*
* @var ContentObjectRenderer
* @var ContentObjectRenderer|string
*/
public $cObj = '';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class AdministrationController extends ActionController
/**
* Backend Template Container
*
* @var BackendTemplateView
* @var string
*/
protected $defaultViewObjectName = BackendTemplateView::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
class DirectoryNode extends AbstractNode implements NodeInterface
{
/**
* @var int|null Default for directories is octal 02775 == decimal 1533
* @var string Default for directories is octal 02775 == decimal 1533
*/
protected $targetPermission = '2775';

Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/install/Classes/FolderStructure/FileNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class FileNode extends AbstractNode implements NodeInterface
{
/**
* @var int|null Default for files is octal 0664 == decimal 436
* @var string Default for files is octal 0664 == decimal 436
*/
protected $targetPermission = '0664';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ExternalLinktype extends AbstractLinktype
* Preferred method of fetching (HEAD | GET).
* If HEAD is used, we fallback to GET
*
* @var array
* @var string
*/
protected $method = 'HEAD';

Expand Down
4 changes: 2 additions & 2 deletions typo3/sysext/redirects/Classes/Service/SlugService.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ class SlugService implements LoggerAwareInterface
protected $pageRepository;

/**
* @var CorrelationId
* @var CorrelationId|string
*/
protected $correlationIdRedirectCreation = '';

/**
* @var CorrelationId
* @var CorrelationId|string
*/
protected $correlationIdSlugUpdate = '';

Expand Down

0 comments on commit 555e116

Please sign in to comment.