Skip to content
Snippets Groups Projects
Verified Commit 7254d6f8 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3489348 by quietone, daffie, smustgrave, larowlan: Fix...

Issue #3489348 by quietone, daffie, smustgrave, larowlan: Fix Drupal.Commenting.FunctionComment.MissingReturnComment in core/lib/Drupal/Core/f-z
parent 787cc8ab
No related branches found
No related tags found
No related merge requests found
Showing
with 31 additions and 10 deletions
......@@ -177,6 +177,7 @@ public function getUniqueIdentifier() {
* Gets the base field definition.
*
* @return \Drupal\Core\Field\BaseFieldDefinition
* An associative array of the base field definition.
*/
protected function getBaseFieldDefinition() {
if (!isset($this->baseFieldDefinition)) {
......
......@@ -258,6 +258,7 @@ public function getFieldStorageDefinition();
* The bundle to get the configurable field for.
*
* @return \Drupal\Core\Field\FieldConfigInterface
* The configuration entity for the field.
*/
public function getConfig($bundle);
......@@ -265,6 +266,7 @@ public function getConfig($bundle);
* Returns a unique identifier for the field.
*
* @return string
* The unique ID for the field.
*/
public function getUniqueIdentifier();
......
......@@ -41,6 +41,7 @@ public function __construct(FieldStorageDefinitionInterface $field_storage_defin
* The field storage definition.
*
* @return \Drupal\Core\Field\FieldStorageDefinitionInterface
* The field storage definition for the entity.
*/
public function getFieldStorageDefinition() {
return $this->fieldStorageDefinition;
......@@ -50,6 +51,7 @@ public function getFieldStorageDefinition() {
* The original field storage definition.
*
* @return \Drupal\Core\Field\FieldStorageDefinitionInterface
* The field storage definition for the original entity.
*/
public function getOriginal() {
return $this->original;
......
......@@ -326,6 +326,7 @@ public function isBaseField();
* Returns a unique identifier for the field storage.
*
* @return string
* A unique identifier for the field storage.
*/
public function getUniqueStorageIdentifier();
......
......@@ -116,6 +116,7 @@ protected function config($name) {
* when the config factory needs to be manipulated directly.
*
* @return \Drupal\Core\Config\ConfigFactoryInterface
* The configuration factory for this form.
*/
protected function configFactory() {
if (!$this->configFactory) {
......@@ -161,6 +162,7 @@ protected function getRequest() {
* Gets the route match.
*
* @return \Drupal\Core\Routing\RouteMatchInterface
* The currently active route match object.
*/
protected function getRouteMatch() {
if (!$this->routeMatch) {
......
......@@ -185,6 +185,7 @@ public function submitForm($form_arg, FormStateInterface &$form_state, mixed ...
* array.
*
* @return mixed|\Symfony\Component\HttpFoundation\Response
* The form array or a response object.
*/
public function retrieveForm($form_id, FormStateInterface &$form_state);
......@@ -205,6 +206,7 @@ public function retrieveForm($form_id, FormStateInterface &$form_state);
* sanitized \Drupal::request()->request data, is also accumulated here.
*
* @return \Symfony\Component\HttpFoundation\RedirectResponse|null
* The form response or NULL when the form was submitted programmatically.
*/
public function processForm($form_id, &$form, FormStateInterface &$form_state);
......@@ -318,6 +320,7 @@ public function prepareForm($form_id, &$form, FormStateInterface &$form_state);
* as well as the sanitized \Drupal::request()->request data.
*
* @return array
* The completely built form.
*/
public function doBuildForm($form_id, &$element, FormStateInterface &$form_state);
......
......@@ -660,6 +660,8 @@ public function setRequestMethod($method) {
* have side-effects, such as persisting $form_state changes.
*
* @return bool
* TRUE if the request method is considered a safe HTTP method. Otherwise
* FALSE.
*
* @see \Symfony\Component\HttpFoundation\Request::isMethodSafe()
* @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1.1
......
......@@ -748,6 +748,7 @@ public function setGroups(array $groups);
* Returns references to details elements to render them within vertical tabs.
*
* @return array
* References to details elements to render them within vertical tabs.
*/
public function &getGroups();
......@@ -924,6 +925,7 @@ public function setProgrammedBypassAccessCheck($programmed_bypass_access_check =
* Determines if this form submission should bypass #access.
*
* @return bool
* TRUE if this form bypassing access checked, otherwise FALSE.
*
* @see \Drupal\Core\Form\FormState::$programmed_bypass_access_check
*/
......
......@@ -69,6 +69,8 @@ public function executeSubmitHandlers(&$form, FormStateInterface &$form_state);
* The current state of the form.
*
* @return \Symfony\Component\HttpFoundation\RedirectResponse|null
* The HTTP response if the form submission results in a redirect, otherwise
* NULL.
*
* @see \Drupal\Core\Form\FormBuilderInterface::processForm()
* @see \Drupal\Core\Form\FormBuilderInterface::buildForm()
......
......@@ -386,6 +386,8 @@ protected function performRequiredValidation(&$elements, FormStateInterface &$fo
* The current state of the form.
*
* @return array|null
* An array of validation errors for the triggering element. Defaults to
* NULL, which turns off error suppression.
*/
protected function determineLimitValidationErrors(FormStateInterface &$form_state) {
// While this element is being validated, it may be desired that some
......
......@@ -68,6 +68,7 @@ public static function createForSubform(array &$subform, array &$parent_form, Fo
* The property name (#parents or #array_parents).
*
* @return mixed
* The form parents relative to its parent form.
*
* @throws \InvalidArgumentException
* Thrown when the requested property does not exist.
......
......@@ -45,6 +45,7 @@ interface SubformStateInterface extends FormStateInterface {
* Gets the complete form state.
*
* @return \Drupal\Core\Form\FormStateInterface
* The form state.
*/
public function getCompleteFormState();
......
......@@ -30,6 +30,7 @@ class GeneratedLink extends BubbleableMetadata implements MarkupInterface, \Coun
* Gets the generated link.
*
* @return string
* The generated link.
*/
public function getGeneratedLink() {
return $this->generatedLink;
......
......@@ -23,6 +23,7 @@ class GeneratedUrl extends BubbleableMetadata {
* Gets the generated URL.
*
* @return string
* The generated URL.
*/
public function getGeneratedUrl() {
return $this->generatedUrl;
......
......@@ -164,8 +164,6 @@ public static function collectAllHookImplementations(array $module_filenames, ?C
* matched first.
* @param $skip_procedural
* Skip the procedural check for the current module.
*
* @return void
*/
protected function collectModuleHookImplementations($dir, $module, $module_preg, bool $skip_procedural): void {
$hook_file_cache = FileCacheFactory::get('hook_implementations');
......@@ -304,10 +302,8 @@ protected static function getHookAttributesInClass(string $class): array {
* The class in which said attribute resides in.
* @param $module
* The module in which the class resides in.
*
* @return void
*/
protected function addFromAttribute(Hook $hook, $class, $module) {
protected function addFromAttribute(Hook $hook, $class, $module): void {
if ($hook->module) {
$module = $hook->module;
}
......@@ -326,10 +322,8 @@ protected function addFromAttribute(Hook $hook, $class, $module) {
* The name of the module. (Truly shocking!)
* @param string $function
* The name of function implementing the hook. (Wow!)
*
* @return void
*/
protected function addProceduralImplementation(\SplFileInfo $fileinfo, string $hook, string $module, string $function) {
protected function addProceduralImplementation(\SplFileInfo $fileinfo, string $hook, string $module, string $function): void {
$this->addFromAttribute(new Hook($hook, $module . '_' . $hook), ProceduralCall::class, $module);
if ($hook === 'hook_info') {
$this->hookInfo[] = $function;
......@@ -369,8 +363,6 @@ public function getImplementations(): array {
* The hook to check.
* @param string $class
* The class the hook is implemented on.
*
* @return void
*/
public static function checkForProceduralOnlyHooks(Hook $hook, string $class): void {
$staticDenyHooks = [
......
......@@ -17,6 +17,7 @@ interface LinkRelationTypeInterface {
* Indicates whether this link relation type is of the 'registered' kind.
*
* @return bool
* TRUE if the link relation is registered, FALSE otherwise.
*
* @see https://tools.ietf.org/html/rfc5988#section-4.1
*/
......@@ -26,6 +27,7 @@ public function isRegistered();
* Indicates whether this link relation type is of the 'extension' kind.
*
* @return bool
* TRUE if the link relation is an extension type, FALSE otherwise.
*
* @see https://tools.ietf.org/html/rfc5988#section-4.2
*/
......
......@@ -59,6 +59,7 @@ public function __construct(array $configuration, $plugin_id, array $plugin_defi
* image toolkit operation developers.
*
* @return \Drupal\Core\ImageToolkit\ImageToolkitInterface
* The image toolkit in use.
*/
protected function getToolkit() {
return $this->toolkit;
......
......@@ -38,6 +38,7 @@ public function __construct($message, $title = 'Error', $code = 0, ?\Exception $
* Returns the exception page title.
*
* @return string
* The page title.
*/
public function getTitle() {
return $this->title;
......
......@@ -18,6 +18,7 @@ trait InstallerRedirectTrait {
* Returns whether the current PHP process runs on CLI.
*
* @return bool
* TRUE if the current PHP process is running on CLI, otherwise FALSE.
*/
protected function isCli() {
return PHP_SAPI === 'cli';
......
......@@ -96,6 +96,7 @@ public function calculateDependencies() {
*
* @return \Drupal\Core\Layout\LayoutDefinition
*/
// phpcs:ignore Drupal.Commenting.FunctionComment.MissingReturnComment
public function getPluginDefinition() {
return parent::getPluginDefinition();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment