From 35ffd8036260cf8a9e1bef71182b54d7525e7f80 Mon Sep 17 00:00:00 2001 From: catch Date: Thu, 18 Jul 2019 14:38:54 +0100 Subject: [PATCH] Issue #2924781 by osman, yogeshmpawar, zaporylie, mfernea: Missing @var annotation for scalars that do not provide default values --- core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php | 2 ++ core/lib/Drupal/Core/Database/Query/Condition.php | 2 ++ core/lib/Drupal/Core/Database/Query/Merge.php | 2 ++ core/lib/Drupal/Core/Database/Query/Query.php | 2 ++ core/lib/Drupal/Core/Database/Query/SelectExtender.php | 2 ++ core/lib/Drupal/Core/Database/Schema.php | 2 ++ core/lib/Drupal/Core/Database/Transaction.php | 2 ++ core/lib/Drupal/Core/Datetime/DrupalDateTime.php | 2 ++ core/lib/Drupal/Core/Entity/EntityType.php | 2 ++ core/lib/Drupal/Core/Password/PhpassHashedPassword.php | 2 ++ core/lib/Drupal/Core/Utility/ThemeRegistry.php | 2 ++ .../comment/tests/src/Functional/CommentTranslationUITest.php | 2 ++ .../datetime/tests/src/Kernel/Views/FilterDateTimeTest.php | 2 ++ .../datetime_range/tests/src/Kernel/Views/FilterDateTest.php | 2 ++ core/modules/file/tests/src/Functional/SaveUploadFormTest.php | 4 ++++ core/modules/file/tests/src/Functional/SaveUploadTest.php | 4 ++++ core/modules/simpletest/src/WebTestBase.php | 2 ++ .../src/Functional/Form/StateValuesCleanAdvancedTest.php | 2 ++ .../system/tests/src/Functional/Update/UpdatesWith7xTest.php | 2 ++ core/modules/views/src/Entity/View.php | 2 ++ .../KernelTests/Core/Datetime/DatetimeElementFormTest.php | 2 ++ .../Component/PhpStorage/MTimeProtectedFileStorageBase.php | 2 ++ 22 files changed, 48 insertions(+) diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php index a914ec6649d7..454d515718c2 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityType.php @@ -14,6 +14,8 @@ class ConfigEntityType extends EntityType implements ConfigEntityTypeInterface { /** * The config prefix set in the configuration entity type annotation. * + * @var string + * * @see \Drupal\Core\Config\Entity\ConfigEntityTypeInterface::getConfigPrefix() */ protected $config_prefix; diff --git a/core/lib/Drupal/Core/Database/Query/Condition.php b/core/lib/Drupal/Core/Database/Query/Condition.php index 00ad95ffa9e2..e7038e23c91e 100644 --- a/core/lib/Drupal/Core/Database/Query/Condition.php +++ b/core/lib/Drupal/Core/Database/Query/Condition.php @@ -61,6 +61,8 @@ class Condition implements ConditionInterface, \Countable { /** * The identifier of the query placeholder this condition has been compiled against. + * + * @var string */ protected $queryPlaceholderIdentifier; diff --git a/core/lib/Drupal/Core/Database/Query/Merge.php b/core/lib/Drupal/Core/Database/Query/Merge.php index 6a4a5ca1d34d..4afe5de2ebb2 100644 --- a/core/lib/Drupal/Core/Database/Query/Merge.php +++ b/core/lib/Drupal/Core/Database/Query/Merge.php @@ -66,6 +66,8 @@ class Merge extends Query implements ConditionInterface { /** * The table or subquery to be used for the condition. + * + * @var string */ protected $conditionTable; diff --git a/core/lib/Drupal/Core/Database/Query/Query.php b/core/lib/Drupal/Core/Database/Query/Query.php index 46c8173f4e59..3eb82079793c 100644 --- a/core/lib/Drupal/Core/Database/Query/Query.php +++ b/core/lib/Drupal/Core/Database/Query/Query.php @@ -43,6 +43,8 @@ abstract class Query implements PlaceholderInterface { /** * A unique identifier for this query object. + * + * @var string */ protected $uniqueIdentifier; diff --git a/core/lib/Drupal/Core/Database/Query/SelectExtender.php b/core/lib/Drupal/Core/Database/Query/SelectExtender.php index a7faf5cf87db..bc15c19e7019 100644 --- a/core/lib/Drupal/Core/Database/Query/SelectExtender.php +++ b/core/lib/Drupal/Core/Database/Query/SelectExtender.php @@ -25,6 +25,8 @@ class SelectExtender implements SelectInterface { /** * A unique identifier for this query object. + * + * @var string */ protected $uniqueIdentifier; diff --git a/core/lib/Drupal/Core/Database/Schema.php b/core/lib/Drupal/Core/Database/Schema.php index 6b3f61d19f98..f32d9fb289e7 100644 --- a/core/lib/Drupal/Core/Database/Schema.php +++ b/core/lib/Drupal/Core/Database/Schema.php @@ -39,6 +39,8 @@ abstract class Schema implements PlaceholderInterface { /** * A unique identifier for this query object. + * + * @var string */ protected $uniqueIdentifier; diff --git a/core/lib/Drupal/Core/Database/Transaction.php b/core/lib/Drupal/Core/Database/Transaction.php index 837afda6de7c..8aed8c8ae672 100644 --- a/core/lib/Drupal/Core/Database/Transaction.php +++ b/core/lib/Drupal/Core/Database/Transaction.php @@ -42,6 +42,8 @@ class Transaction { * * This is used to label the transaction savepoint. It will be overridden to * 'drupal_transaction' if there is no transaction depth. + * + * @var string */ protected $name; diff --git a/core/lib/Drupal/Core/Datetime/DrupalDateTime.php b/core/lib/Drupal/Core/Datetime/DrupalDateTime.php index e674bddb799c..193e58f7fc94 100644 --- a/core/lib/Drupal/Core/Datetime/DrupalDateTime.php +++ b/core/lib/Drupal/Core/Datetime/DrupalDateTime.php @@ -24,6 +24,8 @@ class DrupalDateTime extends DateTimePlus { /** * Format string translation cache. + * + * @var string */ protected $formatTranslationCache; diff --git a/core/lib/Drupal/Core/Entity/EntityType.php b/core/lib/Drupal/Core/Entity/EntityType.php index db0def37decd..c7d60384c4d8 100644 --- a/core/lib/Drupal/Core/Entity/EntityType.php +++ b/core/lib/Drupal/Core/Entity/EntityType.php @@ -232,6 +232,8 @@ class EntityType extends PluginDefinition implements EntityTypeInterface { /** * The machine name of the entity type group. + * + * @var string */ protected $group; diff --git a/core/lib/Drupal/Core/Password/PhpassHashedPassword.php b/core/lib/Drupal/Core/Password/PhpassHashedPassword.php index 78a10b473e88..45ea3eadb48e 100644 --- a/core/lib/Drupal/Core/Password/PhpassHashedPassword.php +++ b/core/lib/Drupal/Core/Password/PhpassHashedPassword.php @@ -35,6 +35,8 @@ class PhpassHashedPassword implements PasswordInterface { * Specifies the number of times the hashing function will be applied when * generating new password hashes. The number of times is calculated by * raising 2 to the power of the given value. + * + * @var int */ protected $countLog2; diff --git a/core/lib/Drupal/Core/Utility/ThemeRegistry.php b/core/lib/Drupal/Core/Utility/ThemeRegistry.php index fe80bdf10547..8abb17d78020 100644 --- a/core/lib/Drupal/Core/Utility/ThemeRegistry.php +++ b/core/lib/Drupal/Core/Utility/ThemeRegistry.php @@ -24,6 +24,8 @@ class ThemeRegistry extends CacheCollector implements DestructableInterface { * This is only allowed if all modules and the request method is GET. _theme() * should be very rarely called on POST requests and this avoids polluting * the runtime cache. + * + * @var bool */ protected $persistable; diff --git a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php index 2d7787e7446b..b6bb692d47cd 100644 --- a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php +++ b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php @@ -18,6 +18,8 @@ class CommentTranslationUITest extends ContentTranslationUITestBase { /** * The subject of the test comment. + * + * @var string */ protected $subject; diff --git a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php index 1e6369cd2400..13b2759bb07f 100644 --- a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php +++ b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php @@ -20,6 +20,8 @@ class FilterDateTimeTest extends DateTimeHandlerTestBase { /** * For offset tests, set a date 1 day in the future. + * + * @var int */ protected static $date; diff --git a/core/modules/datetime_range/tests/src/Kernel/Views/FilterDateTest.php b/core/modules/datetime_range/tests/src/Kernel/Views/FilterDateTest.php index 76e3dbf447b4..0608bc597303 100644 --- a/core/modules/datetime_range/tests/src/Kernel/Views/FilterDateTest.php +++ b/core/modules/datetime_range/tests/src/Kernel/Views/FilterDateTest.php @@ -34,6 +34,8 @@ class FilterDateTest extends DateTimeHandlerTestBase { /** * For offset tests, set to the current time. + * + * @var int */ protected static $date; diff --git a/core/modules/file/tests/src/Functional/SaveUploadFormTest.php b/core/modules/file/tests/src/Functional/SaveUploadFormTest.php index ee1168c42ac8..5bbf43dfc6c3 100644 --- a/core/modules/file/tests/src/Functional/SaveUploadFormTest.php +++ b/core/modules/file/tests/src/Functional/SaveUploadFormTest.php @@ -35,11 +35,15 @@ class SaveUploadFormTest extends FileManagedTestBase { /** * A PHP file path for upload security testing. + * + * @var string */ protected $phpfile; /** * The largest file id when the test starts. + * + * @var int */ protected $maxFidBefore; diff --git a/core/modules/file/tests/src/Functional/SaveUploadTest.php b/core/modules/file/tests/src/Functional/SaveUploadTest.php index 8d5f01a43688..dbc42232bd12 100644 --- a/core/modules/file/tests/src/Functional/SaveUploadTest.php +++ b/core/modules/file/tests/src/Functional/SaveUploadTest.php @@ -35,11 +35,15 @@ class SaveUploadTest extends FileManagedTestBase { /** * A PHP file path for upload security testing. + * + * @var string */ protected $phpfile; /** * The largest file id when the test starts. + * + * @var int */ protected $maxFidBefore; diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php index e40b7bde1915..0d7cd953ae3c 100644 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -180,6 +180,8 @@ abstract class WebTestBase extends TestBase { /** * The number of redirects followed during the handling of a request. + * + * @var int */ protected $redirectCount; diff --git a/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php b/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php index d30b4f110b11..7341e18994de 100644 --- a/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php +++ b/core/modules/system/tests/src/Functional/Form/StateValuesCleanAdvancedTest.php @@ -27,6 +27,8 @@ class StateValuesCleanAdvancedTest extends BrowserTestBase { /** * An image file path for uploading. + * + * @var string|bool */ protected $image; diff --git a/core/modules/system/tests/src/Functional/Update/UpdatesWith7xTest.php b/core/modules/system/tests/src/Functional/Update/UpdatesWith7xTest.php index 7d3a5ef3ed98..e4c5635928cf 100644 --- a/core/modules/system/tests/src/Functional/Update/UpdatesWith7xTest.php +++ b/core/modules/system/tests/src/Functional/Update/UpdatesWith7xTest.php @@ -24,6 +24,8 @@ class UpdatesWith7xTest extends BrowserTestBase { /** * The URL for the update page. + * + * @var string */ private $updateUrl; diff --git a/core/modules/views/src/Entity/View.php b/core/modules/views/src/Entity/View.php index 74698b9b6a53..4d58e92cc704 100644 --- a/core/modules/views/src/Entity/View.php +++ b/core/modules/views/src/Entity/View.php @@ -64,6 +64,8 @@ class View extends ConfigEntityBase implements ViewEntityInterface { /** * The label of the view. + * + * @var string */ protected $label; diff --git a/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php index ccabd268e0c6..a055b5de68c8 100644 --- a/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php +++ b/core/tests/Drupal/KernelTests/Core/Datetime/DatetimeElementFormTest.php @@ -16,6 +16,8 @@ class DatetimeElementFormTest extends KernelTestBase implements FormInterface { /** * The variable under test. + * + * @var string */ protected $flag; diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php index 38fcc60c26a1..7c4b787c3423 100644 --- a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php +++ b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php @@ -14,6 +14,8 @@ abstract class MTimeProtectedFileStorageBase extends PhpStorageTestBase { * The PHP storage class to test. * * This should be overridden by extending classes. + * + * @var string */ protected $storageClass;