From 2e5e060c5354cc05022d17b0f6640aa853dbc48f Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Sun, 28 Aug 2016 06:25:45 -0500 Subject: [PATCH] Issue #2783395 by Mile23: Fix 'Drupal.Commenting.FunctionComment.InvalidReturn' coding standard --- core/includes/bootstrap.inc | 2 +- core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php | 2 +- core/lib/Drupal/Core/Access/AccessResultReasonInterface.php | 4 ++-- core/lib/Drupal/Core/Asset/LibraryDiscoveryInterface.php | 2 +- .../Core/Authentication/AuthenticationCollectorInterface.php | 2 +- core/lib/Drupal/Core/Authentication/AuthenticationManager.php | 4 ++-- .../AuthenticationProviderChallengeInterface.php | 2 +- .../Core/Authentication/AuthenticationProviderInterface.php | 2 +- core/lib/Drupal/Core/Composer/Composer.php | 2 +- core/lib/Drupal/Core/Config/ConfigCollectionInfo.php | 2 +- .../Drupal/Core/Config/Entity/ConfigEntityTypeInterface.php | 2 +- core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php | 2 +- core/lib/Drupal/Core/DrupalKernelInterface.php | 2 +- core/lib/Drupal/Core/Entity/Controller/EntityController.php | 2 +- .../Drupal/Core/EventSubscriber/AuthenticationSubscriber.php | 4 ++-- .../Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php | 2 +- core/lib/Drupal/Core/Form/EnforcedResponse.php | 2 +- core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php | 2 +- core/lib/Drupal/Core/Menu/MenuLinkTreeElement.php | 2 +- core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php | 2 +- .../lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php | 2 +- core/lib/Drupal/Core/PageCache/RequestPolicyInterface.php | 2 +- core/lib/Drupal/Core/PageCache/ResponsePolicyInterface.php | 2 +- core/lib/Drupal/Core/Plugin/Context/Context.php | 2 +- core/lib/Drupal/Core/Routing/StackedRouteMatchInterface.php | 4 ++-- core/lib/Drupal/Core/Session/AccountProxy.php | 2 +- core/lib/Drupal/Core/Session/SessionConfiguration.php | 2 +- .../Core/StringTranslation/Translator/TranslatorInterface.php | 2 +- core/lib/Drupal/Core/Theme/ThemeNegotiator.php | 2 +- core/modules/ckeditor/src/CKEditorPluginInterface.php | 2 +- .../ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php | 2 +- core/modules/comment/src/CommentInterface.php | 2 +- core/modules/file/file.module | 2 +- core/modules/filter/src/FilterFormatInterface.php | 2 +- core/modules/filter/src/Plugin/FilterInterface.php | 2 +- core/modules/locale/src/LocaleConfigManager.php | 2 +- .../src/Plugin/migrate/destination/EntityContentBase.php | 2 +- .../migrate_drupal/src/MigrationConfigurationTrait.php | 2 +- core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php | 2 +- core/modules/rest/src/Tests/RESTTestBase.php | 2 +- core/modules/simpletest/src/AssertContentTrait.php | 2 +- core/modules/statistics/statistics.module | 2 +- core/modules/system/src/Tests/Theme/TwigTransTest.php | 2 +- core/modules/user/src/Authentication/Provider/Cookie.php | 2 +- .../views/src/Plugin/views/access/AccessPluginBase.php | 2 +- .../views/src/Plugin/views/display/DisplayPluginInterface.php | 2 +- core/modules/views/src/Plugin/views/filter/InOperator.php | 2 +- core/modules/views/src/Tests/Handler/FieldWebTest.php | 2 +- core/modules/views/src/Tests/Plugin/CacheTagTest.php | 2 +- core/phpcs.xml.dist | 1 - 50 files changed, 53 insertions(+), 54 deletions(-) diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index d78a54d412e..292e918e33b 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -599,7 +599,7 @@ function _drupal_exception_handler_additional($exception, $exception2) { * @param string $new_prefix * Internal use only. A new prefix to be stored. * - * @return string|FALSE + * @return string|false * Either the simpletest prefix (the string "simpletest" followed by any * number of digits) or FALSE if the user agent does not contain a valid * HMAC and timestamp. diff --git a/core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php b/core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php index 71f47008be9..735341d6b1c 100644 --- a/core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php +++ b/core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php @@ -80,7 +80,7 @@ interface PhpStorageInterface { * @param string $name * The virtual file name. Can be a relative path. * - * @return string|FALSE + * @return string|false * The full file path for the provided name. Return FALSE if the * implementation needs to prevent access to the file. */ diff --git a/core/lib/Drupal/Core/Access/AccessResultReasonInterface.php b/core/lib/Drupal/Core/Access/AccessResultReasonInterface.php index 468d9988964..850194c54b2 100644 --- a/core/lib/Drupal/Core/Access/AccessResultReasonInterface.php +++ b/core/lib/Drupal/Core/Access/AccessResultReasonInterface.php @@ -17,7 +17,7 @@ interface AccessResultReasonInterface extends AccessResultInterface { /** * Gets the reason for this access result. * - * @return string|NULL + * @return string|null * The reason of this access result or NULL if no reason is provided. */ public function getReason(); @@ -25,7 +25,7 @@ interface AccessResultReasonInterface extends AccessResultInterface { /** * Sets the reason for this access result. * - * @param $reason string|NULL + * @param $reason string|null * The reason of this access result or NULL if no reason is provided. * * @return \Drupal\Core\Access\AccessResultInterface diff --git a/core/lib/Drupal/Core/Asset/LibraryDiscoveryInterface.php b/core/lib/Drupal/Core/Asset/LibraryDiscoveryInterface.php index c8d18f06e8c..0f4e70474b9 100644 --- a/core/lib/Drupal/Core/Asset/LibraryDiscoveryInterface.php +++ b/core/lib/Drupal/Core/Asset/LibraryDiscoveryInterface.php @@ -39,7 +39,7 @@ interface LibraryDiscoveryInterface { * @param string $name * The name of a registered library to retrieve. * - * @return array|FALSE + * @return array|false * The definition of the requested library, if $name was passed and it * exists, otherwise FALSE. */ diff --git a/core/lib/Drupal/Core/Authentication/AuthenticationCollectorInterface.php b/core/lib/Drupal/Core/Authentication/AuthenticationCollectorInterface.php index 3d869e5f1ed..37f245cc1c3 100644 --- a/core/lib/Drupal/Core/Authentication/AuthenticationCollectorInterface.php +++ b/core/lib/Drupal/Core/Authentication/AuthenticationCollectorInterface.php @@ -41,7 +41,7 @@ interface AuthenticationCollectorInterface { * @param string $provider_id * The provider ID. * - * @return \Drupal\Core\Authentication\AuthenticationProviderInterface|NULL + * @return \Drupal\Core\Authentication\AuthenticationProviderInterface|null * The authentication provider which matches the ID. */ public function getProvider($provider_id); diff --git a/core/lib/Drupal/Core/Authentication/AuthenticationManager.php b/core/lib/Drupal/Core/Authentication/AuthenticationManager.php index 10b0edc5c5c..1049c92bb62 100644 --- a/core/lib/Drupal/Core/Authentication/AuthenticationManager.php +++ b/core/lib/Drupal/Core/Authentication/AuthenticationManager.php @@ -94,7 +94,7 @@ class AuthenticationManager implements AuthenticationProviderInterface, Authenti * @param \Symfony\Component\HttpFoundation\Request $request * The incoming request. * - * @return string|NULL + * @return string|null * The id of the first authentication provider which applies to the request. * If no application detects appropriate credentials, then NULL is returned. */ @@ -112,7 +112,7 @@ class AuthenticationManager implements AuthenticationProviderInterface, Authenti * @param \Symfony\Component\HttpFoundation\Request $request * The incoming request. * - * @return string|NULL + * @return string|null * The ID of the first authentication provider which applies to the request. * If no application detects appropriate credentials, then NULL is returned. */ diff --git a/core/lib/Drupal/Core/Authentication/AuthenticationProviderChallengeInterface.php b/core/lib/Drupal/Core/Authentication/AuthenticationProviderChallengeInterface.php index 47210507a45..db86cc1a321 100644 --- a/core/lib/Drupal/Core/Authentication/AuthenticationProviderChallengeInterface.php +++ b/core/lib/Drupal/Core/Authentication/AuthenticationProviderChallengeInterface.php @@ -21,7 +21,7 @@ interface AuthenticationProviderChallengeInterface { * @param \Exception $previous * The previous exception. * - * @return \Symfony\Component\HttpKernel\Exception\HttpExceptionInterface|NULL + * @return \Symfony\Component\HttpKernel\Exception\HttpExceptionInterface|null * An exception to be used in order to generate an authentication challenge. */ public function challengeException(Request $request, \Exception $previous); diff --git a/core/lib/Drupal/Core/Authentication/AuthenticationProviderInterface.php b/core/lib/Drupal/Core/Authentication/AuthenticationProviderInterface.php index 7ef18dfb33b..02f04976472 100644 --- a/core/lib/Drupal/Core/Authentication/AuthenticationProviderInterface.php +++ b/core/lib/Drupal/Core/Authentication/AuthenticationProviderInterface.php @@ -27,7 +27,7 @@ interface AuthenticationProviderInterface { * @param \Symfony\Component\HttpFoundation\Request|null $request * The request object. * - * @return \Drupal\Core\Session\AccountInterface|NULL + * @return \Drupal\Core\Session\AccountInterface|null * AccountInterface - in case of a successful authentication. * NULL - in case where authentication failed. */ diff --git a/core/lib/Drupal/Core/Composer/Composer.php b/core/lib/Drupal/Core/Composer/Composer.php index 51a4917fd48..263be4c6e96 100644 --- a/core/lib/Drupal/Core/Composer/Composer.php +++ b/core/lib/Drupal/Core/Composer/Composer.php @@ -196,7 +196,7 @@ EOT; * @param string $package_name * The package name from composer. This is always already lower case. * - * @return NULL|string + * @return string|null * The string key, or NULL if none was found. */ protected static function findPackageKey($package_name) { diff --git a/core/lib/Drupal/Core/Config/ConfigCollectionInfo.php b/core/lib/Drupal/Core/Config/ConfigCollectionInfo.php index ca526cd7ea0..0ec82f9f254 100644 --- a/core/lib/Drupal/Core/Config/ConfigCollectionInfo.php +++ b/core/lib/Drupal/Core/Config/ConfigCollectionInfo.php @@ -63,7 +63,7 @@ class ConfigCollectionInfo extends Event { * @param string $collection * The configuration collection. * - * @return \Drupal\Core\Config\ConfigFactoryOverrideInterface|NULL + * @return \Drupal\Core\Config\ConfigFactoryOverrideInterface|null * The override service responsible for the collection if one exists. NULL * if not. */ diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityTypeInterface.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityTypeInterface.php index 2cb14342151..589a63d2c15 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityTypeInterface.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityTypeInterface.php @@ -65,7 +65,7 @@ interface ConfigEntityTypeInterface extends EntityTypeInterface { /** * Gets the config entity properties to export if declared on the annotation. * - * @return array|NULL + * @return array|null * The properties to export or NULL if they can not be determine from the * config entity type annotation. */ diff --git a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php index 4396a392823..80a41c4f036 100644 --- a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php +++ b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php @@ -189,7 +189,7 @@ class QueryFactory implements QueryFactoryInterface, EventSubscriberInterface { * @param int $start * Which position of $parts we are processing. Defaults to 0. * - * @return array|NULL + * @return array|null * The array of configuration values the match the provided key. NULL if * the configuration object does not have a value that corresponds to the * key. diff --git a/core/lib/Drupal/Core/DrupalKernelInterface.php b/core/lib/Drupal/Core/DrupalKernelInterface.php index 4f7e9c46102..862fbec59d0 100644 --- a/core/lib/Drupal/Core/DrupalKernelInterface.php +++ b/core/lib/Drupal/Core/DrupalKernelInterface.php @@ -58,7 +58,7 @@ interface DrupalKernelInterface extends HttpKernelInterface, ContainerAwareInter * * This also allows inspecting a built container for debugging purposes. * - * @return array|NULL + * @return array|null * The cached container definition or NULL if not found in cache. */ public function getCachedContainerDefinition(); diff --git a/core/lib/Drupal/Core/Entity/Controller/EntityController.php b/core/lib/Drupal/Core/Entity/Controller/EntityController.php index ebee7cca60b..4ca97e43ee4 100644 --- a/core/lib/Drupal/Core/Entity/Controller/EntityController.php +++ b/core/lib/Drupal/Core/Entity/Controller/EntityController.php @@ -273,7 +273,7 @@ class EntityController implements ContainerInjectionInterface { * (optional) The entity, set in * \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer. * - * @return \Drupal\Core\Entity\EntityInterface|NULL + * @return \Drupal\Core\Entity\EntityInterface|null * The entity, if it is passed in directly or if the first parameter of the * active route is an entity; otherwise, NULL. */ diff --git a/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php index 4f44409dfc7..62f5486cfd0 100644 --- a/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php @@ -30,14 +30,14 @@ class AuthenticationSubscriber implements EventSubscriberInterface { /** * Authentication provider filter. * - * @var \Drupal\Core\Authentication\AuthenticationProviderFilterInterface|NULL + * @var \Drupal\Core\Authentication\AuthenticationProviderFilterInterface|null */ protected $filter; /** * Authentication challenge provider. * - * @var \Drupal\Core\Authentication\AuthenticationProviderChallengeInterface|NULL + * @var \Drupal\Core\Authentication\AuthenticationProviderChallengeInterface|null */ protected $challengeProvider; diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php index add9cd77ebe..ca00bcc6485 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php @@ -190,7 +190,7 @@ abstract class OptionsWidgetBase extends WidgetBase { /** * Returns the empty option label to add to the list of options, if any. * - * @return string|NULL + * @return string|null * Either a label of the empty option, or NULL. */ protected function getEmptyLabel() { } diff --git a/core/lib/Drupal/Core/Form/EnforcedResponse.php b/core/lib/Drupal/Core/Form/EnforcedResponse.php index c28033fae98..2b1466d0a3c 100644 --- a/core/lib/Drupal/Core/Form/EnforcedResponse.php +++ b/core/lib/Drupal/Core/Form/EnforcedResponse.php @@ -37,7 +37,7 @@ class EnforcedResponse extends Response { * @param \Exception $e * The exception where the enforced response is to be extracted from. * - * @return \Drupal\Core\Form\EnforcedResponse|NULL + * @return \Drupal\Core\Form\EnforcedResponse|null * The enforced response or NULL if the exception chain does not contain a * \Drupal\Core\Form\EnforcedResponseException exception. */ diff --git a/core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php b/core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php index ddcd39dd443..8410e5af3f7 100644 --- a/core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php +++ b/core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php @@ -29,7 +29,7 @@ interface MenuActiveTrailInterface { * (optional) The menu within which to find the active link. If omitted, all * menus will be searched. * - * @return \Drupal\Core\Menu\MenuLinkInterface|NULL + * @return \Drupal\Core\Menu\MenuLinkInterface|null * The menu link for the given route name, parameters and menu, or NULL if * there is no matching menu link or the current user cannot access the * current page (i.e. we have a 403 response). diff --git a/core/lib/Drupal/Core/Menu/MenuLinkTreeElement.php b/core/lib/Drupal/Core/Menu/MenuLinkTreeElement.php index 1327c78c549..e7e12c42ba5 100644 --- a/core/lib/Drupal/Core/Menu/MenuLinkTreeElement.php +++ b/core/lib/Drupal/Core/Menu/MenuLinkTreeElement.php @@ -68,7 +68,7 @@ class MenuLinkTreeElement { * If the value is NULL the access was not determined yet, if an access result * object, it was determined already. * - * @var \Drupal\Core\Access\AccessResultInterface|NULL + * @var \Drupal\Core\Access\AccessResultInterface|null */ public $access; diff --git a/core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php b/core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php index 4ee308b96cb..0a580d64a39 100644 --- a/core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php +++ b/core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php @@ -41,7 +41,7 @@ interface MenuTreeStorageInterface { * @param string $id * The menu link plugin ID. * - * @return array|FALSE + * @return array|false * The plugin definition, or FALSE if no definition was found for the ID. */ public function load($id); diff --git a/core/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php b/core/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php index a833a79a9dc..1a5c41de66c 100644 --- a/core/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php +++ b/core/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php @@ -21,7 +21,7 @@ interface StaticMenuLinkOverridesInterface { * @param string $id * A menu link plugin ID. * - * @return array|NULL + * @return array|null * An override with following supported keys: * - parent * - weight diff --git a/core/lib/Drupal/Core/PageCache/RequestPolicyInterface.php b/core/lib/Drupal/Core/PageCache/RequestPolicyInterface.php index 9bd24a84d63..02b20cb781b 100644 --- a/core/lib/Drupal/Core/PageCache/RequestPolicyInterface.php +++ b/core/lib/Drupal/Core/PageCache/RequestPolicyInterface.php @@ -39,7 +39,7 @@ interface RequestPolicyInterface { * @param \Symfony\Component\HttpFoundation\Request $request * The incoming request object. * - * @return string|NULL + * @return string|null * One of static::ALLOW, static::DENY or NULL. Calling code may attempt to * deliver a cached page if static::ALLOW is returned. Returns NULL if the * policy is not specified for the given request. diff --git a/core/lib/Drupal/Core/PageCache/ResponsePolicyInterface.php b/core/lib/Drupal/Core/PageCache/ResponsePolicyInterface.php index a82427b107f..0d3f9655476 100644 --- a/core/lib/Drupal/Core/PageCache/ResponsePolicyInterface.php +++ b/core/lib/Drupal/Core/PageCache/ResponsePolicyInterface.php @@ -27,7 +27,7 @@ interface ResponsePolicyInterface { * @param \Symfony\Component\HttpFoundation\Request $request * The request object. * - * @return string|NULL + * @return string|null * Either static::DENY or NULL. Calling code may attempt to store a page in * the cache unless static::DENY is returned. Returns NULL if the policy * policy is not specified for the given response. diff --git a/core/lib/Drupal/Core/Plugin/Context/Context.php b/core/lib/Drupal/Core/Plugin/Context/Context.php index 87fab3a1d75..35eaacda59d 100644 --- a/core/lib/Drupal/Core/Plugin/Context/Context.php +++ b/core/lib/Drupal/Core/Plugin/Context/Context.php @@ -42,7 +42,7 @@ class Context extends ComponentContext implements ContextInterface { * * @param \Drupal\Core\Plugin\Context\ContextDefinitionInterface $context_definition * The context definition. - * @param mixed $context_value|NULL + * @param mixed $context_value|null * The context value object. */ public function __construct(ContextDefinitionInterface $context_definition, $context_value = NULL) { diff --git a/core/lib/Drupal/Core/Routing/StackedRouteMatchInterface.php b/core/lib/Drupal/Core/Routing/StackedRouteMatchInterface.php index 8cc4fb5bd6b..986e900e4c8 100644 --- a/core/lib/Drupal/Core/Routing/StackedRouteMatchInterface.php +++ b/core/lib/Drupal/Core/Routing/StackedRouteMatchInterface.php @@ -28,7 +28,7 @@ interface StackedRouteMatchInterface extends RouteMatchInterface { /** * Returns the parent route match of the current. * - * @return \Drupal\Core\Routing\RouteMatchInterface|NULL + * @return \Drupal\Core\Routing\RouteMatchInterface|null * The parent route match or NULL, if it the master route match. */ public function getParentRouteMatch(); @@ -39,7 +39,7 @@ interface StackedRouteMatchInterface extends RouteMatchInterface { * @param \Symfony\Component\HttpFoundation\Request * The request. * - * @return \Drupal\Core\Routing\RouteMatchInterface|NULL + * @return \Drupal\Core\Routing\RouteMatchInterface|null * THe matching route match, or NULL if there is no matching one. */ public function getRouteMatchFromRequest(Request $request); diff --git a/core/lib/Drupal/Core/Session/AccountProxy.php b/core/lib/Drupal/Core/Session/AccountProxy.php index a50a289fb0e..7aa95ae10a2 100644 --- a/core/lib/Drupal/Core/Session/AccountProxy.php +++ b/core/lib/Drupal/Core/Session/AccountProxy.php @@ -179,7 +179,7 @@ class AccountProxy implements AccountProxyInterface { * @param int $account_id * The id of an account to load. * - * @return \Drupal\Core\Session\AccountInterface|NULL + * @return \Drupal\Core\Session\AccountInterface|null * An account or NULL if none is found. */ protected function loadUserEntity($account_id) { diff --git a/core/lib/Drupal/Core/Session/SessionConfiguration.php b/core/lib/Drupal/Core/Session/SessionConfiguration.php index 351e57d2693..49dc63e915e 100644 --- a/core/lib/Drupal/Core/Session/SessionConfiguration.php +++ b/core/lib/Drupal/Core/Session/SessionConfiguration.php @@ -141,7 +141,7 @@ class SessionConfiguration implements SessionConfigurationInterface { /** * Wraps drupal_valid_test_ua(). * - * @return string|FALSE + * @return string|false * Either the simpletest prefix (the string "simpletest" followed by any * number of digits) or FALSE if the user agent does not contain a valid * HMAC and timestamp. diff --git a/core/lib/Drupal/Core/StringTranslation/Translator/TranslatorInterface.php b/core/lib/Drupal/Core/StringTranslation/Translator/TranslatorInterface.php index 367581bb14a..e0fee163d8d 100644 --- a/core/lib/Drupal/Core/StringTranslation/Translator/TranslatorInterface.php +++ b/core/lib/Drupal/Core/StringTranslation/Translator/TranslatorInterface.php @@ -17,7 +17,7 @@ interface TranslatorInterface { * @param string $context * The string context. * - * @return string|FALSE + * @return string|false * Translated string if there is a translation, FALSE if not. */ public function getStringTranslation($langcode, $string, $context); diff --git a/core/lib/Drupal/Core/Theme/ThemeNegotiator.php b/core/lib/Drupal/Core/Theme/ThemeNegotiator.php index 1d6b589a1ac..3064eb073e6 100644 --- a/core/lib/Drupal/Core/Theme/ThemeNegotiator.php +++ b/core/lib/Drupal/Core/Theme/ThemeNegotiator.php @@ -24,7 +24,7 @@ class ThemeNegotiator implements ThemeNegotiatorInterface { * * Set to NULL if the array needs to be re-calculated. * - * @var array|NULL + * @var array|null */ protected $sortedNegotiators; diff --git a/core/modules/ckeditor/src/CKEditorPluginInterface.php b/core/modules/ckeditor/src/CKEditorPluginInterface.php index 65475a094bb..543a112dfb6 100644 --- a/core/modules/ckeditor/src/CKEditorPluginInterface.php +++ b/core/modules/ckeditor/src/CKEditorPluginInterface.php @@ -71,7 +71,7 @@ interface CKEditorPluginInterface extends PluginInspectionInterface { * Note: this does not use a Drupal library because this uses CKEditor's API, * see http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.resourceManager.html#addExternal. * - * @return string|FALSE + * @return string|false * The Drupal root-relative path to the file, FALSE if an internal plugin. */ public function getFile(); diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php index 888fec0e907..75b78a5a5e7 100644 --- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php +++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php @@ -115,7 +115,7 @@ class StylesCombo extends CKEditorPluginBase implements CKEditorPluginConfigurab * * @param string $styles * The "styles" setting. - * @return array|FALSE + * @return array|false * An array containing the "stylesSet" configuration, or FALSE when the * syntax is invalid. */ diff --git a/core/modules/comment/src/CommentInterface.php b/core/modules/comment/src/CommentInterface.php index 72a66524bff..28318eea153 100644 --- a/core/modules/comment/src/CommentInterface.php +++ b/core/modules/comment/src/CommentInterface.php @@ -32,7 +32,7 @@ interface CommentInterface extends ContentEntityInterface, EntityChangedInterfac /** * Returns the parent comment entity if this is a reply to a comment. * - * @return \Drupal\comment\CommentInterface|NULL + * @return \Drupal\comment\CommentInterface|null * A comment entity of the parent comment or NULL if there is no parent. */ public function getParentComment(); diff --git a/core/modules/file/file.module b/core/modules/file/file.module index 9f6e9fcfe01..c63fff4358f 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -1318,7 +1318,7 @@ function file_icon_class($mime_type) { * @param string $mime_type * A MIME type. * - * @return string|FALSE + * @return string|false * The generic icon MIME package expected for this file. */ function file_icon_map($mime_type) { diff --git a/core/modules/filter/src/FilterFormatInterface.php b/core/modules/filter/src/FilterFormatInterface.php index 30b612cc1ad..6008f3fa400 100644 --- a/core/modules/filter/src/FilterFormatInterface.php +++ b/core/modules/filter/src/FilterFormatInterface.php @@ -70,7 +70,7 @@ interface FilterFormatInterface extends ConfigEntityInterface { * It is up to the caller to handle this in whatever way it sees fit; this way * no information granularity is lost. * - * @return array|FALSE + * @return array|false * A structured array as returned by FilterInterface::getHTMLRestrictions(), * but with the intersection of all filters in this text format. * Will either indicate blacklisting of tags or whitelisting of tags. In diff --git a/core/modules/filter/src/Plugin/FilterInterface.php b/core/modules/filter/src/Plugin/FilterInterface.php index d42d5ccc680..18f1fde893e 100644 --- a/core/modules/filter/src/Plugin/FilterInterface.php +++ b/core/modules/filter/src/Plugin/FilterInterface.php @@ -182,7 +182,7 @@ interface FilterInterface extends ConfigurablePluginInterface, PluginInspectionI * a generic manner into which HTML tags and attributes are allowed by a * format. * - * @return array|FALSE + * @return array|false * A nested array with *either* of the following keys: * - 'allowed': (optional) the allowed tags as keys, and for each of those * tags (keys) either of the following values: diff --git a/core/modules/locale/src/LocaleConfigManager.php b/core/modules/locale/src/LocaleConfigManager.php index 2de875e29c6..bc598e21de7 100644 --- a/core/modules/locale/src/LocaleConfigManager.php +++ b/core/modules/locale/src/LocaleConfigManager.php @@ -434,7 +434,7 @@ class LocaleConfigManager { * @param string $context * The string context. * - * @return \Drupal\locale\TranslationString|FALSE + * @return \Drupal\locale\TranslationString|false * The translation object if the string was not empty or FALSE otherwise. */ public function getStringTranslation($name, $langcode, $source, $context) { diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php index 3617f38ed08..d3adce883ff 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php @@ -147,7 +147,7 @@ class EntityContentBase extends Entity { * @param \Drupal\migrate\Row $row * The row object to update from. * - * @return NULL|\Drupal\Core\Entity\EntityInterface + * @return \Drupal\Core\Entity\EntityInterface|null * An updated entity, or NULL if it's the same as the one passed in. */ protected function updateEntity(EntityInterface $entity, Row $row) { diff --git a/core/modules/migrate_drupal/src/MigrationConfigurationTrait.php b/core/modules/migrate_drupal/src/MigrationConfigurationTrait.php index a7aab64a156..683823296a8 100644 --- a/core/modules/migrate_drupal/src/MigrationConfigurationTrait.php +++ b/core/modules/migrate_drupal/src/MigrationConfigurationTrait.php @@ -125,7 +125,7 @@ trait MigrationConfigurationTrait { * @param \Drupal\Core\Database\Connection $connection * The database connection object. * - * @return int|FALSE + * @return int|false * An integer representing the major branch of Drupal core (e.g. '6' for * Drupal 6.x), or FALSE if no valid version is matched. */ diff --git a/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php b/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php index 99e64acdd08..74311850a9b 100644 --- a/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php +++ b/core/modules/rdf/tests/src/Kernel/Field/FieldRdfaTestBase.php @@ -167,7 +167,7 @@ abstract class FieldRdfaTestBase extends FieldKernelTestBase { * @param array $arguments * Some arguments for the xpath. * - * @return array|FALSE + * @return array|false * The return value of the xpath search. For details on the xpath string * format and return values see the SimpleXML documentation, * http://php.net/manual/function.simplexml-element-xpath.php. diff --git a/core/modules/rest/src/Tests/RESTTestBase.php b/core/modules/rest/src/Tests/RESTTestBase.php index 7f67b9314bc..4f8a0f196e7 100644 --- a/core/modules/rest/src/Tests/RESTTestBase.php +++ b/core/modules/rest/src/Tests/RESTTestBase.php @@ -449,7 +449,7 @@ abstract class RESTTestBase extends WebTestBase { * @param string $location_url * The URL returned in the Location header. * - * @return \Drupal\Core\Entity\Entity|FALSE. + * @return \Drupal\Core\Entity\Entity|false * The entity or FALSE if there is no matching entity. */ protected function loadEntityFromLocationHeader($location_url) { diff --git a/core/modules/simpletest/src/AssertContentTrait.php b/core/modules/simpletest/src/AssertContentTrait.php index e428e71f22e..e19f319c7ce 100644 --- a/core/modules/simpletest/src/AssertContentTrait.php +++ b/core/modules/simpletest/src/AssertContentTrait.php @@ -117,7 +117,7 @@ trait AssertContentTrait { /** * Parse content returned from curlExec using DOM and SimpleXML. * - * @return \SimpleXMLElement|FALSE + * @return \SimpleXMLElement|false * A SimpleXMLElement or FALSE on failure. */ protected function parse() { diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module index 5419645ad62..922ed57c37c 100644 --- a/core/modules/statistics/statistics.module +++ b/core/modules/statistics/statistics.module @@ -87,7 +87,7 @@ function statistics_cron() { * @param int $dbrows * The number of rows to be returned. * - * @return SelectQuery|FALSE + * @return SelectQuery|false * A query result containing the node ID, title, user ID that owns the node, * and the username for the selected node(s), or FALSE if the query could not * be executed correctly. diff --git a/core/modules/system/src/Tests/Theme/TwigTransTest.php b/core/modules/system/src/Tests/Theme/TwigTransTest.php index bd0ca18ef17..b8718e7fa87 100644 --- a/core/modules/system/src/Tests/Theme/TwigTransTest.php +++ b/core/modules/system/src/Tests/Theme/TwigTransTest.php @@ -229,7 +229,7 @@ class TwigTransTest extends WebTestBase { * @param string $langcode * The langcode of the specified language. * - * @return string|FALSE + * @return string|false * The .po contents for the specified language or FALSE if none exists. */ protected function poFileContents($langcode) { diff --git a/core/modules/user/src/Authentication/Provider/Cookie.php b/core/modules/user/src/Authentication/Provider/Cookie.php index 2f8624e4c7a..ebcdae7517a 100644 --- a/core/modules/user/src/Authentication/Provider/Cookie.php +++ b/core/modules/user/src/Authentication/Provider/Cookie.php @@ -62,7 +62,7 @@ class Cookie implements AuthenticationProviderInterface { * @param \Symfony\Component\HttpFoundation\Session\SessionInterface $session * The session. * - * @return \Drupal\Core\Session\AccountInterface|NULL + * @return \Drupal\Core\Session\AccountInterface|null * The UserSession object for the current user, or NULL if this is an * anonymous session. */ diff --git a/core/modules/views/src/Plugin/views/access/AccessPluginBase.php b/core/modules/views/src/Plugin/views/access/AccessPluginBase.php index 7a9b27f9d78..ee568e118f3 100644 --- a/core/modules/views/src/Plugin/views/access/AccessPluginBase.php +++ b/core/modules/views/src/Plugin/views/access/AccessPluginBase.php @@ -58,7 +58,7 @@ abstract class AccessPluginBase extends PluginBase { * @param \Drupal\Core\Session\AccountInterface $account * The user who wants to access this view. * - * @return TRUE + * @return bool * Returns whether the user has access to the view. */ abstract public function access(AccountInterface $account); diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php b/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php index 982b4ce28ad..d3b4c79b659 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php @@ -233,7 +233,7 @@ interface DisplayPluginInterface { * block display links to a page display, the page display will be returned * in both cases. * - * @return \Drupal\views\Plugin\views\display\DisplayRouterInterface|NULL + * @return \Drupal\views\Plugin\views\display\DisplayRouterInterface|null */ public function getRoutedDisplay(); diff --git a/core/modules/views/src/Plugin/views/filter/InOperator.php b/core/modules/views/src/Plugin/views/filter/InOperator.php index 593e97b10c6..aa3e21f8dc4 100644 --- a/core/modules/views/src/Plugin/views/filter/InOperator.php +++ b/core/modules/views/src/Plugin/views/filter/InOperator.php @@ -54,7 +54,7 @@ class InOperator extends FilterPluginBase { * This can use a guard to be used to reduce database hits as much as * possible. * - * @return array|NULL + * @return array|null * The stored values from $this->valueOptions. */ public function getValueOptions() { diff --git a/core/modules/views/src/Tests/Handler/FieldWebTest.php b/core/modules/views/src/Tests/Handler/FieldWebTest.php index a6ff1b49dbf..e85206985a9 100644 --- a/core/modules/views/src/Tests/Handler/FieldWebTest.php +++ b/core/modules/views/src/Tests/Handler/FieldWebTest.php @@ -169,7 +169,7 @@ class FieldWebTest extends HandlerTestBase { * @param array $arguments * Some arguments for the xpath. * - * @return array|FALSE + * @return array|false * The return value of the xpath search. For details on the xpath string * format and return values see the SimpleXML documentation, * http://php.net/manual/function.simplexml-element-xpath.php. diff --git a/core/modules/views/src/Tests/Plugin/CacheTagTest.php b/core/modules/views/src/Tests/Plugin/CacheTagTest.php index 057110e1ca2..eaee6569d10 100644 --- a/core/modules/views/src/Tests/Plugin/CacheTagTest.php +++ b/core/modules/views/src/Tests/Plugin/CacheTagTest.php @@ -97,7 +97,7 @@ class CacheTagTest extends PluginTestBase { * @param \Drupal\views\ViewExecutable $view * The view. * - * @return array|FALSE + * @return array|false * The render cache result or FALSE if not existent. */ protected function getRenderCache(ViewExecutable $view) { diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index dae5b7a2930..29468f754ce 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -46,7 +46,6 @@ -