Skip to content
Snippets Groups Projects
Unverified Commit d61ce301 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3147135 by longwave: Fix 'Drupal.Classes.UseGlobalClass' coding standard

parent ee0a221d
Branches
Tags
6 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!16Draft: Resolve #2081585 "History storage"
......@@ -2,8 +2,6 @@
namespace Drupal\Component\Assertion;
use Traversable;
/**
* Generic inspections for the assert() statement.
*
......@@ -30,7 +28,7 @@ class Inspector {
* TRUE if $traversable can be traversed with foreach.
*/
public static function assertTraversable($traversable) {
return is_array($traversable) || $traversable instanceof Traversable;
return is_array($traversable) || $traversable instanceof \Traversable;
}
/**
......
......@@ -2,10 +2,8 @@
namespace Drupal\Component\Plugin\Exception;
use BadMethodCallException;
/**
* Exception thrown when a decorator's _call() method is triggered, but the
* decorated object does not contain the requested method.
*/
class InvalidDecoratedMethod extends BadMethodCallException implements ExceptionInterface {}
class InvalidDecoratedMethod extends \BadMethodCallException implements ExceptionInterface {}
......@@ -2,8 +2,6 @@
namespace Drupal\migrate\Exception;
use Exception;
/**
* Defines an exception thrown when a migration does not meet the requirements.
*
......@@ -30,7 +28,7 @@ class RequirementsException extends \RuntimeException {
* @param \Exception $previous
* (optional) The previous exception used for the exception chaining.
*/
public function __construct($message = "", array $requirements = [], $code = 0, Exception $previous = NULL) {
public function __construct($message = "", array $requirements = [], $code = 0, \Exception $previous = NULL) {
parent::__construct($message, $code, $previous);
$this->requirements = $requirements;
......
......@@ -36,6 +36,7 @@
<rule ref="Drupal.Classes.FullyQualifiedNamespace"/>
<rule ref="Drupal.Classes.InterfaceName"/>
<rule ref="Drupal.Classes.UnusedUseStatement"/>
<rule ref="Drupal.Classes.UseGlobalClass"/>
<rule ref="Drupal.Classes.UseLeadingBackslash"/>
<rule ref="Drupal.CSS.ClassDefinitionNameSpacing"/>
<rule ref="Drupal.CSS.ColourDefinition"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment