diff --git a/core/modules/aggregator/aggregator.theme.inc b/core/modules/aggregator/aggregator.theme.inc
index a47a611..24e9a12 100644
--- a/core/modules/aggregator/aggregator.theme.inc
+++ b/core/modules/aggregator/aggregator.theme.inc
@@ -17,7 +17,7 @@
  *   An associative array containing:
  *   - elements: An array of elements to display in view mode.
  */
-function template_preprocess_aggregator_item(&$variables) {
+function template_preprocess_aggregator_item(array &$variables) {
   $item = $variables['elements']['#aggregator_item'];
 
   // Helpful $content variable for templates.
@@ -38,7 +38,7 @@ function template_preprocess_aggregator_item(&$variables) {
  *   An associative array containing:
  *   - elements: An array of elements to display in view mode.
  */
-function template_preprocess_aggregator_feed(&$variables) {
+function template_preprocess_aggregator_feed(array &$variables) {
   $feed = $variables['elements']['#aggregator_feed'];
 
   // Helpful $content variable for templates.
diff --git a/core/modules/aggregator/src/Annotation/AggregatorFetcher.php b/core/modules/aggregator/src/Annotation/AggregatorFetcher.php
index db66347..c033f4b 100644
--- a/core/modules/aggregator/src/Annotation/AggregatorFetcher.php
+++ b/core/modules/aggregator/src/Annotation/AggregatorFetcher.php
@@ -12,9 +12,9 @@
 /**
  * Defines a Plugin annotation object for aggregator fetcher plugins.
  *
- * Plugin Namespace: Plugin\aggregator\fetcher
+ * Plugin Namespace: Plugin\aggregator\fetcher.
  *
- * For a working example, see \Drupal\aggregator\Plugin\aggregator\fetcher\DefaultFetcher
+ * @see \Drupal\aggregator\Plugin\aggregator\fetcher\DefaultFetcher
  *
  * @see \Drupal\aggregator\Plugin\AggregatorPluginManager
  * @see \Drupal\aggregator\Plugin\FetcherInterface
diff --git a/core/modules/aggregator/src/Annotation/AggregatorParser.php b/core/modules/aggregator/src/Annotation/AggregatorParser.php
index 45842b6..b566572 100644
--- a/core/modules/aggregator/src/Annotation/AggregatorParser.php
+++ b/core/modules/aggregator/src/Annotation/AggregatorParser.php
@@ -12,9 +12,9 @@
 /**
  * Defines a Plugin annotation object for aggregator parser plugins.
  *
- * Plugin Namespace: Plugin\aggregator\parser
+ * Plugin Namespace: Plugin\aggregator\parser.
  *
- * For a working example, see \Drupal\aggregator\Plugin\aggregator\parser\DefaultParser
+ * @see \Drupal\aggregator\Plugin\aggregator\parser\DefaultParser
  *
  * @see \Drupal\aggregator\Plugin\AggregatorPluginManager
  * @see \Drupal\aggregator\Plugin\ParserInterface
diff --git a/core/modules/aggregator/src/Annotation/AggregatorProcessor.php b/core/modules/aggregator/src/Annotation/AggregatorProcessor.php
index 3aaba5b..6c02afd 100644
--- a/core/modules/aggregator/src/Annotation/AggregatorProcessor.php
+++ b/core/modules/aggregator/src/Annotation/AggregatorProcessor.php
@@ -12,9 +12,9 @@
 /**
  * Defines a Plugin annotation object for aggregator processor plugins.
  *
- * Plugin Namespace: Plugin\aggregator\processor
+ * Plugin Namespace: Plugin\aggregator\processor.
  *
- * For a working example, see \Drupal\aggregator\Plugin\aggregator\processor\DefaultProcessor
+ * @see \Drupal\aggregator\Plugin\aggregator\processor\DefaultProcessor
  *
  * @see \Drupal\aggregator\Plugin\AggregatorPluginManager
  * @see \Drupal\aggregator\Plugin\ProcessorInterface
diff --git a/core/modules/aggregator/src/Controller/AggregatorController.php b/core/modules/aggregator/src/Controller/AggregatorController.php
index 00a43ce..d428e03 100644
--- a/core/modules/aggregator/src/Controller/AggregatorController.php
+++ b/core/modules/aggregator/src/Controller/AggregatorController.php
@@ -118,7 +118,13 @@ public function adminOverview() {
     $feeds = $entity_manager->getStorage('aggregator_feed')
       ->loadMultiple();
 
-    $header = array($this->t('Title'), $this->t('Items'), $this->t('Last update'), $this->t('Next update'), $this->t('Operations'));
+    $header = array(
+      $this->t('Title'),
+      $this->t('Items'),
+      $this->t('Last update'),
+      $this->t('Next update'),
+      $this->t('Operations'),
+    );
     $rows = array();
     /** @var \Drupal\aggregator\FeedInterface[] $feeds */
     foreach ($feeds as $feed) {
diff --git a/core/modules/aggregator/src/Entity/Feed.php b/core/modules/aggregator/src/Entity/Feed.php
index a5ed081..da61776 100644
--- a/core/modules/aggregator/src/Entity/Feed.php
+++ b/core/modules/aggregator/src/Entity/Feed.php
@@ -175,7 +175,23 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
       ->setDisplayConfigurable('form', TRUE)
       ->addConstraint('FeedUrl', []);
 
-    $intervals = array(900, 1800, 3600, 7200, 10800, 21600, 32400, 43200, 64800, 86400, 172800, 259200, 604800, 1209600, 2419200);
+    $intervals = array(
+      900,
+      1800,
+      3600,
+      7200,
+      10800,
+      21600,
+      32400,
+      43200,
+      64800,
+      86400,
+      172800,
+      259200,
+      604800,
+      1209600,
+      2419200,
+    );
     $period = array_map(array(\Drupal::service('date.formatter'), 'formatInterval'), array_combine($intervals, $intervals));
     $period[AGGREGATOR_CLEAR_NEVER] = t('Never');
 
diff --git a/core/modules/aggregator/src/FeedAccessControlHandler.php b/core/modules/aggregator/src/FeedAccessControlHandler.php
index f147c53..674d200 100644
--- a/core/modules/aggregator/src/FeedAccessControlHandler.php
+++ b/core/modules/aggregator/src/FeedAccessControlHandler.php
@@ -26,11 +26,9 @@ protected function checkAccess(EntityInterface $entity, $operation, $langcode, A
     switch ($operation) {
       case 'view':
         return AccessResult::allowedIfHasPermission($account, 'access news feeds');
-        break;
 
       default:
         return AccessResult::allowedIfHasPermission($account, 'administer news feeds');
-        break;
     }
   }
 
diff --git a/core/modules/aggregator/src/FeedForm.php b/core/modules/aggregator/src/FeedForm.php
index aa5069c..1821de0 100644
--- a/core/modules/aggregator/src/FeedForm.php
+++ b/core/modules/aggregator/src/FeedForm.php
@@ -28,7 +28,12 @@ public function save(array $form, FormStateInterface $form_state) {
       $form_state->setRedirectUrl($feed->urlInfo('canonical'));
     }
     else {
-      $this->logger('aggregator')->notice('Feed %feed added.', array('%feed' => $feed->label(), 'link' => $this->l($this->t('View'), new Url('aggregator.admin_overview'))));
+      $this
+        ->logger('aggregator')
+        ->notice('Feed %feed added.', array(
+          '%feed' => $feed->label(),
+          'link' => $this->l($this->t('View'), new Url('aggregator.admin_overview')),
+        ));
       drupal_set_message($this->t('The feed %feed has been added.', array('%feed' => $feed->label())));
     }
   }
diff --git a/core/modules/aggregator/src/Form/OpmlFeedAdd.php b/core/modules/aggregator/src/Form/OpmlFeedAdd.php
index 357d0dc..4b8a59f 100644
--- a/core/modules/aggregator/src/Form/OpmlFeedAdd.php
+++ b/core/modules/aggregator/src/Form/OpmlFeedAdd.php
@@ -68,7 +68,23 @@ public function getFormId() {
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
-    $intervals = array(900, 1800, 3600, 7200, 10800, 21600, 32400, 43200, 64800, 86400, 172800, 259200, 604800, 1209600, 2419200);
+    $intervals = array(
+      900,
+      1800,
+      3600,
+      7200,
+      10800,
+      21600,
+      32400,
+      43200,
+      64800,
+      86400,
+      172800,
+      259200,
+      604800,
+      1209600,
+      2419200,
+    );
     $period = array_map(array(\Drupal::service('date.formatter'), 'formatInterval'), array_combine($intervals, $intervals));
 
     $form['upload'] = array(
diff --git a/core/modules/aggregator/src/Form/SettingsForm.php b/core/modules/aggregator/src/Form/SettingsForm.php
index 6af1b35..a054d01 100644
--- a/core/modules/aggregator/src/Form/SettingsForm.php
+++ b/core/modules/aggregator/src/Form/SettingsForm.php
@@ -173,7 +173,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
       }
     }
 
-    // Implementing processor plugins will expect an array at $form['processors'].
+    // Implementing processor plugins will expect an array.
     $form['processors'] = array();
     // Call buildConfigurationForm() for each active processor.
     foreach ($this->definitions['processor'] as $id => $definition) {
diff --git a/core/modules/aggregator/src/ItemInterface.php b/core/modules/aggregator/src/ItemInterface.php
index 8211d35..07d9aa1 100644
--- a/core/modules/aggregator/src/ItemInterface.php
+++ b/core/modules/aggregator/src/ItemInterface.php
@@ -146,4 +146,5 @@ public function getGuid();
    *   The called feed item entity.
    */
   public function setGuid($guid);
+
 }
diff --git a/core/modules/aggregator/src/ItemsImporter.php b/core/modules/aggregator/src/ItemsImporter.php
index b3ac8e4..1b073aa 100644
--- a/core/modules/aggregator/src/ItemsImporter.php
+++ b/core/modules/aggregator/src/ItemsImporter.php
@@ -134,7 +134,7 @@ public function refresh(FeedInterface $feed) {
 
           $this->logger->notice('There is new syndicated content from %site.', array('%site' => $feed->label()));
 
-          // If there are items on the feed, let enabled processors process them.
+          // If there are items on the feed, enable processors process them.
           if (!empty($feed->items)) {
             foreach ($processor_instances as $instance) {
               $instance->process($feed);
diff --git a/core/modules/aggregator/src/Plugin/Field/FieldFormatter/AggregatorTitleFormatter.php b/core/modules/aggregator/src/Plugin/Field/FieldFormatter/AggregatorTitleFormatter.php
index 6882aed..29b28ae 100644
--- a/core/modules/aggregator/src/Plugin/Field/FieldFormatter/AggregatorTitleFormatter.php
+++ b/core/modules/aggregator/src/Plugin/Field/FieldFormatter/AggregatorTitleFormatter.php
@@ -65,17 +65,17 @@ public function viewElements(FieldItemListInterface $items) {
     }
 
     foreach ($items as $delta => $item) {
-        if ($this->getSetting('display_as_link') && $url_string) {
-          $elements[$delta] = [
+      if ($this->getSetting('display_as_link') && $url_string) {
+        $elements[$delta] = [
             '#type' => 'link',
             '#title' => $item->value,
             '#url' => Url::fromUri($url_string),
-          ];
-        }
-        else {
-          $elements[$delta] = ['#markup' => $item->value];
-        }
+        ];
       }
+      else {
+        $elements[$delta] = ['#markup' => $item->value];
+      }
+    }
 
     return $elements;
   }
diff --git a/core/modules/aggregator/src/Plugin/Field/FieldFormatter/AggregatorXSSFormatter.php b/core/modules/aggregator/src/Plugin/Field/FieldFormatter/AggregatorXSSFormatter.php
index 4f3f601..16c2a20 100644
--- a/core/modules/aggregator/src/Plugin/Field/FieldFormatter/AggregatorXSSFormatter.php
+++ b/core/modules/aggregator/src/Plugin/Field/FieldFormatter/AggregatorXSSFormatter.php
@@ -42,4 +42,5 @@ public function viewElements(FieldItemListInterface $items) {
     }
     return $elements;
   }
+
 }
diff --git a/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php b/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php
index c9e6f92..b0a3d67 100644
--- a/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php
+++ b/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php
@@ -89,11 +89,13 @@ public function fetch(FeedInterface $feed) {
 
       /** @var \Psr\Http\Message\UriInterface $actual_uri */
       $actual_uri = NULL;
-      $response = $this->httpClientFactory->fromOptions(['allow_redirects' => [
+      $response = $this->httpClientFactory->fromOptions([
+      'allow_redirects' => [
         'on_redirect' => function(RequestInterface $request, ResponseInterface $response, UriInterface $uri) use (&$actual_uri) {
           $actual_uri = (string) $uri;
         }
-      ]])->send($request);
+      ]
+      ])->send($request);
 
       // In case of a 304 Not Modified, there is no new content, so return
       // FALSE.
@@ -122,4 +124,5 @@ public function fetch(FeedInterface $feed) {
       return FALSE;
     }
   }
+
 }
diff --git a/core/modules/aggregator/src/Plugin/aggregator/parser/DefaultParser.php b/core/modules/aggregator/src/Plugin/aggregator/parser/DefaultParser.php
index 8fa4a93..3e30337 100644
--- a/core/modules/aggregator/src/Plugin/aggregator/parser/DefaultParser.php
+++ b/core/modules/aggregator/src/Plugin/aggregator/parser/DefaultParser.php
@@ -64,7 +64,8 @@ public function parse(FeedInterface $feed) {
       if ($date = $item->getDateModified()) {
         $parsed_item['timestamp'] = $date->getTimestamp();
       }
-      // Store on $feed object. This is where processors will look for parsed items.
+      // Store on $feed object.
+      // This is where processors will look for parsed items.
       $feed->items[] = $parsed_item;
     }
 
diff --git a/core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php b/core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php
index a42c39a..4f6202f 100644
--- a/core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php
+++ b/core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php
@@ -126,7 +126,21 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
     $items = array_map(function ($count) {
       return $this->formatPlural($count, '1 item', '@count items');
     }, array_combine($counts, $counts));
-    $intervals = array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800);
+    $intervals = array(
+      3600,
+      10800,
+      21600,
+      32400,
+      43200,
+      86400,
+      172800,
+      259200,
+      604800,
+      1209600,
+      2419200,
+      4838400,
+      9676800,
+    );
     $period = array_map(array($this->dateFormatter, 'formatInterval'), array_combine($intervals, $intervals));
     $period[AGGREGATOR_CLEAR_NEVER] = t('Never');
 
@@ -192,8 +206,8 @@ public function process(FeedInterface $feed) {
     }
     foreach ($feed->items as $item) {
       // @todo: The default entity view builder always returns an empty
-      //   array, which is ignored in aggregator_save_item() currently. Should
-      //   probably be fixed.
+      // array, which is ignored in aggregator_save_item() currently. Should
+      // probably be fixed.
       if (empty($item['title'])) {
         continue;
       }
diff --git a/core/modules/aggregator/src/Plugin/migrate/source/d6/AggregatorItem.php b/core/modules/aggregator/src/Plugin/migrate/source/d6/AggregatorItem.php
index 1c4677e..de09304 100644
--- a/core/modules/aggregator/src/Plugin/migrate/source/d6/AggregatorItem.php
+++ b/core/modules/aggregator/src/Plugin/migrate/source/d6/AggregatorItem.php
@@ -25,7 +25,8 @@ class AggregatorItem extends DrupalSqlBase {
   public function query() {
     $query = $this->select('aggregator_item', 'ai')
       ->fields('ai', array('iid', 'fid', 'title', 'link', 'author',
-        'description', 'timestamp', 'guid'))
+        'description', 'timestamp', 'guid',
+    ))
       ->orderBy('iid');
     return $query;
   }
diff --git a/core/modules/aggregator/src/Tests/AddFeedTest.php b/core/modules/aggregator/src/Tests/AddFeedTest.php
index 2a7f037..2ada08e 100644
--- a/core/modules/aggregator/src/Tests/AddFeedTest.php
+++ b/core/modules/aggregator/src/Tests/AddFeedTest.php
@@ -72,4 +72,5 @@ public function testAddLongFeed() {
     $this->deleteFeed($feed);
     $this->deleteFeed($feed_2);
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/AggregatorAdminTest.php b/core/modules/aggregator/src/Tests/AggregatorAdminTest.php
index edc594b..62b4502 100644
--- a/core/modules/aggregator/src/Tests/AggregatorAdminTest.php
+++ b/core/modules/aggregator/src/Tests/AggregatorAdminTest.php
@@ -53,7 +53,8 @@ public function testSettingsPage() {
     $this->assertText(t('The configuration options have been saved.'));
     $this->assertFieldByName('dummy_length', 100, '"dummy_length" has correct default value.');
 
-    // Make sure settings form is still accessible even after uninstalling a module
+    // Make sure settings form is still accessible
+    // even after uninstalling a module
     // that provides the selected plugins.
     $this->container->get('module_installer')->uninstall(array('aggregator_test'));
     $this->resetAll();
@@ -64,8 +65,8 @@ public function testSettingsPage() {
   /**
    * Tests the overview page.
    */
-  function testOverviewPage() {
-    $feed = $this->createFeed($this->getRSS091Sample());
+  public function testOverviewPage() {
+    $feed = $this->createFeed($this->getRss091Sample());
     $this->drupalGet('admin/config/services/aggregator');
 
     $result = $this->xpath('//table/tbody/tr');
@@ -85,4 +86,5 @@ function testOverviewPage() {
     $count = $this->container->get('entity.manager')->getStorage('aggregator_item')->getItemCount($feed);
     $this->assertEqual(\Drupal::translation()->formatPlural($count, '1 item', '@count items'), (string) $result[0]->td[1]);
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/AggregatorCronTest.php b/core/modules/aggregator/src/Tests/AggregatorCronTest.php
index 28fe269..f85b816 100644
--- a/core/modules/aggregator/src/Tests/AggregatorCronTest.php
+++ b/core/modules/aggregator/src/Tests/AggregatorCronTest.php
@@ -46,4 +46,5 @@ public function testCron() {
     $this->cronRun();
     $this->assertEqual(5, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->id()))->fetchField());
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/AggregatorTestBase.php b/core/modules/aggregator/src/Tests/AggregatorTestBase.php
index 08c0c23..01718f7 100644
--- a/core/modules/aggregator/src/Tests/AggregatorTestBase.php
+++ b/core/modules/aggregator/src/Tests/AggregatorTestBase.php
@@ -42,7 +42,12 @@ protected function setUp() {
       $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
     }
 
-    $this->adminUser = $this->drupalCreateUser(array('access administration pages', 'administer news feeds', 'access news feeds', 'create article content'));
+    $this->adminUser = $this->drupalCreateUser(array(
+      'access administration pages',
+      'administer news feeds',
+      'access news feeds',
+      'create article content',
+    ));
     $this->drupalLogin($this->adminUser);
     $this->drupalPlaceBlock('local_tasks_block');
   }
@@ -147,7 +152,8 @@ public function getFeedEditObject($feed_url = NULL, array $values = array()) {
    *   Number of feed items on default feed created by createFeed().
    */
   public function getDefaultFeedItemCount() {
-    // Our tests are based off of rss.xml, so let's find out how many elements should be related.
+    // Our tests are based off of rss.xml,
+    // so let's find out how many elements should be related.
     $feed_count = db_query_range('SELECT COUNT(DISTINCT nid) FROM {node_field_data} n WHERE n.promote = 1 AND n.status = 1', 0, $this->config('system.rss')->get('items.limit'))->fetchField();
     return $feed_count > 10 ? 10 : $feed_count;
   }
@@ -247,9 +253,8 @@ public function getValidOpml(array $feeds) {
     foreach ($feeds as &$feed) {
       $feed['url[0][value]'] = Html::escape($feed['url[0][value]']);
     }
-    /**
-     * Does not have an XML declaration, must pass the parser.
-     */
+
+    // Does not have an XML declaration, must pass the parser.
     $opml = <<<EOF
 <opml version="1.0">
   <head></head>
@@ -320,7 +325,7 @@ public function getEmptyOpml() {
    * @return string
    *   Path to the feed.
    */
-  public function getRSS091Sample() {
+  public function getRss091Sample() {
     return $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'aggregator') . '/tests/modules/aggregator_test/aggregator_test_rss091.xml';
   }
 
@@ -375,4 +380,5 @@ public function enableTestPlugins() {
       ))
       ->save();
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/AggregatorTitleTest.php b/core/modules/aggregator/src/Tests/AggregatorTitleTest.php
index cfa9975..dcfb206 100644
--- a/core/modules/aggregator/src/Tests/AggregatorTitleTest.php
+++ b/core/modules/aggregator/src/Tests/AggregatorTitleTest.php
@@ -24,7 +24,13 @@ class AggregatorTitleTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = array('file', 'field', 'options', 'aggregator', 'entity_reference');
+  public static $modules = array(
+    'file',
+    'field',
+    'options',
+    'aggregator',
+    'entity_reference',
+  );
 
   /**
    * The field name that is tested.
@@ -46,7 +52,7 @@ protected function setUp() {
     $this->fieldName = 'title';
   }
 
-  /*
+  /**
    * Tests the formatter output.
    */
   public function testStringFormatter() {
@@ -78,7 +84,7 @@ public function testStringFormatter() {
     $this->assertTrue(strpos($result, $aggregator_feed->getUrl()) === FALSE);
 
     // Verify aggregator item title with and without links.
-    $build = $aggregator_item->{$this->fieldName}->view(['type' => 'aggregator_title', 'settings' => ['display_as_link' =>TRUE]]);
+    $build = $aggregator_item->{$this->fieldName}->view(['type' => 'aggregator_title', 'settings' => ['display_as_link' => TRUE]]);
     $result = $this->render($build);
 
     $this->assertTrue(strpos($result, 'test title'));
diff --git a/core/modules/aggregator/src/Tests/DeleteFeedItemTest.php b/core/modules/aggregator/src/Tests/DeleteFeedItemTest.php
index ba05327..ecfe1c8 100644
--- a/core/modules/aggregator/src/Tests/DeleteFeedItemTest.php
+++ b/core/modules/aggregator/src/Tests/DeleteFeedItemTest.php
@@ -41,4 +41,5 @@ public function testDeleteFeedItem() {
       $this->deleteFeed($feed);
     }
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/FeedAdminDisplayTest.php b/core/modules/aggregator/src/Tests/FeedAdminDisplayTest.php
index dee35eb..eb79dbc 100644
--- a/core/modules/aggregator/src/Tests/FeedAdminDisplayTest.php
+++ b/core/modules/aggregator/src/Tests/FeedAdminDisplayTest.php
@@ -64,4 +64,5 @@ public function testFeedUpdateFields() {
     $this->assertText('ago', 'The non scheduled feed has been updated. It shows "x x ago" as last update.');
     $this->assertNoText('left', 'The feed is not scheduled. It does not show a timeframe "x x left" for next update.');
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/FeedFetcherPluginTest.php b/core/modules/aggregator/src/Tests/FeedFetcherPluginTest.php
index 618104f..7258293 100644
--- a/core/modules/aggregator/src/Tests/FeedFetcherPluginTest.php
+++ b/core/modules/aggregator/src/Tests/FeedFetcherPluginTest.php
@@ -45,4 +45,5 @@ public function testfetch() {
     // Fetch should fail due to feed name.
     $this->assertTrue(empty($feed->items));
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/FeedLanguageTest.php b/core/modules/aggregator/src/Tests/FeedLanguageTest.php
index d259c82..0d95aed 100644
--- a/core/modules/aggregator/src/Tests/FeedLanguageTest.php
+++ b/core/modules/aggregator/src/Tests/FeedLanguageTest.php
@@ -86,4 +86,5 @@ public function testFeedLanguage() {
       }
     }
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/FeedParserTest.php b/core/modules/aggregator/src/Tests/FeedParserTest.php
index 6da2ec8..a67a1c3 100644
--- a/core/modules/aggregator/src/Tests/FeedParserTest.php
+++ b/core/modules/aggregator/src/Tests/FeedParserTest.php
@@ -31,8 +31,8 @@ protected function setUp() {
   /**
    * Tests a feed that uses the RSS 0.91 format.
    */
-  public function testRSS091Sample() {
-    $feed = $this->createFeed($this->getRSS091Sample());
+  public function testRss091Sample() {
+    $feed = $this->createFeed($this->getRss091Sample());
     $feed->refreshItems();
     $this->drupalGet('aggregator/sources/' . $feed->id());
     $this->assertResponse(200, format_string('Feed %name exists.', array('%name' => $feed->label())));
@@ -112,4 +112,5 @@ public function testInvalidFeed() {
     $this->clickLink(t('Update items'));
     $this->assertRaw(t('The feed from %title seems to be broken because of error', array('%title' => $feed->label())));
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/FeedProcessorPluginTest.php b/core/modules/aggregator/src/Tests/FeedProcessorPluginTest.php
index 2584021..7d110ca 100644
--- a/core/modules/aggregator/src/Tests/FeedProcessorPluginTest.php
+++ b/core/modules/aggregator/src/Tests/FeedProcessorPluginTest.php
@@ -68,4 +68,5 @@ public function testPostProcess() {
     // Make sure its refresh rate doubled.
     $this->assertEqual($feed->getRefreshRate(), 3600);
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/ImportOpmlTest.php b/core/modules/aggregator/src/Tests/ImportOpmlTest.php
index 9e95af2..03978d6 100644
--- a/core/modules/aggregator/src/Tests/ImportOpmlTest.php
+++ b/core/modules/aggregator/src/Tests/ImportOpmlTest.php
@@ -27,7 +27,12 @@ class ImportOpmlTest extends AggregatorTestBase {
   protected function setUp() {
     parent::setUp();
 
-    $admin_user = $this->drupalCreateUser(array('administer news feeds', 'access news feeds', 'create article content', 'administer blocks'));
+    $admin_user = $this->drupalCreateUser(array(
+      'administer news feeds',
+      'access news feeds',
+      'create article content',
+      'administer blocks',
+    ));
     $this->drupalLogin($admin_user);
   }
 
@@ -125,4 +130,5 @@ public function testOpmlImport() {
     $this->validateImportFormFields();
     $this->submitImportForm();
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/Migrate/d6/MigrateAggregatorFeedTest.php b/core/modules/aggregator/src/Tests/Migrate/d6/MigrateAggregatorFeedTest.php
index 2b9ee0d..0167dc6 100644
--- a/core/modules/aggregator/src/Tests/Migrate/d6/MigrateAggregatorFeedTest.php
+++ b/core/modules/aggregator/src/Tests/Migrate/d6/MigrateAggregatorFeedTest.php
@@ -17,7 +17,12 @@
  */
 class MigrateAggregatorFeedTest extends MigrateDrupal6TestBase {
 
-  static $modules = array('aggregator');
+  /**
+   * Modules to install.
+   *
+   * @var array
+   */
+  public static $modules = array('aggregator');
 
   /**
    * {@inheritdoc}
@@ -47,4 +52,5 @@ public function testAggregatorFeedImport() {
     $this->assertIdentical('"213cc1365b96c310e92053c5551f0504"', $feed->etag->value);
     $this->assertIdentical('0', $feed->modified->value);
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/Migrate/d6/MigrateAggregatorItemTest.php b/core/modules/aggregator/src/Tests/Migrate/d6/MigrateAggregatorItemTest.php
index 8930fef..0380875 100644
--- a/core/modules/aggregator/src/Tests/Migrate/d6/MigrateAggregatorItemTest.php
+++ b/core/modules/aggregator/src/Tests/Migrate/d6/MigrateAggregatorItemTest.php
@@ -17,7 +17,12 @@
  */
 class MigrateAggregatorItemTest extends MigrateDrupal6TestBase {
 
-  static $modules = array('aggregator');
+  /**
+   * Modules to install.
+   *
+   * @var array
+   */
+  public static $modules = array('aggregator');
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php b/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php
index 0e94425..8cca4c2 100644
--- a/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php
+++ b/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php
@@ -33,7 +33,7 @@ public function testUpdateFeedItem() {
     // Test updating feed items without valid timestamp information.
     $edit = array(
       'title[0][value]' => "Feed without publish timestamp",
-      'url[0][value]' => $this->getRSS091Sample(),
+      'url[0][value]' => $this->getRss091Sample(),
     );
 
     $this->drupalGet($edit['url[0][value]']);
@@ -71,4 +71,5 @@ public function testUpdateFeedItem() {
     $this->updateFeedItems($feed);
     $this->assertResponse(200);
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/UpdateFeedTest.php b/core/modules/aggregator/src/Tests/UpdateFeedTest.php
index c660756..71ff857 100644
--- a/core/modules/aggregator/src/Tests/UpdateFeedTest.php
+++ b/core/modules/aggregator/src/Tests/UpdateFeedTest.php
@@ -47,4 +47,5 @@ public function testUpdateFeed() {
       $this->deleteFeed($feed);
     }
   }
+
 }
diff --git a/core/modules/aggregator/src/Tests/Views/AggregatorFeedViewsFieldAccessTest.php b/core/modules/aggregator/src/Tests/Views/AggregatorFeedViewsFieldAccessTest.php
index c85087e..cf23055 100644
--- a/core/modules/aggregator/src/Tests/Views/AggregatorFeedViewsFieldAccessTest.php
+++ b/core/modules/aggregator/src/Tests/Views/AggregatorFeedViewsFieldAccessTest.php
@@ -43,7 +43,6 @@ public function testAggregatorFeedFields() {
     $feed->save();
 
     // @todo Expand the test coverage in https://www.drupal.org/node/2464635
-
     // $this->assertFieldAccess('aggregator_feed', 'title', $feed->label());
     $this->assertFieldAccess('aggregator_feed', 'langcode', $feed->language()->getName());
     $this->assertFieldAccess('aggregator_feed', 'url', $feed->getUrl());
diff --git a/core/modules/aggregator/src/Tests/Views/AggregatorItemViewsFieldAccessTest.php b/core/modules/aggregator/src/Tests/Views/AggregatorItemViewsFieldAccessTest.php
index b1c23c5..8f5ff7c 100644
--- a/core/modules/aggregator/src/Tests/Views/AggregatorItemViewsFieldAccessTest.php
+++ b/core/modules/aggregator/src/Tests/Views/AggregatorItemViewsFieldAccessTest.php
@@ -51,7 +51,6 @@ public function testAggregatorItemFields() {
     $item->save();
 
     // @todo Expand the test coverage in https://www.drupal.org/node/2464635
-
     $this->assertFieldAccess('aggregator_item', 'title', $item->getTitle());
     $this->assertFieldAccess('aggregator_item', 'langcode', $item->language()->getName());
     $this->assertFieldAccess('aggregator_item', 'description', $item->getDescription());
diff --git a/core/modules/aggregator/src/Tests/Views/IntegrationTest.php b/core/modules/aggregator/src/Tests/Views/IntegrationTest.php
index 98598c4..74cffb4 100644
--- a/core/modules/aggregator/src/Tests/Views/IntegrationTest.php
+++ b/core/modules/aggregator/src/Tests/Views/IntegrationTest.php
@@ -26,7 +26,14 @@ class IntegrationTest extends ViewKernelTestBase {
    *
    * @var array
    */
-  public static $modules = array('aggregator', 'aggregator_test_views', 'system', 'field', 'options', 'user');
+  public static $modules = array(
+    'aggregator',
+    'aggregator_test_views',
+    'system',
+    'field',
+    'options',
+    'user',
+  );
 
   /**
    * Views used by this test.
diff --git a/core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/fetcher/TestFetcher.php b/core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/fetcher/TestFetcher.php
index aec4ded..68968fd 100644
--- a/core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/fetcher/TestFetcher.php
+++ b/core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/fetcher/TestFetcher.php
@@ -33,4 +33,5 @@ public function fetch(FeedInterface $feed) {
     }
     return parent::fetch($feed);
   }
+
 }
diff --git a/core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/parser/TestParser.php b/core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/parser/TestParser.php
index 053a9c9..ff4c4be 100644
--- a/core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/parser/TestParser.php
+++ b/core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/parser/TestParser.php
@@ -32,4 +32,5 @@ class TestParser extends DefaultParser implements ParserInterface {
   public function parse(FeedInterface $feed) {
     return parent::parse($feed);
   }
+
 }
diff --git a/core/modules/aggregator/tests/src/Unit/Menu/AggregatorLocalTasksTest.php b/core/modules/aggregator/tests/src/Unit/Menu/AggregatorLocalTasksTest.php
index f2dd7b4..d01e21a 100644
--- a/core/modules/aggregator/tests/src/Unit/Menu/AggregatorLocalTasksTest.php
+++ b/core/modules/aggregator/tests/src/Unit/Menu/AggregatorLocalTasksTest.php
@@ -52,9 +52,12 @@ public function getAggregatorAdminRoutes() {
    */
   public function testAggregatorSourceLocalTasks($route) {
     $this->assertLocalTasks($route, array(
-      0 => array('entity.aggregator_feed.canonical', 'entity.aggregator_feed.edit_form', 'entity.aggregator_feed.delete_form'),
+      0 => array(
+        'entity.aggregator_feed.canonical',
+        'entity.aggregator_feed.edit_form',
+        'entity.aggregator_feed.delete_form',
+      ),
     ));
-    ;
   }
 
   /**
diff --git a/core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php b/core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php
index 1c4eb17..1e78e17 100644
--- a/core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php
+++ b/core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php
@@ -7,114 +7,127 @@
 
 namespace Drupal\Tests\aggregator\Unit\Plugin {
 
-use Drupal\aggregator\Form\SettingsForm;
-use Drupal\Core\Form\FormState;
-use Drupal\Tests\UnitTestCase;
-
-/**
- * Tests settings configuration of individual aggregator plugins.
- *
- * @group aggregator
- */
-class AggregatorPluginSettingsBaseTest extends UnitTestCase {
-
-  /**
-   * The aggregator settings form object under test.
-   *
-   * @var \Drupal\aggregator\Form\SettingsForm
-   */
-  protected $settingsForm;
+  use Drupal\aggregator\Form\SettingsForm;
+  use Drupal\Core\Form\FormState;
+  use Drupal\Tests\UnitTestCase;
 
   /**
-   * The stubbed config factory object.
+   * Tests settings configuration of individual aggregator plugins.
    *
-   * @var \PHPUnit_Framework_MockObject_MockBuilder
-   */
-  protected $configFactory;
-
-  /**
-   * The stubbed aggregator plugin managers array.
-   *
-   * @var array
-   */
-  protected $managers;
-
-  /**
-   * {@inheritdoc}
+   * @group aggregator
    */
-  protected function setUp() {
-    $this->configFactory = $this->getConfigFactoryStub(
+  class AggregatorPluginSettingsBaseTest extends UnitTestCase {
+
+    /**
+     * The aggregator settings form object under test.
+     *
+     * @var \Drupal\aggregator\Form\SettingsForm
+     */
+    protected $settingsForm;
+
+    /**
+     * The stubbed config factory object.
+     *
+     * @var \PHPUnit_Framework_MockObject_MockBuilder
+     */
+    protected $configFactory;
+
+    /**
+     * The stubbed aggregator plugin managers array.
+     *
+     * @var array
+     */
+    protected $managers;
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function setUp() {
+      $this->configFactory = $this->getConfigFactoryStub(
       array(
         'aggregator.settings' => array(
           'processors' => array('aggregator_test'),
         ),
         'aggregator_test.settings' => array(),
       )
-    );
-    foreach (array('fetcher', 'parser', 'processor') as $type) {
-      $this->managers[$type] = $this->getMockBuilder('Drupal\aggregator\Plugin\AggregatorPluginManager')
-        ->disableOriginalConstructor()
-        ->getMock();
-      $this->managers[$type]->expects($this->once())
-        ->method('getDefinitions')
-        ->will($this->returnValue(array('aggregator_test' => array('title' => '', 'description' => ''))));
-    }
-
-    $this->settingsForm = new SettingsForm(
+      );
+      foreach (array('fetcher', 'parser', 'processor') as $type) {
+        $this->managers[$type] = $this->getMockBuilder('Drupal\aggregator\Plugin\AggregatorPluginManager')
+          ->disableOriginalConstructor()
+          ->getMock();
+        $this->managers[$type]->expects($this->once())
+          ->method('getDefinitions')
+          ->will($this->returnValue(array('aggregator_test' => array('title' => '', 'description' => ''))));
+      }
+
+      $this->settingsForm = new SettingsForm(
       $this->configFactory,
       $this->managers['fetcher'],
       $this->managers['parser'],
       $this->managers['processor'],
       $this->getStringTranslationStub()
-    );
-  }
+      );
+    }
 
-  /**
-   * Test for AggregatorPluginSettingsBase.
-   *
-   * Ensure that the settings form calls build, validate and submit methods on
-   * plugins that extend AggregatorPluginSettingsBase.
-   */
-  public function testSettingsForm() {
-    // Emulate a form state of a submitted form.
-    $form_state = (new FormState())->setValues([
+    /**
+     * Test for AggregatorPluginSettingsBase.
+     *
+     * Ensure that the settings form calls build, validate and submit methods on
+     * plugins that extend AggregatorPluginSettingsBase.
+     */
+    public function testSettingsForm() {
+      // Emulate a form state of a submitted form.
+      $form_state = (new FormState())->setValues([
       'dummy_length' => '',
       'aggregator_allowed_html_tags' => '',
-    ]);
-
-    $test_processor = $this->getMock(
-      'Drupal\aggregator_test\Plugin\aggregator\processor\TestProcessor',
-      array('buildConfigurationForm', 'validateConfigurationForm', 'submitConfigurationForm'),
-      array(array(), 'aggregator_test', array('description' => ''), $this->configFactory)
-    );
-    $test_processor->expects($this->at(0))
-      ->method('buildConfigurationForm')
-      ->with($this->anything(), $form_state)
-      ->will($this->returnArgument(0));
-    $test_processor->expects($this->at(1))
-      ->method('validateConfigurationForm')
-      ->with($this->anything(), $form_state);
-    $test_processor->expects($this->at(2))
-      ->method('submitConfigurationForm')
-      ->with($this->anything(), $form_state);
-
-    $this->managers['processor']->expects($this->once())
-      ->method('createInstance')
-      ->with($this->equalTo('aggregator_test'))
-      ->will($this->returnValue($test_processor));
-
-    $form = $this->settingsForm->buildForm(array(), $form_state);
-    $this->settingsForm->validateForm($form, $form_state);
-    $this->settingsForm->submitForm($form, $form_state);
-  }
+      ]);
+
+      $test_processor = $this->getMock(
+        'Drupal\aggregator_test\Plugin\aggregator\processor\TestProcessor',
+        array(
+          'buildConfigurationForm',
+          'validateConfigurationForm',
+          'submitConfigurationForm',
+        ),
+        array(
+          array(),
+          'aggregator_test',
+          array('description' => ''),
+          $this->configFactory,
+        )
+      );
+      $test_processor->expects($this->at(0))
+        ->method('buildConfigurationForm')
+        ->with($this->anything(), $form_state)
+        ->will($this->returnArgument(0));
+      $test_processor->expects($this->at(1))
+        ->method('validateConfigurationForm')
+        ->with($this->anything(), $form_state);
+      $test_processor->expects($this->at(2))
+        ->method('submitConfigurationForm')
+        ->with($this->anything(), $form_state);
+
+      $this->managers['processor']->expects($this->once())
+        ->method('createInstance')
+        ->with($this->equalTo('aggregator_test'))
+        ->will($this->returnValue($test_processor));
+
+      $form = $this->settingsForm->buildForm(array(), $form_state);
+      $this->settingsForm->validateForm($form, $form_state);
+      $this->settingsForm->submitForm($form, $form_state);
+    }
 
-}
+  }
 
 }
 
 namespace {
   // @todo Delete after https://www.drupal.org/node/1858196 is in.
   if (!function_exists('drupal_set_message')) {
-    function drupal_set_message() {}
+    /**
+     * Redeclaration of drupal_set_message if it doesn't exist.
+     */
+    function drupal_set_message() {
+    }
   }
 }
diff --git a/core/modules/aggregator/tests/src/Unit/Plugin/migrate/source/d6/AggregatorFeedTest.php b/core/modules/aggregator/tests/src/Unit/Plugin/migrate/source/d6/AggregatorFeedTest.php
index 8dc0084..21e4a7d 100644
--- a/core/modules/aggregator/tests/src/Unit/Plugin/migrate/source/d6/AggregatorFeedTest.php
+++ b/core/modules/aggregator/tests/src/Unit/Plugin/migrate/source/d6/AggregatorFeedTest.php
@@ -55,8 +55,8 @@ class AggregatorFeedTest extends MigrateSqlSourceTestCase {
   );
 
   /**
-  * {@inheritdoc}
-  */
+   * {@inheritdoc}
+   */
   protected function setUp() {
     foreach ($this->expectedResults as $k => $row) {
       $this->databaseContents['aggregator_feed'][$k] = $row;
diff --git a/core/modules/aggregator/tests/src/Unit/Plugin/migrate/source/d6/AggregatorItemTest.php b/core/modules/aggregator/tests/src/Unit/Plugin/migrate/source/d6/AggregatorItemTest.php
index 3db0359..1456b24 100644
--- a/core/modules/aggregator/tests/src/Unit/Plugin/migrate/source/d6/AggregatorItemTest.php
+++ b/core/modules/aggregator/tests/src/Unit/Plugin/migrate/source/d6/AggregatorItemTest.php
@@ -40,7 +40,8 @@ class AggregatorItemTest extends MigrateSqlSourceTestCase {
     ),
   );
 
-  protected $databaseContents = array('aggregator_item' => array(array(
+  protected $databaseContents = array(
+    'aggregator_item' => array(array(
       'iid' => 1,
       'fid' => 1,
       'title' => 'This (three) weeks in Drupal Core - January 10th 2014',
@@ -49,7 +50,8 @@ class AggregatorItemTest extends MigrateSqlSourceTestCase {
       'description' => "<h2 id='new'>What's new with Drupal 8?</h2>",
       'timestamp' => 1389297196,
       'guid' => '395218 at https://groups.drupal.org',
+      ),
     ),
-  ));
+  );
 
 }
