diff --git a/lib/Drupal/views/Plugin/views/HandlerBase.php b/lib/Drupal/views/Plugin/views/HandlerBase.php index 08280ac4fe3cb7ced7a027669d5694178c7969e6..e67614e057fa95c4ece04f3f0b14965a48cabff9 100644 --- a/lib/Drupal/views/Plugin/views/HandlerBase.php +++ b/lib/Drupal/views/Plugin/views/HandlerBase.php @@ -11,8 +11,6 @@ use Drupal\views\Plugin\views\PluginBase; use Drupal\views\ViewExecutable; use Drupal\Core\Database\Database; -use DateTimeZone; -use DateTime; abstract class HandlerBase extends PluginBase { @@ -714,8 +712,8 @@ public function getSQLDateField() { $db_type = Database::getConnection()->databaseType(); $offset = $this->getTimezone(); if (isset($offset) && !is_numeric($offset)) { - $dtz = new DateTimeZone($offset); - $dt = new DateTime('now', $dtz); + $dtz = new \DateTimeZone($offset); + $dt = new \DateTime('now', $dtz); $offset_seconds = $dtz->getOffset($dt); } diff --git a/lib/Drupal/views/Plugin/views/wizard/WizardException.php b/lib/Drupal/views/Plugin/views/wizard/WizardException.php index e7a70bf451de3f1d4e393d6f0e009d5faaaa8b69..2c188da9e5fcec25e83f7116d0699a4914fddcf2 100644 --- a/lib/Drupal/views/Plugin/views/wizard/WizardException.php +++ b/lib/Drupal/views/Plugin/views/wizard/WizardException.php @@ -7,11 +7,9 @@ namespace Drupal\views\Plugin\views\wizard; -use Exception; - /** * A custom exception class for our errors. */ -class WizardException extends Exception { +class WizardException extends \Exception { } diff --git a/lib/Drupal/views/Tests/Handler/FieldTest.php b/lib/Drupal/views/Tests/Handler/FieldTest.php index 1f54db3322fefcd4da488a4bc69359f394cc35e4..967eae8890fca04ae9d9400a30e500d39f87453b 100644 --- a/lib/Drupal/views/Tests/Handler/FieldTest.php +++ b/lib/Drupal/views/Tests/Handler/FieldTest.php @@ -12,7 +12,6 @@ * * @see Drupal\views\Plugin\views\field\FieldPluginBase */ -use DOMDocument; class FieldTest extends HandlerTestBase { @@ -170,7 +169,7 @@ protected function assertNotSubString($haystack, $needle, $message = '', $group * An array containing simplexml objects. */ protected function parseContent($content) { - $htmlDom = new DOMDocument(); + $htmlDom = new \DOMDocument(); @$htmlDom->loadHTML('<?xml encoding="UTF-8">' . $content); $elements = simplexml_import_dom($htmlDom); diff --git a/lib/Drupal/views/Tests/Plugin/StyleTestBase.php b/lib/Drupal/views/Tests/Plugin/StyleTestBase.php index 20fb2d65cdf177d4ec48de13402af7f0aafafbd1..e60c217769ae3f8ac116490b6dfce08335d93c2a 100644 --- a/lib/Drupal/views/Tests/Plugin/StyleTestBase.php +++ b/lib/Drupal/views/Tests/Plugin/StyleTestBase.php @@ -7,8 +7,6 @@ namespace Drupal\views\Tests\Plugin; -use DOMDocument; - /** * Tests some general style plugin related functionality. */ @@ -31,7 +29,7 @@ protected function setUp() { * Stores a view output in the elements. */ function storeViewPreview($output) { - $htmlDom = new DOMDocument(); + $htmlDom = new \DOMDocument(); @$htmlDom->loadHTML($output); if ($htmlDom) { // It's much easier to work with simplexml than DOM, luckily enough diff --git a/lib/Drupal/views/Tests/PluginInstanceTest.php b/lib/Drupal/views/Tests/PluginInstanceTest.php index b9187727c946f5fe3c5a13447a9ffa06b151d33d..5880136b8f2e4e8e874a79283a7d3befd1837776 100644 --- a/lib/Drupal/views/Tests/PluginInstanceTest.php +++ b/lib/Drupal/views/Tests/PluginInstanceTest.php @@ -7,8 +7,6 @@ namespace Drupal\views\Tests; -use ReflectionClass; - /** * Checks general plugin data and instances for all plugin types. */ @@ -93,7 +91,7 @@ public function testPluginInstances() { foreach ($plugins as $definition) { // Get a reflection class for this plugin. // We only want to test true plugins, i.e. They extend PluginBase. - $reflection = new ReflectionClass($definition['class']); + $reflection = new \ReflectionClass($definition['class']); if ($reflection->isSubclassOf('Drupal\views\Plugin\views\PluginBase')) { // Create a plugin instance and check what it is. This is not just // good to check they can be created but for throwing any notices for diff --git a/lib/Views/node/Plugin/views/row/Rss.php b/lib/Views/node/Plugin/views/row/Rss.php index d0a58eb4db8adaac02b4e34ebd054cda13cf038b..0d5a8df31bfc9cddaedc344039205614ccbd49a0 100644 --- a/lib/Views/node/Plugin/views/row/Rss.php +++ b/lib/Views/node/Plugin/views/row/Rss.php @@ -10,7 +10,6 @@ use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Translation; use Drupal\views\Plugin\views\row\RowPluginBase; -use stdClass; /** * Plugin which performs a node_view on the resulting object @@ -165,7 +164,7 @@ function render($row) { $item_text .= drupal_render($build); } - $item = new stdClass(); + $item = new \stdClass(); $item->description = $item_text; $item->title = $node->label(); $item->link = $node->link;