From 7de3512cda9865286d1be0010b07f346901e40bc Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Thu, 5 May 2016 12:21:09 +0100
Subject: [PATCH] Issue #2706753 by Mile23: Fix
 'PSR2.Classes.PropertyDeclaration.ScopeMissing/VarUsed' coding standard

(cherry picked from commit c26745da881ea2438f25cee5d10cdac1498a7c46)
---
 .../Drupal/Component/Diff/DiffFormatter.php   |  6 ++---
 .../Drupal/Component/Diff/Engine/DiffOp.php   |  6 ++---
 .../Component/Diff/Engine/DiffOpAdd.php       |  2 +-
 .../Component/Diff/Engine/DiffOpChange.php    |  2 +-
 .../Component/Diff/Engine/DiffOpCopy.php      |  2 +-
 .../Component/Diff/Engine/DiffOpDelete.php    |  2 +-
 .../Database/Driver/sqlite/Connection.php     |  2 +-
 .../Database/Query/PagerSelectExtender.php    |  2 +-
 .../Core/Password/PhpassHashedPassword.php    |  2 +-
 .../Kernel/Migrate/d7/MigrateBlockTest.php    |  2 +-
 .../MigrateBlockContentBodyFieldTest.php      |  2 +-
 .../Migrate/MigrateBlockContentTypeTest.php   |  2 +-
 .../Migrate/d7/MigrateFieldInstanceTest.php   |  2 +-
 .../Kernel/Migrate/d7/MigrateFieldTest.php    |  2 +-
 .../src/Kernel/Migrate/d7/MigrateFileTest.php |  2 +-
 .../Migrate/d7/MigrateFilterFormatTest.php    |  2 +-
 .../views/filter/HistoryUserTimestamp.php     |  2 +-
 .../modules/node/src/Plugin/views/row/Rss.php |  6 ++---
 .../src/Kernel/Migrate/d7/MigrateNodeTest.php |  2 +-
 .../Migrate/d7/MigrateShortcutSetTest.php     |  2 +-
 .../d7/MigrateShortcutSetUsersTest.php        |  2 +-
 .../Kernel/Migrate/d7/MigrateShortcutTest.php |  2 +-
 .../Plugin/views/filter/TaxonomyIndexTid.php  |  2 +-
 .../views/argument/ArgumentPluginBase.php     | 10 +++----
 .../views/src/Plugin/views/argument/Date.php  |  2 +-
 .../src/Plugin/views/argument/Formula.php     |  2 +-
 .../Plugin/views/argument/NumericArgument.php |  4 +--
 .../Plugin/views/cache/CachePluginBase.php    |  2 +-
 .../views/display/DisplayPluginBase.php       |  2 +-
 .../Plugin/views/field/FieldPluginBase.php    |  6 ++---
 .../src/Plugin/views/field/PrerenderList.php  |  2 +-
 .../Plugin/views/filter/BooleanOperator.php   |  4 +--
 .../views/src/Plugin/views/filter/Combine.php |  2 +-
 .../Plugin/views/filter/FilterPluginBase.php  | 10 +++----
 .../src/Plugin/views/filter/ManyToOne.php     |  2 +-
 .../Plugin/views/pager/PagerPluginBase.php    |  4 +--
 .../Plugin/views/query/QueryPluginBase.php    |  8 +++---
 .../views/src/Plugin/views/query/Sql.php      | 26 +++++++++----------
 .../views/src/Tests/Plugin/PluginBaseTest.php |  2 +-
 core/phpcs.xml.dist                           |  5 ++++
 .../Core/Entity/ConfigEntityQueryTest.php     |  2 +-
 41 files changed, 79 insertions(+), 74 deletions(-)

diff --git a/core/lib/Drupal/Component/Diff/DiffFormatter.php b/core/lib/Drupal/Component/Diff/DiffFormatter.php
index 55837062725c..ce08b004dc8c 100644
--- a/core/lib/Drupal/Component/Diff/DiffFormatter.php
+++ b/core/lib/Drupal/Component/Diff/DiffFormatter.php
@@ -18,7 +18,7 @@ class DiffFormatter {
   /**
    * Should a block header be shown?
    */
-  var $show_header = TRUE;
+  public $show_header = TRUE;
 
   /**
    * Number of leading context "lines" to preserve.
@@ -26,7 +26,7 @@ class DiffFormatter {
    * This should be left at zero for this class, but subclasses
    * may want to set this to other values.
    */
-  var $leading_context_lines = 0;
+  public $leading_context_lines = 0;
 
   /**
    * Number of trailing context "lines" to preserve.
@@ -34,7 +34,7 @@ class DiffFormatter {
    * This should be left at zero for this class, but subclasses
    * may want to set this to other values.
    */
-  var $trailing_context_lines = 0;
+  public $trailing_context_lines = 0;
 
   /**
    * Format a diff.
diff --git a/core/lib/Drupal/Component/Diff/Engine/DiffOp.php b/core/lib/Drupal/Component/Diff/Engine/DiffOp.php
index 120ac9ecdfb5..fa7b996e76a2 100644
--- a/core/lib/Drupal/Component/Diff/Engine/DiffOp.php
+++ b/core/lib/Drupal/Component/Diff/Engine/DiffOp.php
@@ -8,9 +8,9 @@
  * @subpackage DifferenceEngine
  */
 class DiffOp {
-  var $type;
-  var $orig;
-  var $closing;
+  public $type;
+  public $orig;
+  public $closing;
 
   public function reverse() {
     trigger_error('pure virtual', E_USER_ERROR);
diff --git a/core/lib/Drupal/Component/Diff/Engine/DiffOpAdd.php b/core/lib/Drupal/Component/Diff/Engine/DiffOpAdd.php
index 2def622d4cfe..ee4a8758317d 100644
--- a/core/lib/Drupal/Component/Diff/Engine/DiffOpAdd.php
+++ b/core/lib/Drupal/Component/Diff/Engine/DiffOpAdd.php
@@ -8,7 +8,7 @@
  * @subpackage DifferenceEngine
  */
 class DiffOpAdd extends DiffOp {
-  var $type = 'add';
+  public $type = 'add';
 
   public function __construct($lines) {
     $this->closing = $lines;
diff --git a/core/lib/Drupal/Component/Diff/Engine/DiffOpChange.php b/core/lib/Drupal/Component/Diff/Engine/DiffOpChange.php
index 404b9964cbb1..1e8b4c3c28fb 100644
--- a/core/lib/Drupal/Component/Diff/Engine/DiffOpChange.php
+++ b/core/lib/Drupal/Component/Diff/Engine/DiffOpChange.php
@@ -8,7 +8,7 @@
  * @subpackage DifferenceEngine
  */
 class DiffOpChange extends DiffOp {
-  var $type = 'change';
+  public $type = 'change';
 
   public function __construct($orig, $closing) {
     $this->orig = $orig;
diff --git a/core/lib/Drupal/Component/Diff/Engine/DiffOpCopy.php b/core/lib/Drupal/Component/Diff/Engine/DiffOpCopy.php
index 9792fb0ce84d..c48a2d91ebc0 100644
--- a/core/lib/Drupal/Component/Diff/Engine/DiffOpCopy.php
+++ b/core/lib/Drupal/Component/Diff/Engine/DiffOpCopy.php
@@ -8,7 +8,7 @@
  * @subpackage DifferenceEngine
  */
 class DiffOpCopy extends DiffOp {
-  var $type = 'copy';
+  public $type = 'copy';
 
   public function __construct($orig, $closing = FALSE) {
     if (!is_array($closing)) {
diff --git a/core/lib/Drupal/Component/Diff/Engine/DiffOpDelete.php b/core/lib/Drupal/Component/Diff/Engine/DiffOpDelete.php
index 3b3b5672d08a..5d777d147b37 100644
--- a/core/lib/Drupal/Component/Diff/Engine/DiffOpDelete.php
+++ b/core/lib/Drupal/Component/Diff/Engine/DiffOpDelete.php
@@ -8,7 +8,7 @@
  * @subpackage DifferenceEngine
  */
 class DiffOpDelete extends DiffOp {
-  var $type = 'delete';
+  public $type = 'delete';
 
   public function __construct($lines) {
     $this->orig = $lines;
diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
index 182498b9d16b..2f5374b38c07 100644
--- a/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
+++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
@@ -41,7 +41,7 @@ class Connection extends DatabaseConnection {
    *
    * @var bool
    */
-  var $tableDropped = FALSE;
+  public $tableDropped = FALSE;
 
   /**
    * Constructs a \Drupal\Core\Database\Driver\sqlite\Connection object.
diff --git a/core/lib/Drupal/Core/Database/Query/PagerSelectExtender.php b/core/lib/Drupal/Core/Database/Query/PagerSelectExtender.php
index 478ca3014d2b..a925e3140bb8 100644
--- a/core/lib/Drupal/Core/Database/Query/PagerSelectExtender.php
+++ b/core/lib/Drupal/Core/Database/Query/PagerSelectExtender.php
@@ -21,7 +21,7 @@ class PagerSelectExtender extends SelectExtender {
    *
    * @var int
    */
-  static $maxElement = 0;
+  public static $maxElement = 0;
 
   /**
    * The number of elements per page to allow.
diff --git a/core/lib/Drupal/Core/Password/PhpassHashedPassword.php b/core/lib/Drupal/Core/Password/PhpassHashedPassword.php
index 712643a63b92..28313d266c79 100644
--- a/core/lib/Drupal/Core/Password/PhpassHashedPassword.php
+++ b/core/lib/Drupal/Core/Password/PhpassHashedPassword.php
@@ -29,7 +29,7 @@ class PhpassHashedPassword implements PasswordInterface {
   /**
    * Returns a string for mapping an int to the corresponding base 64 character.
    */
-  static $ITOA64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
+  public static $ITOA64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
 
   /**
    * Specifies the number of times the hashing function will be applied when
diff --git a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php
index ba9b4f853853..9c3ff5fc9233 100644
--- a/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php
+++ b/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php
@@ -16,7 +16,7 @@ class MigrateBlockTest extends MigrateDrupal7TestBase {
  /**
    * {@inheritdoc}
    */
-  static $modules = [
+  public static $modules = [
     'block',
     'views',
     'comment',
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php
index 6de6eee6a355..0bf29fdc6a2d 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentBodyFieldTest.php
@@ -15,7 +15,7 @@
  */
 class MigrateBlockContentBodyFieldTest extends MigrateDrupal7TestBase {
 
-  static $modules = array('block', 'block_content', 'filter', 'text');
+  public static $modules = array('block', 'block_content', 'filter', 'text');
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php
index 4b3e8efe39b7..9a3cbf046692 100644
--- a/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php
+++ b/core/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentTypeTest.php
@@ -13,7 +13,7 @@
  */
 class MigrateBlockContentTypeTest extends MigrateDrupal7TestBase {
 
-  static $modules = array('block', 'block_content', 'filter', 'text');
+  public static $modules = array('block', 'block_content', 'filter', 'text');
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php
index c9cf0107acb0..76a8b0f89cad 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php
@@ -20,7 +20,7 @@ class MigrateFieldInstanceTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  static $modules = array(
+  public static $modules = array(
     'comment',
     'datetime',
     'file',
diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php
index eba9b9c51edb..b1c2fb8b3e67 100644
--- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php
+++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php
@@ -18,7 +18,7 @@ class MigrateFieldTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  static $modules = array(
+  public static $modules = array(
     'comment',
     'datetime',
     'file',
diff --git a/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php b/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php
index b2d2f4e43c98..9750da3ec1db 100644
--- a/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php
+++ b/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php
@@ -14,7 +14,7 @@
  */
 class MigrateFileTest extends MigrateDrupal7TestBase {
 
-  static $modules = ['file'];
+  public static $modules = ['file'];
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php b/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php
index 8e98e8ff0072..0ab5d056f2f4 100644
--- a/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php
+++ b/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php
@@ -16,7 +16,7 @@ class MigrateFilterFormatTest extends MigrateDrupal7TestBase {
   /**
    * {@inheritdoc}
    */
-  static $modules = array('filter');
+  public static $modules = array('filter');
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php b/core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php
index 92e1acddd786..65dfc2b493fa 100644
--- a/core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php
+++ b/core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php
@@ -18,7 +18,7 @@
 class HistoryUserTimestamp extends FilterPluginBase {
 
   // Don't display empty space where the operator would be.
-  var $no_operator = TRUE;
+  public $no_operator = TRUE;
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/src/Plugin/views/row/Rss.php b/core/modules/node/src/Plugin/views/row/Rss.php
index c2a5f0a65e0c..097655a20418 100644
--- a/core/modules/node/src/Plugin/views/row/Rss.php
+++ b/core/modules/node/src/Plugin/views/row/Rss.php
@@ -22,12 +22,12 @@
 class Rss extends RssPluginBase {
 
   // Basic properties that let the row style follow relationships.
-  var $base_table = 'node_field_data';
+  public $base_table = 'node_field_data';
 
-  var $base_field = 'nid';
+  public $base_field = 'nid';
 
   // Stores the nodes loaded with preRender.
-  var $nodes = array();
+  public $nodes = array();
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
index 24676ddf5dfa..60fb6be8195c 100644
--- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
+++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php
@@ -13,7 +13,7 @@
  */
 class MigrateNodeTest extends MigrateDrupal7TestBase {
 
-  static $modules = array(
+  public static $modules = array(
     'comment',
     'datetime',
     'filter',
diff --git a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php
index 19dfd89ecdbd..316c53f24e68 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php
@@ -18,7 +18,7 @@ class MigrateShortcutSetTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  static $modules = array(
+  public static $modules = array(
     'link',
     'field',
     'shortcut',
diff --git a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php
index 09c09404d7c3..6a9ebe346b63 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php
@@ -17,7 +17,7 @@ class MigrateShortcutSetUsersTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  static $modules = array(
+  public static $modules = array(
     'link',
     'field',
     'shortcut',
diff --git a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php
index 330693af3f4c..791deb2192e2 100644
--- a/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php
+++ b/core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php
@@ -18,7 +18,7 @@ class MigrateShortcutTest extends MigrateDrupal7TestBase {
    *
    * @var array
    */
-  static $modules = array(
+  public static $modules = array(
     'link',
     'field',
     'shortcut',
diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
index 1693af1795ce..0158881f504e 100644
--- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
+++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
@@ -22,7 +22,7 @@
 class TaxonomyIndexTid extends ManyToOne {
 
   // Stores the exposed input for this filter.
-  var $validated_exposed_input = NULL;
+  public $validated_exposed_input = NULL;
 
   /**
    * The vocabulary storage.
diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
index 56641c64ae86..d0ae5ebe0abf 100644
--- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
+++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
@@ -55,15 +55,15 @@
  */
 abstract class ArgumentPluginBase extends HandlerBase implements CacheableDependencyInterface {
 
-  var $validator = NULL;
-  var $argument = NULL;
-  var $value = NULL;
+  public $validator = NULL;
+  public $argument = NULL;
+  public $value = NULL;
 
   /**
    * The table to use for the name, should it not be in the same table as the argument.
    * @var string
    */
-  var $name_table;
+  public $name_table;
 
   /**
    * The field to use for the name to use in the summary, which is
@@ -71,7 +71,7 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend
    * the argument itself is the nid, but node.title is displayed.
    * @var string
    */
-  var $name_field;
+  public $name_field;
 
   /**
    * Overrides Drupal\views\Plugin\views\HandlerBase:init().
diff --git a/core/modules/views/src/Plugin/views/argument/Date.php b/core/modules/views/src/Plugin/views/argument/Date.php
index 50c8cf98c703..32b796d0367b 100644
--- a/core/modules/views/src/Plugin/views/argument/Date.php
+++ b/core/modules/views/src/Plugin/views/argument/Date.php
@@ -40,7 +40,7 @@ class Date extends Formula implements ContainerFactoryPluginInterface {
    */
   protected $argFormat = 'Y-m-d';
 
-  var $option_name = 'default_argument_date';
+  public $option_name = 'default_argument_date';
 
   /**
    * The route match.
diff --git a/core/modules/views/src/Plugin/views/argument/Formula.php b/core/modules/views/src/Plugin/views/argument/Formula.php
index 951d3ae41c9a..3db968788560 100644
--- a/core/modules/views/src/Plugin/views/argument/Formula.php
+++ b/core/modules/views/src/Plugin/views/argument/Formula.php
@@ -19,7 +19,7 @@
  */
 class Formula extends ArgumentPluginBase {
 
-  var $formula = NULL;
+  public $formula = NULL;
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/src/Plugin/views/argument/NumericArgument.php b/core/modules/views/src/Plugin/views/argument/NumericArgument.php
index 929e5a2d35de..b3148369a780 100644
--- a/core/modules/views/src/Plugin/views/argument/NumericArgument.php
+++ b/core/modules/views/src/Plugin/views/argument/NumericArgument.php
@@ -18,13 +18,13 @@ class NumericArgument extends ArgumentPluginBase {
    * The operator used for the query: or|and.
    * @var string
    */
-  var $operator;
+  public $operator;
 
   /**
    * The actual value which is used for querying.
    * @var array
    */
-  var $value;
+  public $value;
 
   protected function defineOptions() {
     $options = parent::defineOptions();
diff --git a/core/modules/views/src/Plugin/views/cache/CachePluginBase.php b/core/modules/views/src/Plugin/views/cache/CachePluginBase.php
index ad6d19dd425c..87465ca06fd3 100644
--- a/core/modules/views/src/Plugin/views/cache/CachePluginBase.php
+++ b/core/modules/views/src/Plugin/views/cache/CachePluginBase.php
@@ -31,7 +31,7 @@ abstract class CachePluginBase extends PluginBase {
   /**
    * Contains all data that should be written/read from cache.
    */
-  var $storage = array();
+  public $storage = array();
 
   /**
    * Which cache bin to store query results in.
diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
index 287c3c15da91..36ef8618146d 100644
--- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
@@ -30,7 +30,7 @@ abstract class DisplayPluginBase extends PluginBase implements DisplayPluginInte
    *
    * @var \Drupal\views\ViewExecutable
    */
-  var $view = NULL;
+  public $view = NULL;
 
   /**
    * An array of instantiated handlers used in this display.
diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
index c08db0802148..21803ce4cc03 100644
--- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
+++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php
@@ -68,8 +68,8 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf
    */
   const RENDER_TEXT_PHASE_EMPTY = 2;
 
-  var $field_alias = 'unknown';
-  var $aliases = array();
+  public $field_alias = 'unknown';
+  public $aliases = array();
 
   /**
    * The field value prior to any rewriting.
@@ -85,7 +85,7 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf
    *
    * @var array
    */
-  var $additional_fields = array();
+  public $additional_fields = array();
 
   /**
    * The link generator.
diff --git a/core/modules/views/src/Plugin/views/field/PrerenderList.php b/core/modules/views/src/Plugin/views/field/PrerenderList.php
index d3b9b1665bb6..aa8f75207e42 100644
--- a/core/modules/views/src/Plugin/views/field/PrerenderList.php
+++ b/core/modules/views/src/Plugin/views/field/PrerenderList.php
@@ -25,7 +25,7 @@ abstract class PrerenderList extends FieldPluginBase implements MultiItemsFieldH
    *
    * @var array
    */
-  var $items = array();
+  public $items = array();
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/src/Plugin/views/filter/BooleanOperator.php b/core/modules/views/src/Plugin/views/filter/BooleanOperator.php
index c6433d4b6ed6..616666be4359 100644
--- a/core/modules/views/src/Plugin/views/filter/BooleanOperator.php
+++ b/core/modules/views/src/Plugin/views/filter/BooleanOperator.php
@@ -44,9 +44,9 @@ class BooleanOperator extends FilterPluginBase {
   // exposed filter options
   protected $alwaysMultiple = TRUE;
   // Don't display empty space where the operator would be.
-  var $no_operator = TRUE;
+  public $no_operator = TRUE;
   // Whether to accept NULL as a false value or not
-  var $accept_null = FALSE;
+  public $accept_null = FALSE;
 
 
 
diff --git a/core/modules/views/src/Plugin/views/filter/Combine.php b/core/modules/views/src/Plugin/views/filter/Combine.php
index d663f82fe2ef..292986f2bc4c 100644
--- a/core/modules/views/src/Plugin/views/filter/Combine.php
+++ b/core/modules/views/src/Plugin/views/filter/Combine.php
@@ -16,7 +16,7 @@ class Combine extends StringFilter {
   /**
    * @var views_plugin_query_default
    */
-  var $query;
+  public $query;
 
   protected function defineOptions() {
     $options = parent::defineOptions();
diff --git a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php
index f7cbf1b94e40..cf00bf742a43 100644
--- a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php
+++ b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php
@@ -48,17 +48,17 @@ abstract class FilterPluginBase extends HandlerBase implements CacheableDependen
    * Contains the actual value of the field,either configured in the views ui
    * or entered in the exposed filters.
    */
-  var $value = NULL;
+  public $value = NULL;
 
   /**
    * Contains the operator which is used on the query.
    */
-  var $operator = '=';
+  public $operator = '=';
 
   /**
    * Contains the information of the selected item in a grouped filter.
    */
-  var $group_info = NULL;
+  public $group_info = NULL;
 
   /**
    * @var bool
@@ -70,13 +70,13 @@ abstract class FilterPluginBase extends HandlerBase implements CacheableDependen
    * @var bool
    * Disable the possibility to use operators.
    */
-  var $no_operator = FALSE;
+  public $no_operator = FALSE;
 
   /**
    * @var bool
    * Disable the possibility to allow a exposed input to be optional.
    */
-  var $always_required = FALSE;
+  public $always_required = FALSE;
 
   /**
    * Overrides \Drupal\views\Plugin\views\HandlerBase::init().
diff --git a/core/modules/views/src/Plugin/views/filter/ManyToOne.php b/core/modules/views/src/Plugin/views/filter/ManyToOne.php
index 8e49cd5997ff..7fa1fbc46fec 100644
--- a/core/modules/views/src/Plugin/views/filter/ManyToOne.php
+++ b/core/modules/views/src/Plugin/views/filter/ManyToOne.php
@@ -26,7 +26,7 @@ class ManyToOne extends InOperator {
    *
    * Stores the Helper object which handles the many_to_one complexity.
    */
-  var $helper = NULL;
+  public $helper = NULL;
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php b/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php
index c2bb43e30a29..ec231a0b08c4 100644
--- a/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php
+++ b/core/modules/views/src/Plugin/views/pager/PagerPluginBase.php
@@ -27,9 +27,9 @@
  */
 abstract class PagerPluginBase extends PluginBase {
 
-  var $current_page = NULL;
+  public $current_page = NULL;
 
-  var $total_items = 0;
+  public $total_items = 0;
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
index 5ebb3c5e8c01..d41731e8ca7c 100644
--- a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
+++ b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
@@ -38,7 +38,7 @@ abstract class QueryPluginBase extends PluginBase implements CacheableDependency
    *
    * @var views_plugin_pager
    */
-  var $pager = NULL;
+  public $pager = NULL;
 
   /**
    * Stores the limit of items that should be requested in the query.
@@ -62,7 +62,7 @@ public function query($get_count = FALSE) { }
    * @param view $view
    *   The view which is executed.
    */
-  function alter(ViewExecutable $view) {  }
+  public function alter(ViewExecutable $view) {  }
 
   /**
    * Builds the necessary info to execute the query.
@@ -70,7 +70,7 @@ function alter(ViewExecutable $view) {  }
    * @param view $view
    *   The view which is executed.
    */
-  function build(ViewExecutable $view) { }
+  public function build(ViewExecutable $view) { }
 
   /**
    * Executes the query and fills the associated view object with according
@@ -85,7 +85,7 @@ function build(ViewExecutable $view) { }
    * @param view $view
    *   The view which is executed.
    */
-  function execute(ViewExecutable $view) {  }
+  public function execute(ViewExecutable $view) {  }
 
   /**
    * Add a signature to the query, if such a thing is feasible.
diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php
index 54bb98157a51..43b4a4494eac 100644
--- a/core/modules/views/src/Plugin/views/query/Sql.php
+++ b/core/modules/views/src/Plugin/views/query/Sql.php
@@ -35,26 +35,26 @@ class Sql extends QueryPluginBase {
   /**
    * Holds an array of tables and counts added so that we can create aliases
    */
-  var $tables = array();
+  public $tables = array();
 
   /**
    * Holds an array of relationships, which are aliases of the primary
    * table that represent different ways to join the same table in.
    */
-  var $relationships = array();
+  public $relationships = array();
 
   /**
    * An array of sections of the WHERE query. Each section is in itself
    * an array of pieces and a flag as to whether or not it should be AND
    * or OR.
    */
-  var $where = array();
+  public $where = array();
   /**
    * An array of sections of the HAVING query. Each section is in itself
    * an array of pieces and a flag as to whether or not it should be AND
    * or OR.
    */
-  var $having = array();
+  public $having = array();
   /**
    * The default operator to use when connecting the WHERE groups. May be
    * AND or OR.
@@ -64,23 +64,23 @@ class Sql extends QueryPluginBase {
   /**
    * A simple array of order by clauses.
    */
-  var $orderby = array();
+  public $orderby = array();
 
   /**
    * A simple array of group by clauses.
    */
-  var $groupby = array();
+  public $groupby = array();
 
 
   /**
    * An array of fields.
    */
-  var $fields = array();
+  public $fields = array();
 
   /**
    * A flag as to whether or not to make the primary field distinct.
    */
-  var $distinct = FALSE;
+  public $distinct = FALSE;
 
   protected $hasAggregate = FALSE;
 
@@ -97,7 +97,7 @@ class Sql extends QueryPluginBase {
   /**
    * Query tags which will be passed over to the dbtng query object.
    */
-  var $tags = array();
+  public $tags = array();
 
   /**
    * Is the view marked as not distinct.
@@ -993,7 +993,7 @@ public function addTag($tag) {
   /**
    * Generates a unique placeholder used in the db query.
    */
-  function placeholder($base = 'views') {
+  public function placeholder($base = 'views') {
     static $placeholders = array();
     if (!isset($placeholders[$base])) {
       $placeholders[$base] = 0;
@@ -1332,14 +1332,14 @@ public function getWhereArgs() {
   /**
    * Let modules modify the query just prior to finalizing it.
    */
-  function alter(ViewExecutable $view) {
+  public function alter(ViewExecutable $view) {
     \Drupal::moduleHandler()->invokeAll('views_query_alter', array($view, $this));
   }
 
   /**
    * Builds the necessary info to execute the query.
    */
-  function build(ViewExecutable $view) {
+  public function build(ViewExecutable $view) {
     // Make the query distinct if the option was set.
     if (!empty($this->options['distinct'])) {
       $this->setDistinct(TRUE);
@@ -1364,7 +1364,7 @@ function build(ViewExecutable $view) {
    * Values to set: $view->result, $view->total_rows, $view->execute_time,
    * $view->current_page.
    */
-  function execute(ViewExecutable $view) {
+  public function execute(ViewExecutable $view) {
     $query = $view->build_info['query'];
     $count_query = $view->build_info['count_query'];
 
diff --git a/core/modules/views/src/Tests/Plugin/PluginBaseTest.php b/core/modules/views/src/Tests/Plugin/PluginBaseTest.php
index 4161db405b23..c9ba78fc14de 100644
--- a/core/modules/views/src/Tests/Plugin/PluginBaseTest.php
+++ b/core/modules/views/src/Tests/Plugin/PluginBaseTest.php
@@ -22,7 +22,7 @@ class PluginBaseTest extends KernelTestBase {
   /**
    * @var TestPluginBase
    */
-  var $testPluginBase;
+  protected $testPluginBase;
 
   protected function setUp() {
     parent::setUp();
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index 7688a0e449e2..491a5f0551a1 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -100,6 +100,11 @@
   <rule ref="Generic.PHP.UpperCaseConstant"/>
   <rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
 
+  <!-- PSR-2 sniffs -->
+  <rule ref="PSR2.Classes.PropertyDeclaration">
+    <exclude name="PSR2.Classes.PropertyDeclaration.Underscore"/>
+  </rule>
+
   <!-- Squiz sniffs -->
   <rule ref="Squiz.Strings.ConcatenationSpacing">
     <properties>
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
index 53797cfb7f2e..22cae65fe4ad 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityQueryTest.php
@@ -19,7 +19,7 @@ class ConfigEntityQueryTest extends KernelTestBase {
    *
    * @var array
    */
-  static $modules = array('config_test');
+  public static $modules = array('config_test');
 
   /**
    * Stores the search results for alter comparison.
-- 
GitLab