diff --git a/autoload.php b/autoload.php
index fb47464e6b..4b1d5aa013 100644
--- a/autoload.php
+++ b/autoload.php
@@ -256,7 +256,7 @@ static function ($remaining, $current) {
*
* @return void
*/
- public static function addSearchPath(string $path, string $nsPrefix='')
+ public static function addSearchPath(string $path, string $nsPrefix = '')
{
self::$searchPaths[$path] = rtrim(trim((string) $nsPrefix), '\\');
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index 2b0c61516e..a721c23bce 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -53,7 +53,11 @@
-
+
+
+
+
+
diff --git a/src/Config.php b/src/Config.php
index 480abce696..60e4390206 100644
--- a/src/Config.php
+++ b/src/Config.php
@@ -415,7 +415,7 @@ public function setSettings(array $settings)
*
* @return void
*/
- public function __construct(array $cliArgs=[], bool $dieOnUnknownArg=true)
+ public function __construct(array $cliArgs = [], bool $dieOnUnknownArg = true)
{
if (defined('PHP_CODESNIFFER_IN_TESTS') === true) {
// Let everything through during testing so that we can
@@ -1490,7 +1490,7 @@ public function printUsage()
*
* @return string|void
*/
- public function printShortUsage(bool $returnOutput=false)
+ public function printShortUsage(bool $returnOutput = false)
{
if (PHP_CODESNIFFER_CBF === true) {
$usage = 'Run "phpcbf --help" for usage information';
@@ -1633,7 +1633,7 @@ public static function getExecutablePath(string $name)
* @see getConfigData()
* @throws \PHP_CodeSniffer\Exceptions\DeepExitException If the config file can not be written.
*/
- public function setConfigData(string $key, ?string $value, bool $temp=false)
+ public function setConfigData(string $key, ?string $value, bool $temp = false)
{
if (isset($this->overriddenDefaults['runtime-set']) === true
&& isset($this->overriddenDefaults['runtime-set'][$key]) === true
diff --git a/src/Files/File.php b/src/Files/File.php
index 99ab24097d..a9fe55b431 100644
--- a/src/Files/File.php
+++ b/src/Files/File.php
@@ -674,9 +674,9 @@ public function addError(
string $error,
?int $stackPtr,
string $code,
- array $data=[],
- int $severity=0,
- bool $fixable=false
+ array $data = [],
+ int $severity = 0,
+ bool $fixable = false
) {
if ($stackPtr === null) {
$line = 1;
@@ -708,9 +708,9 @@ public function addWarning(
string $warning,
?int $stackPtr,
string $code,
- array $data=[],
- int $severity=0,
- bool $fixable=false
+ array $data = [],
+ int $severity = 0,
+ bool $fixable = false
) {
if ($stackPtr === null) {
$line = 1;
@@ -741,8 +741,8 @@ public function addErrorOnLine(
string $error,
int $line,
string $code,
- array $data=[],
- int $severity=0
+ array $data = [],
+ int $severity = 0
) {
return $this->addMessage(true, $error, $line, 1, $code, $data, $severity, false);
@@ -765,8 +765,8 @@ public function addWarningOnLine(
string $warning,
int $line,
string $code,
- array $data=[],
- int $severity=0
+ array $data = [],
+ int $severity = 0
) {
return $this->addMessage(false, $warning, $line, 1, $code, $data, $severity, false);
@@ -791,8 +791,8 @@ public function addFixableError(
string $error,
int $stackPtr,
string $code,
- array $data=[],
- int $severity=0
+ array $data = [],
+ int $severity = 0
) {
$recorded = $this->addError($error, $stackPtr, $code, $data, $severity, true);
if ($recorded === true && $this->fixer->enabled === true) {
@@ -822,8 +822,8 @@ public function addFixableWarning(
string $warning,
int $stackPtr,
string $code,
- array $data=[],
- int $severity=0
+ array $data = [],
+ int $severity = 0
) {
$recorded = $this->addWarning($warning, $stackPtr, $code, $data, $severity, true);
if ($recorded === true && $this->fixer->enabled === true) {
@@ -2264,7 +2264,7 @@ public function isReference(int $stackPtr)
* @return string The token contents.
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the specified position does not exist.
*/
- public function getTokensAsString($start, $length, bool $origContent=false)
+ public function getTokensAsString($start, $length, bool $origContent = false)
{
if (is_int($start) === false || isset($this->tokens[$start]) === false) {
throw new RuntimeException('The $start position for getTokensAsString() must exist in the token stack');
@@ -2324,10 +2324,10 @@ public function getTokensAsString($start, $length, bool $origContent=false)
public function findPrevious(
$types,
int $start,
- ?int $end=null,
- bool $exclude=false,
- ?string $value=null,
- bool $local=false
+ ?int $end = null,
+ bool $exclude = false,
+ ?string $value = null,
+ bool $local = false
) {
$types = (array) $types;
@@ -2405,10 +2405,10 @@ public function findPrevious(
public function findNext(
$types,
int $start,
- ?int $end=null,
- bool $exclude=false,
- ?string $value=null,
- bool $local=false
+ ?int $end = null,
+ bool $exclude = false,
+ ?string $value = null,
+ bool $local = false
) {
$types = (array) $types;
@@ -2451,7 +2451,7 @@ public function findNext(
*
* @return int
*/
- public function findStartOfStatement(int $start, $ignore=null)
+ public function findStartOfStatement(int $start, $ignore = null)
{
$startTokens = Tokens::BLOCK_OPENERS;
$startTokens[T_OPEN_SHORT_ARRAY] = true;
@@ -2642,7 +2642,7 @@ public function findStartOfStatement(int $start, $ignore=null)
*
* @return int
*/
- public function findEndOfStatement(int $start, $ignore=null)
+ public function findEndOfStatement(int $start, $ignore = null)
{
$endTokens = [
T_COLON => true,
@@ -2769,7 +2769,7 @@ public function findEndOfStatement(int $start, $ignore=null)
* FALSE when no matching token could be found between the start of
* the line and the start token.
*/
- public function findFirstOnLine($types, int $start, bool $exclude=false, ?string $value=null)
+ public function findFirstOnLine($types, int $start, bool $exclude = false, ?string $value = null)
{
if (is_array($types) === false) {
$types = [$types];
@@ -2860,7 +2860,7 @@ public function hasCondition(int $stackPtr, $types)
*
* @return int|false
*/
- public function getCondition(int $stackPtr, $type, bool $first=true)
+ public function getCondition(int $stackPtr, $type, bool $first = true)
{
// Check for the existence of the token.
if (isset($this->tokens[$stackPtr]) === false) {
diff --git a/src/Files/FileList.php b/src/Files/FileList.php
index b1d6e224b3..315978421b 100644
--- a/src/Files/FileList.php
+++ b/src/Files/FileList.php
@@ -117,7 +117,7 @@ public function __construct(Config $config, Ruleset $ruleset)
*
* @return void
*/
- public function addFile(string $path, ?File $file=null)
+ public function addFile(string $path, ?File $file = null)
{
// No filtering is done for STDIN when the filename
// has not been specified.
diff --git a/src/Fixer.php b/src/Fixer.php
index b2da901c67..7a2766ab8b 100644
--- a/src/Fixer.php
+++ b/src/Fixer.php
@@ -235,7 +235,7 @@ public function fixFile()
*
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException When the diff command fails.
*/
- public function generateDiff(?string $filePath=null, bool $colors=true)
+ public function generateDiff(?string $filePath = null, bool $colors = true)
{
if ($filePath === null) {
$filePath = $this->currentFile->getFilename();
@@ -689,7 +689,7 @@ public function revertToken(int $stackPtr)
*
* @return bool If the change was accepted.
*/
- public function substrToken(int $stackPtr, int $start, ?int $length=null)
+ public function substrToken(int $stackPtr, int $start, ?int $length = null)
{
$current = $this->getTokenContent($stackPtr);
diff --git a/src/Reports/Cbf.php b/src/Reports/Cbf.php
index 3abf73bb5f..a0814f5a70 100644
--- a/src/Reports/Cbf.php
+++ b/src/Reports/Cbf.php
@@ -42,7 +42,7 @@ class Cbf implements Report
* @return bool
* @throws \PHP_CodeSniffer\Exceptions\DeepExitException
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
$errors = $phpcsFile->getFixableCount();
if ($errors !== 0) {
@@ -139,10 +139,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
$lines = explode(PHP_EOL, $cachedData);
array_pop($lines);
diff --git a/src/Reports/Checkstyle.php b/src/Reports/Checkstyle.php
index 56f36a5798..64ec36fa82 100644
--- a/src/Reports/Checkstyle.php
+++ b/src/Reports/Checkstyle.php
@@ -32,7 +32,7 @@ class Checkstyle implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
$out = new XMLWriter;
$out->openMemory();
@@ -95,10 +95,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
echo ''.PHP_EOL;
echo ''.PHP_EOL;
diff --git a/src/Reports/Code.php b/src/Reports/Code.php
index d730a00ea6..05ab6e353c 100644
--- a/src/Reports/Code.php
+++ b/src/Reports/Code.php
@@ -34,7 +34,7 @@ class Code implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
if ($report['errors'] === 0 && $report['warnings'] === 0) {
// Nothing to print.
@@ -340,10 +340,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
if ($cachedData === '') {
return;
diff --git a/src/Reports/Csv.php b/src/Reports/Csv.php
index e47bf7bc6e..156847c840 100644
--- a/src/Reports/Csv.php
+++ b/src/Reports/Csv.php
@@ -30,7 +30,7 @@ class Csv implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
if ($report['errors'] === 0 && $report['warnings'] === 0) {
// Nothing to print.
@@ -78,10 +78,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
echo 'File,Line,Column,Type,Message,Source,Severity,Fixable'.PHP_EOL;
echo $cachedData;
diff --git a/src/Reports/Diff.php b/src/Reports/Diff.php
index d5f68298a3..41f9f6ef70 100644
--- a/src/Reports/Diff.php
+++ b/src/Reports/Diff.php
@@ -32,7 +32,7 @@ class Diff implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
$errors = $phpcsFile->getFixableCount();
if ($errors === 0) {
@@ -106,10 +106,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
echo $cachedData;
if ($toScreen === true && $cachedData !== '') {
diff --git a/src/Reports/Emacs.php b/src/Reports/Emacs.php
index 14bf664f56..ed7d2861e4 100644
--- a/src/Reports/Emacs.php
+++ b/src/Reports/Emacs.php
@@ -30,7 +30,7 @@ class Emacs implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
if ($report['errors'] === 0 && $report['warnings'] === 0) {
// Nothing to print.
@@ -78,10 +78,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
echo $cachedData;
diff --git a/src/Reports/Full.php b/src/Reports/Full.php
index 87efe1d66d..b76ee05951 100644
--- a/src/Reports/Full.php
+++ b/src/Reports/Full.php
@@ -30,7 +30,7 @@ class Full implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
if ($report['errors'] === 0 && $report['warnings'] === 0) {
// Nothing to print.
@@ -238,10 +238,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
if ($cachedData === '') {
return;
diff --git a/src/Reports/Info.php b/src/Reports/Info.php
index f6ae6f1a68..434bc2d933 100644
--- a/src/Reports/Info.php
+++ b/src/Reports/Info.php
@@ -30,7 +30,7 @@ class Info implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
$metrics = $phpcsFile->getMetrics();
foreach ($metrics as $metric => $data) {
@@ -66,10 +66,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
$lines = explode(PHP_EOL, $cachedData);
array_pop($lines);
diff --git a/src/Reports/Json.php b/src/Reports/Json.php
index 4447cbaef7..fa43510cb6 100644
--- a/src/Reports/Json.php
+++ b/src/Reports/Json.php
@@ -31,7 +31,7 @@ class Json implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
$filename = str_replace('\\', '\\\\', $report['filename']);
$filename = str_replace('"', '\"', $filename);
@@ -92,10 +92,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
echo '{"totals":{"errors":'.$totalErrors.',"warnings":'.$totalWarnings.',"fixable":'.$totalFixable.'},"files":{';
echo rtrim($cachedData, ',');
diff --git a/src/Reports/Junit.php b/src/Reports/Junit.php
index c59c4102c6..a9a55cac90 100644
--- a/src/Reports/Junit.php
+++ b/src/Reports/Junit.php
@@ -33,7 +33,7 @@ class Junit implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
$out = new XMLWriter;
$out->openMemory();
@@ -106,10 +106,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
// Figure out the total number of tests.
$tests = 0;
diff --git a/src/Reports/Notifysend.php b/src/Reports/Notifysend.php
index 503f7a6ffa..8610407e8f 100644
--- a/src/Reports/Notifysend.php
+++ b/src/Reports/Notifysend.php
@@ -96,7 +96,7 @@ public function __construct()
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
echo $report['filename'].PHP_EOL;
@@ -129,10 +129,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
$checkedFiles = explode(PHP_EOL, trim($cachedData));
diff --git a/src/Reports/Performance.php b/src/Reports/Performance.php
index 1d2bd40bef..aa30ba80fe 100644
--- a/src/Reports/Performance.php
+++ b/src/Reports/Performance.php
@@ -32,7 +32,7 @@ class Performance implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
$times = $phpcsFile->getListenerTimes();
foreach ($times as $sniff => $time) {
@@ -66,10 +66,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
$lines = explode(PHP_EOL, $cachedData);
array_pop($lines);
diff --git a/src/Reports/Report.php b/src/Reports/Report.php
index fa8ae1c7b1..f1407a76c2 100644
--- a/src/Reports/Report.php
+++ b/src/Reports/Report.php
@@ -52,7 +52,7 @@ interface Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80);
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80);
/**
@@ -77,10 +77,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
);
diff --git a/src/Reports/Source.php b/src/Reports/Source.php
index a6cc078880..8ad7ffcb8c 100644
--- a/src/Reports/Source.php
+++ b/src/Reports/Source.php
@@ -30,7 +30,7 @@ class Source implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
if ($report['errors'] === 0 && $report['warnings'] === 0) {
// Nothing to print.
@@ -86,10 +86,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
$lines = explode(PHP_EOL, $cachedData);
array_pop($lines);
diff --git a/src/Reports/Summary.php b/src/Reports/Summary.php
index c54848d402..b5c8e18b33 100644
--- a/src/Reports/Summary.php
+++ b/src/Reports/Summary.php
@@ -30,7 +30,7 @@ class Summary implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
if (PHP_CODESNIFFER_VERBOSITY === 0
&& $report['errors'] === 0
@@ -68,10 +68,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
$lines = explode(PHP_EOL, $cachedData);
array_pop($lines);
diff --git a/src/Reports/VersionControl.php b/src/Reports/VersionControl.php
index c7e6c79ace..9f50322782 100644
--- a/src/Reports/VersionControl.php
+++ b/src/Reports/VersionControl.php
@@ -38,7 +38,7 @@ abstract class VersionControl implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
$blames = $this->getBlameContent($phpcsFile->getFilename());
@@ -153,10 +153,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
$errorsShown = ($totalErrors + $totalWarnings);
if ($errorsShown === 0) {
diff --git a/src/Reports/Xml.php b/src/Reports/Xml.php
index c64c6570ca..8acba0e5dd 100644
--- a/src/Reports/Xml.php
+++ b/src/Reports/Xml.php
@@ -32,7 +32,7 @@ class Xml implements Report
*
* @return bool
*/
- public function generateFileReport(array $report, File $phpcsFile, bool $showSources=false, int $width=80)
+ public function generateFileReport(array $report, File $phpcsFile, bool $showSources = false, int $width = 80)
{
$out = new XMLWriter;
$out->openMemory();
@@ -112,10 +112,10 @@ public function generate(
int $totalErrors,
int $totalWarnings,
int $totalFixable,
- bool $showSources=false,
- int $width=80,
- bool $interactive=false,
- bool $toScreen=true
+ bool $showSources = false,
+ int $width = 80,
+ bool $interactive = false,
+ bool $toScreen = true
) {
echo ''.PHP_EOL;
echo ''.PHP_EOL;
diff --git a/src/Ruleset.php b/src/Ruleset.php
index de2d3ff1e5..ece573b1b7 100644
--- a/src/Ruleset.php
+++ b/src/Ruleset.php
@@ -529,7 +529,7 @@ private function displayCachedMessages()
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException - If the ruleset path is invalid.
* - If a specified autoload file could not be found.
*/
- public function processRuleset(string $rulesetPath, int $depth=0)
+ public function processRuleset(string $rulesetPath, int $depth = 0)
{
$rulesetPath = Common::realpath($rulesetPath);
if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -896,7 +896,7 @@ public function processRuleset(string $rulesetPath, int $depth=0)
*
* @return array
*/
- private function expandSniffDirectory(string $directory, int $depth=0)
+ private function expandSniffDirectory(string $directory, int $depth = 0)
{
$sniffs = [];
@@ -958,7 +958,7 @@ private function expandSniffDirectory(string $directory, int $depth=0)
* @return array
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the reference is invalid.
*/
- private function expandRulesetReference(string $ref, string $rulesetDir, int $depth=0)
+ private function expandRulesetReference(string $ref, string $rulesetDir, int $depth = 0)
{
// Naming an (external) standard "Internal" is not supported.
if (strtolower($ref) === 'internal') {
@@ -1140,7 +1140,7 @@ private function expandRulesetReference(string $ref, string $rulesetDir, int $de
* @return void
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If rule settings are invalid.
*/
- private function processRule(SimpleXMLElement $rule, array $newSniffs, int $depth=0)
+ private function processRule(SimpleXMLElement $rule, array $newSniffs, int $depth = 0)
{
$ref = (string) $rule['ref'];
$todo = [$ref];
@@ -1738,7 +1738,7 @@ private function getRealPropertyValue($value)
*
* @return array
*/
- public function getIgnorePatterns(?string $listener=null)
+ public function getIgnorePatterns(?string $listener = null)
{
if ($listener === null) {
return $this->ignorePatterns;
@@ -1764,7 +1764,7 @@ public function getIgnorePatterns(?string $listener=null)
*
* @return array
*/
- public function getIncludePatterns(?string $listener=null)
+ public function getIncludePatterns(?string $listener = null)
{
if ($listener === null) {
return $this->includePatterns;
diff --git a/src/Sniffs/AbstractScopeSniff.php b/src/Sniffs/AbstractScopeSniff.php
index 63bb438152..637c2c3e86 100644
--- a/src/Sniffs/AbstractScopeSniff.php
+++ b/src/Sniffs/AbstractScopeSniff.php
@@ -71,7 +71,7 @@ abstract class AbstractScopeSniff implements Sniff
public function __construct(
array $scopeTokens,
array $tokens,
- bool $listenOutside=false
+ bool $listenOutside = false
) {
if (empty($scopeTokens) === true) {
$error = 'The scope tokens list cannot be empty';
diff --git a/src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php b/src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php
index 062c7b1958..81d7e35fd9 100644
--- a/src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php
+++ b/src/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php
@@ -80,7 +80,7 @@ public function process(File $phpcsFile, int $stackPtr)
*
* @return int
*/
- public function checkAlignment(File $phpcsFile, int $stackPtr, ?int $end=null)
+ public function checkAlignment(File $phpcsFile, int $stackPtr, ?int $end = null)
{
$tokens = $phpcsFile->getTokens();
diff --git a/src/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php b/src/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php
index ee4baabd40..6e4e6d3eab 100644
--- a/src/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php
+++ b/src/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php
@@ -58,7 +58,7 @@ public function __construct()
*
* @return void
*/
- protected function addError(File $phpcsFile, int $stackPtr, string $functionName, ?string $pattern=null)
+ protected function addError(File $phpcsFile, int $stackPtr, string $functionName, ?string $pattern = null)
{
$data = [$functionName];
$error = 'Function %s() has been deprecated';
diff --git a/src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php b/src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php
index 0f5331071f..f86e4983ee 100644
--- a/src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php
+++ b/src/Standards/Generic/Sniffs/PHP/DisallowAlternativePHPTagsSniff.php
@@ -86,7 +86,7 @@ public function process(File $phpcsFile, int $stackPtr)
*
* @return string
*/
- protected function getSnippet(string $content, string $start='', int $length=40)
+ protected function getSnippet(string $content, string $start = '', int $length = 40)
{
$startPos = 0;
diff --git a/src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php b/src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php
index d21172f72c..61f221d1dc 100644
--- a/src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php
+++ b/src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php
@@ -146,7 +146,7 @@ public function process(File $phpcsFile, int $stackPtr)
*
* @return string
*/
- protected function getSnippet(string $content, string $start='', int $length=40)
+ protected function getSnippet(string $content, string $start = '', int $length = 40)
{
$startPos = 0;
diff --git a/src/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php b/src/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php
index 2198a6df05..899719cf54 100644
--- a/src/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php
+++ b/src/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php
@@ -210,7 +210,7 @@ public function process(File $phpcsFile, int $stackPtr)
*
* @return void
*/
- protected function addError(File $phpcsFile, int $stackPtr, string $functionName, ?string $pattern=null)
+ protected function addError(File $phpcsFile, int $stackPtr, string $functionName, ?string $pattern = null)
{
$data = [$functionName];
$error = 'The use of function %s() is ';
diff --git a/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.php b/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.php
index b1e1a76fa6..422f7901fc 100644
--- a/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.php
+++ b/src/Standards/Generic/Tests/Arrays/DisallowLongArraySyntaxUnitTest.php
@@ -30,7 +30,7 @@ final class DisallowLongArraySyntaxUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'DisallowLongArraySyntaxUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.php b/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.php
index 43af1e15e1..157132ffa5 100644
--- a/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.php
+++ b/src/Standards/Generic/Tests/Classes/DuplicateClassNameUnitTest.php
@@ -45,7 +45,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'DuplicateClassNameUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.php b/src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.php
index 2af59702c7..d3386f78f8 100644
--- a/src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.php
+++ b/src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.php
@@ -45,7 +45,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'AssignmentInConditionUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.php b/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.php
index 857fe3502a..a962ed025f 100644
--- a/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.php
+++ b/src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.php
@@ -66,7 +66,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'EmptyPHPStatementUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/CodeAnalysis/ForLoopShouldBeWhileLoopUnitTest.php b/src/Standards/Generic/Tests/CodeAnalysis/ForLoopShouldBeWhileLoopUnitTest.php
index b3154f1c0a..fb1e704fae 100644
--- a/src/Standards/Generic/Tests/CodeAnalysis/ForLoopShouldBeWhileLoopUnitTest.php
+++ b/src/Standards/Generic/Tests/CodeAnalysis/ForLoopShouldBeWhileLoopUnitTest.php
@@ -45,7 +45,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'ForLoopShouldBeWhileLoopUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.php b/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.php
index bf214f1ca8..b96bf2755a 100644
--- a/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.php
+++ b/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.php
@@ -45,7 +45,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'ForLoopWithTestFunctionCallUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.php b/src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.php
index b7826a175e..457a4d1951 100644
--- a/src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.php
+++ b/src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.php
@@ -45,7 +45,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'JumbledIncrementerUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/CodeAnalysis/UnconditionalIfStatementUnitTest.php b/src/Standards/Generic/Tests/CodeAnalysis/UnconditionalIfStatementUnitTest.php
index 932f435fbf..d101bcb715 100644
--- a/src/Standards/Generic/Tests/CodeAnalysis/UnconditionalIfStatementUnitTest.php
+++ b/src/Standards/Generic/Tests/CodeAnalysis/UnconditionalIfStatementUnitTest.php
@@ -45,7 +45,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'UnconditionalIfStatementUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/CodeAnalysis/UnnecessaryFinalModifierUnitTest.php b/src/Standards/Generic/Tests/CodeAnalysis/UnnecessaryFinalModifierUnitTest.php
index 8ade1020e5..83d943e7b5 100644
--- a/src/Standards/Generic/Tests/CodeAnalysis/UnnecessaryFinalModifierUnitTest.php
+++ b/src/Standards/Generic/Tests/CodeAnalysis/UnnecessaryFinalModifierUnitTest.php
@@ -45,7 +45,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'UnnecessaryFinalModifierUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/CodeAnalysis/UnusedFunctionParameterUnitTest.php b/src/Standards/Generic/Tests/CodeAnalysis/UnusedFunctionParameterUnitTest.php
index 884ee68343..3ef125ebf6 100644
--- a/src/Standards/Generic/Tests/CodeAnalysis/UnusedFunctionParameterUnitTest.php
+++ b/src/Standards/Generic/Tests/CodeAnalysis/UnusedFunctionParameterUnitTest.php
@@ -45,7 +45,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'UnusedFunctionParameterUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.php b/src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.php
index 6ccd53f750..ca784850c2 100644
--- a/src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.php
+++ b/src/Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.php
@@ -45,7 +45,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'UselessOverridingMethodUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.php b/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.php
index 60c75d5106..afdcbbb408 100644
--- a/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.php
+++ b/src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.php
@@ -46,7 +46,7 @@ public function setCliValues(string $testFile, Config $config)
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'DocCommentUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.php b/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.php
index e8aa91818a..6efc8f4864 100644
--- a/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.php
+++ b/src/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.php
@@ -30,7 +30,7 @@ final class InlineControlStructureUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'InlineControlStructureUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.php b/src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.php
index 634158def0..0fce83b468 100644
--- a/src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.php
+++ b/src/Standards/Generic/Tests/Files/ByteOrderMarkUnitTest.php
@@ -30,7 +30,7 @@ final class ByteOrderMarkUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ByteOrderMarkUnitTest.1.inc':
@@ -55,7 +55,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'ByteOrderMarkUnitTest.3.inc':
diff --git a/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.php b/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.php
index e7f2a75ff4..1069ccd106 100644
--- a/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.php
+++ b/src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.php
@@ -30,7 +30,7 @@ final class EndFileNewlineUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'EndFileNewlineUnitTest.3.inc':
@@ -56,7 +56,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
return [];
diff --git a/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.php b/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.php
index 237ff2fe6f..fe58aaa355 100644
--- a/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.php
+++ b/src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.php
@@ -30,7 +30,7 @@ final class EndFileNoNewlineUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'EndFileNoNewlineUnitTest.1.inc':
@@ -58,7 +58,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
return [];
diff --git a/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.php b/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.php
index 1b15736b83..421972384a 100644
--- a/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.php
+++ b/src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.php
@@ -43,7 +43,7 @@ protected function shouldSkipTest()
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ExecutableFileUnitTest.2.inc':
@@ -66,7 +66,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
return [];
diff --git a/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.php b/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.php
index cf22018547..1d153e5565 100644
--- a/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.php
+++ b/src/Standards/Generic/Tests/Files/InlineHTMLUnitTest.php
@@ -30,7 +30,7 @@ final class InlineHTMLUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'InlineHTMLUnitTest.3.inc':
@@ -59,7 +59,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
return [];
diff --git a/src/Standards/Generic/Tests/Files/LineLengthUnitTest.php b/src/Standards/Generic/Tests/Files/LineLengthUnitTest.php
index 164ae90a12..ee285995cd 100644
--- a/src/Standards/Generic/Tests/Files/LineLengthUnitTest.php
+++ b/src/Standards/Generic/Tests/Files/LineLengthUnitTest.php
@@ -46,7 +46,7 @@ public function setCliValues(string $testFile, Config $config)
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'LineLengthUnitTest.1.inc':
@@ -78,7 +78,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'LineLengthUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/Files/LowercasedFilenameUnitTest.php b/src/Standards/Generic/Tests/Files/LowercasedFilenameUnitTest.php
index 2a3e61fdf5..670c916bd7 100644
--- a/src/Standards/Generic/Tests/Files/LowercasedFilenameUnitTest.php
+++ b/src/Standards/Generic/Tests/Files/LowercasedFilenameUnitTest.php
@@ -51,7 +51,7 @@ protected function getTestFiles(string $testFileBase)
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'LowercasedFilenameUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/Formatting/SpaceAfterCastUnitTest.php b/src/Standards/Generic/Tests/Formatting/SpaceAfterCastUnitTest.php
index 8bd7f79582..2c3b02f8c4 100644
--- a/src/Standards/Generic/Tests/Formatting/SpaceAfterCastUnitTest.php
+++ b/src/Standards/Generic/Tests/Formatting/SpaceAfterCastUnitTest.php
@@ -30,7 +30,7 @@ final class SpaceAfterCastUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'SpaceAfterCastUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.php b/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.php
index 6046ad29a9..5c985ae75f 100644
--- a/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.php
+++ b/src/Standards/Generic/Tests/Formatting/SpaceAfterNotUnitTest.php
@@ -30,7 +30,7 @@ final class SpaceAfterNotUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'SpaceAfterNotUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.php b/src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.php
index 752db95c0f..ccdf95b3d8 100644
--- a/src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.php
+++ b/src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.php
@@ -30,7 +30,7 @@ final class FunctionCallArgumentSpacingUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'FunctionCallArgumentSpacingUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.php b/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.php
index 8824883b2d..73d10bbdfd 100644
--- a/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.php
+++ b/src/Standards/Generic/Tests/Functions/OpeningFunctionBraceKernighanRitchieUnitTest.php
@@ -48,7 +48,7 @@ public function setCliValues(string $testFile, Config $config)
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'OpeningFunctionBraceKernighanRitchieUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/Metrics/CyclomaticComplexityUnitTest.php b/src/Standards/Generic/Tests/Metrics/CyclomaticComplexityUnitTest.php
index 8c78037532..ff5b3c947f 100644
--- a/src/Standards/Generic/Tests/Metrics/CyclomaticComplexityUnitTest.php
+++ b/src/Standards/Generic/Tests/Metrics/CyclomaticComplexityUnitTest.php
@@ -30,7 +30,7 @@ final class CyclomaticComplexityUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'CyclomaticComplexityUnitTest.1.inc':
@@ -52,7 +52,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'CyclomaticComplexityUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.php b/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.php
index 26cf8f45a0..913b346bcf 100644
--- a/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.php
+++ b/src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.php
@@ -30,7 +30,7 @@ final class NestingLevelUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'NestingLevelUnitTest.1.inc':
@@ -52,7 +52,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'NestingLevelUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/NamingConventions/AbstractClassNamePrefixUnitTest.php b/src/Standards/Generic/Tests/NamingConventions/AbstractClassNamePrefixUnitTest.php
index 908b9bda10..a356e9691e 100644
--- a/src/Standards/Generic/Tests/NamingConventions/AbstractClassNamePrefixUnitTest.php
+++ b/src/Standards/Generic/Tests/NamingConventions/AbstractClassNamePrefixUnitTest.php
@@ -29,7 +29,7 @@ final class AbstractClassNamePrefixUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'AbstractClassNamePrefixUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/NamingConventions/CamelCapsFunctionNameUnitTest.php b/src/Standards/Generic/Tests/NamingConventions/CamelCapsFunctionNameUnitTest.php
index 4b7358e239..bdbc5a8110 100644
--- a/src/Standards/Generic/Tests/NamingConventions/CamelCapsFunctionNameUnitTest.php
+++ b/src/Standards/Generic/Tests/NamingConventions/CamelCapsFunctionNameUnitTest.php
@@ -30,7 +30,7 @@ final class CamelCapsFunctionNameUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'CamelCapsFunctionNameUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/NamingConventions/ConstructorNameUnitTest.php b/src/Standards/Generic/Tests/NamingConventions/ConstructorNameUnitTest.php
index 713c05dc14..93e849186d 100644
--- a/src/Standards/Generic/Tests/NamingConventions/ConstructorNameUnitTest.php
+++ b/src/Standards/Generic/Tests/NamingConventions/ConstructorNameUnitTest.php
@@ -30,7 +30,7 @@ final class ConstructorNameUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ConstructorNameUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/NamingConventions/InterfaceNameSuffixUnitTest.php b/src/Standards/Generic/Tests/NamingConventions/InterfaceNameSuffixUnitTest.php
index 96ca81e664..bf25bd5298 100644
--- a/src/Standards/Generic/Tests/NamingConventions/InterfaceNameSuffixUnitTest.php
+++ b/src/Standards/Generic/Tests/NamingConventions/InterfaceNameSuffixUnitTest.php
@@ -29,7 +29,7 @@ final class InterfaceNameSuffixUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'InterfaceNameSuffixUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/NamingConventions/TraitNameSuffixUnitTest.php b/src/Standards/Generic/Tests/NamingConventions/TraitNameSuffixUnitTest.php
index 2abb7f618e..0ba548732e 100644
--- a/src/Standards/Generic/Tests/NamingConventions/TraitNameSuffixUnitTest.php
+++ b/src/Standards/Generic/Tests/NamingConventions/TraitNameSuffixUnitTest.php
@@ -29,7 +29,7 @@ final class TraitNameSuffixUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'TraitNameSuffixUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.php b/src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.php
index 749b539691..ad31a5fe12 100644
--- a/src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.php
+++ b/src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.php
@@ -30,7 +30,7 @@ final class UpperCaseConstantNameUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'UpperCaseConstantNameUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/PHP/CharacterBeforePHPOpeningTagUnitTest.php b/src/Standards/Generic/Tests/PHP/CharacterBeforePHPOpeningTagUnitTest.php
index a5b3b2dd1e..9a40b4dba6 100644
--- a/src/Standards/Generic/Tests/PHP/CharacterBeforePHPOpeningTagUnitTest.php
+++ b/src/Standards/Generic/Tests/PHP/CharacterBeforePHPOpeningTagUnitTest.php
@@ -30,7 +30,7 @@ final class CharacterBeforePHPOpeningTagUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'CharacterBeforePHPOpeningTagUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/PHP/ClosingPHPTagUnitTest.php b/src/Standards/Generic/Tests/PHP/ClosingPHPTagUnitTest.php
index 69caa999ce..7581e7e933 100644
--- a/src/Standards/Generic/Tests/PHP/ClosingPHPTagUnitTest.php
+++ b/src/Standards/Generic/Tests/PHP/ClosingPHPTagUnitTest.php
@@ -30,7 +30,7 @@ final class ClosingPHPTagUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ClosingPHPTagUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.php b/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.php
index fabeeed17e..bf5d6ebbf9 100644
--- a/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.php
+++ b/src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.php
@@ -30,7 +30,7 @@ final class DisallowAlternativePHPTagsUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'DisallowAlternativePHPTagsUnitTest.1.inc':
@@ -58,7 +58,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
if ($testFile === 'DisallowAlternativePHPTagsUnitTest.2.inc') {
// Check if the Internal.NoCodeFound error can be expected on line 1.
diff --git a/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.php b/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.php
index ddfd82d26f..00d815fa4b 100644
--- a/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.php
+++ b/src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.php
@@ -54,7 +54,7 @@ protected function getTestFiles(string $testFileBase)
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'DisallowShortOpenTagUnitTest.1.inc':
@@ -88,7 +88,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'DisallowShortOpenTagUnitTest.3.inc':
diff --git a/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.php b/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.php
index ddff683f71..4f8b15f1cf 100644
--- a/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.php
+++ b/src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.php
@@ -30,7 +30,7 @@ final class LowerCaseConstantUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'LowerCaseConstantUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.php b/src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.php
index 19ba2c4eec..eee067d3a0 100644
--- a/src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.php
+++ b/src/Standards/Generic/Tests/PHP/LowerCaseTypeUnitTest.php
@@ -30,7 +30,7 @@ final class LowerCaseTypeUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'LowerCaseTypeUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.php b/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.php
index d9fc18e2c4..67bfbcb7f0 100644
--- a/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.php
+++ b/src/Standards/Generic/Tests/PHP/RequireStrictTypesUnitTest.php
@@ -30,7 +30,7 @@ final class RequireStrictTypesUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'RequireStrictTypesUnitTest.2.inc':
@@ -53,7 +53,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'RequireStrictTypesUnitTest.11.inc':
diff --git a/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.php b/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.php
index 6e0ebcb10a..6d314be51a 100644
--- a/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.php
+++ b/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.php
@@ -34,7 +34,7 @@ final class SyntaxUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'SyntaxUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/Strings/UnnecessaryHeredocUnitTest.php b/src/Standards/Generic/Tests/Strings/UnnecessaryHeredocUnitTest.php
index 84b70ef2bf..da26368471 100644
--- a/src/Standards/Generic/Tests/Strings/UnnecessaryHeredocUnitTest.php
+++ b/src/Standards/Generic/Tests/Strings/UnnecessaryHeredocUnitTest.php
@@ -45,7 +45,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
$warnings = [
100 => 1,
diff --git a/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php b/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php
index 8075a0efe8..185c081b56 100644
--- a/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php
+++ b/src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php
@@ -30,7 +30,7 @@ final class UnnecessaryStringConcatUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'UnnecessaryStringConcatUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.php b/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.php
index 2b3d4db31b..6ec7049b92 100644
--- a/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.php
+++ b/src/Standards/Generic/Tests/VersionControl/GitMergeConflictUnitTest.php
@@ -30,7 +30,7 @@ final class GitMergeConflictUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'GitMergeConflictUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.php b/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.php
index b14758a0fe..d0a8d40096 100644
--- a/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.php
+++ b/src/Standards/Generic/Tests/WhiteSpace/ArbitraryParenthesesSpacingUnitTest.php
@@ -30,7 +30,7 @@ final class ArbitraryParenthesesSpacingUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ArbitraryParenthesesSpacingUnitTest.1.inc':
@@ -87,7 +87,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'ArbitraryParenthesesSpacingUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.php b/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.php
index 581fe82574..ba6c1a78c4 100644
--- a/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.php
+++ b/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.php
@@ -50,7 +50,7 @@ public function setCliValues(string $testFile, Config $config)
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'DisallowSpaceIndentUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.php b/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.php
index 32043c606b..4f628f7d88 100644
--- a/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.php
+++ b/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.php
@@ -46,7 +46,7 @@ public function setCliValues(string $testFile, Config $config)
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'DisallowTabIndentUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.php b/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.php
index 14d1f4c9bd..ac1c38647f 100644
--- a/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.php
+++ b/src/Standards/Generic/Tests/WhiteSpace/LanguageConstructSpacingUnitTest.php
@@ -30,7 +30,7 @@ final class LanguageConstructSpacingUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'LanguageConstructSpacingUnitTest.1.inc':
diff --git a/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.php b/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.php
index f454c66060..51fd0576e5 100644
--- a/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.php
+++ b/src/Standards/Generic/Tests/WhiteSpace/ScopeIndentUnitTest.php
@@ -53,7 +53,7 @@ public function setCliValues(string $testFile, Config $config)
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
if ($testFile === 'ScopeIndentUnitTest.3.inc') {
return [
diff --git a/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.php b/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.php
index dc0b219607..6bc5a24f83 100644
--- a/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.php
+++ b/src/Standards/Generic/Tests/WhiteSpace/SpreadOperatorSpacingAfterUnitTest.php
@@ -30,7 +30,7 @@ final class SpreadOperatorSpacingAfterUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'SpreadOperatorSpacingAfterUnitTest.1.inc':
diff --git a/src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php b/src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php
index 1d6e5a7798..598180b31c 100644
--- a/src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php
+++ b/src/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php
@@ -371,7 +371,7 @@ public function processMultiLineDeclaration(File $phpcsFile, int $stackPtr, arra
*
* @return void
*/
- public function processArgumentList(File $phpcsFile, int $stackPtr, int $indent, string $type='function')
+ public function processArgumentList(File $phpcsFile, int $stackPtr, int $indent, string $type = 'function')
{
$tokens = $phpcsFile->getTokens();
diff --git a/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.php b/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.php
index 30105bcf9a..752ba931dd 100644
--- a/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.php
+++ b/src/Standards/PEAR/Tests/Classes/ClassDeclarationUnitTest.php
@@ -50,7 +50,7 @@ public function setCliValues(string $testFile, Config $config)
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ClassDeclarationUnitTest.1.inc':
@@ -87,7 +87,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
return[];
diff --git a/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.php b/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.php
index ac0384f14e..d7074da6e8 100644
--- a/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.php
+++ b/src/Standards/PEAR/Tests/Commenting/ClassCommentUnitTest.php
@@ -30,7 +30,7 @@ final class ClassCommentUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ClassCommentUnitTest.1.inc':
@@ -80,7 +80,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'ClassCommentUnitTest.1.inc':
diff --git a/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.php b/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.php
index c43eeb32b3..ef528eaf0c 100644
--- a/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.php
+++ b/src/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.php
@@ -30,7 +30,7 @@ final class FileCommentUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'FileCommentUnitTest.1.inc':
@@ -74,7 +74,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'FileCommentUnitTest.1.inc':
diff --git a/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.php b/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.php
index 1c61142976..5768399e19 100644
--- a/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.php
+++ b/src/Standards/PEAR/Tests/Commenting/FunctionCommentUnitTest.php
@@ -30,7 +30,7 @@ final class FunctionCommentUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'FunctionCommentUnitTest.1.inc':
diff --git a/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.php b/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.php
index d3a3a2e26c..f1a0918488 100644
--- a/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.php
+++ b/src/Standards/PEAR/Tests/Functions/FunctionDeclarationUnitTest.php
@@ -30,7 +30,7 @@ final class FunctionDeclarationUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'FunctionDeclarationUnitTest.1.inc':
diff --git a/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.php b/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.php
index ab2d5f5eb1..ecfe37e850 100644
--- a/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.php
+++ b/src/Standards/PEAR/Tests/Functions/ValidDefaultValueUnitTest.php
@@ -30,7 +30,7 @@ final class ValidDefaultValueUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ValidDefaultValueUnitTest.1.inc':
diff --git a/src/Standards/PEAR/Tests/NamingConventions/ValidFunctionNameUnitTest.php b/src/Standards/PEAR/Tests/NamingConventions/ValidFunctionNameUnitTest.php
index 0b6938e413..67aa58b01b 100644
--- a/src/Standards/PEAR/Tests/NamingConventions/ValidFunctionNameUnitTest.php
+++ b/src/Standards/PEAR/Tests/NamingConventions/ValidFunctionNameUnitTest.php
@@ -30,7 +30,7 @@ final class ValidFunctionNameUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ValidFunctionNameUnitTest.1.inc':
diff --git a/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.php b/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.php
index 33144cb148..05c45b3d7f 100644
--- a/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.php
+++ b/src/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.php
@@ -30,7 +30,7 @@ final class ValidVariableNameUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ValidVariableNameUnitTest.1.inc':
diff --git a/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.php b/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.php
index e368be817d..0e23ce32ff 100644
--- a/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.php
+++ b/src/Standards/PSR1/Tests/Classes/ClassDeclarationUnitTest.php
@@ -30,7 +30,7 @@ final class ClassDeclarationUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
if ($testFile === 'ClassDeclarationUnitTest.2.inc') {
return [];
diff --git a/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.php b/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.php
index 0fb4887baa..f927a4387c 100644
--- a/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.php
+++ b/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.php
@@ -48,7 +48,7 @@ public function setCliValues(string $testFile, Config $config)
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
return [];
@@ -65,7 +65,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'SideEffectsUnitTest.3.inc':
diff --git a/src/Standards/PSR1/Tests/Methods/CamelCapsMethodNameUnitTest.php b/src/Standards/PSR1/Tests/Methods/CamelCapsMethodNameUnitTest.php
index 3337b95c27..c8e6d30cf8 100644
--- a/src/Standards/PSR1/Tests/Methods/CamelCapsMethodNameUnitTest.php
+++ b/src/Standards/PSR1/Tests/Methods/CamelCapsMethodNameUnitTest.php
@@ -30,7 +30,7 @@ final class CamelCapsMethodNameUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'CamelCapsMethodNameUnitTest.1.inc':
diff --git a/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.php b/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.php
index 6aeed97ab6..1ca9aa3870 100644
--- a/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.php
+++ b/src/Standards/PSR12/Tests/Files/DeclareStatementUnitTest.php
@@ -30,7 +30,7 @@ final class DeclareStatementUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'DeclareStatementUnitTest.1.inc':
diff --git a/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.php b/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.php
index 82356bcfdc..457c76b3da 100644
--- a/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.php
+++ b/src/Standards/PSR12/Tests/Files/FileHeaderUnitTest.php
@@ -30,7 +30,7 @@ final class FileHeaderUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'FileHeaderUnitTest.2.inc':
diff --git a/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.php b/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.php
index c9d8b4dc63..6cfa014e56 100644
--- a/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.php
+++ b/src/Standards/PSR12/Tests/Files/OpenTagUnitTest.php
@@ -30,7 +30,7 @@ final class OpenTagUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'OpenTagUnitTest.2.inc':
diff --git a/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.php b/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.php
index c345538df0..cd76b02f6b 100644
--- a/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.php
+++ b/src/Standards/PSR12/Tests/Operators/OperatorSpacingUnitTest.php
@@ -30,7 +30,7 @@ final class OperatorSpacingUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'OperatorSpacingUnitTest.1.inc':
diff --git a/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.php b/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.php
index 694c099c5a..ab869ba856 100644
--- a/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.php
+++ b/src/Standards/PSR12/Tests/Properties/ConstantVisibilityUnitTest.php
@@ -45,7 +45,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'ConstantVisibilityUnitTest.1.inc':
diff --git a/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.php b/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.php
index 820c3d46b1..af73d7cb75 100644
--- a/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.php
+++ b/src/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.php
@@ -30,7 +30,7 @@ final class PropertyDeclarationUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'PropertyDeclarationUnitTest.1.inc':
@@ -103,7 +103,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'PropertyDeclarationUnitTest.1.inc':
diff --git a/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.php b/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.php
index 26b8f9fe2c..50665c40b4 100644
--- a/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.php
+++ b/src/Standards/PSR2/Tests/Files/ClosingTagUnitTest.php
@@ -30,7 +30,7 @@ final class ClosingTagUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ClosingTagUnitTest.1.inc':
diff --git a/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.php b/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.php
index d631c1e490..0dbda0d8e8 100644
--- a/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.php
+++ b/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.php
@@ -30,7 +30,7 @@ final class EndFileNewlineUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'EndFileNewlineUnitTest.1.inc':
@@ -61,7 +61,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
return [];
diff --git a/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.php b/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.php
index 8e8eef3ef3..50c531ce22 100644
--- a/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.php
+++ b/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.php
@@ -30,7 +30,7 @@ final class MethodDeclarationUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'MethodDeclarationUnitTest.1.inc':
@@ -69,7 +69,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'MethodDeclarationUnitTest.1.inc':
diff --git a/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.php b/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.php
index 6602ebb9ef..2c98e0f114 100644
--- a/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.php
+++ b/src/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.php
@@ -30,7 +30,7 @@ final class UseDeclarationUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'UseDeclarationUnitTest.2.inc':
diff --git a/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php b/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php
index 2f4fcc8aa4..098de9f579 100644
--- a/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php
+++ b/src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php
@@ -653,7 +653,7 @@ protected function processParams(File $phpcsFile, int $stackPtr, int $commentSta
*
* @return void
*/
- protected function checkSpacingAfterParamType(File $phpcsFile, array $param, int $maxType, int $spacing=1)
+ protected function checkSpacingAfterParamType(File $phpcsFile, array $param, int $maxType, int $spacing = 1)
{
// Check number of spaces after the type.
$spaces = ($maxType - strlen($param['type']) + $spacing);
@@ -712,7 +712,7 @@ protected function checkSpacingAfterParamType(File $phpcsFile, array $param, int
*
* @return void
*/
- protected function checkSpacingAfterParamName(File $phpcsFile, array $param, int $maxVar, int $spacing=1)
+ protected function checkSpacingAfterParamName(File $phpcsFile, array $param, int $maxVar, int $spacing = 1)
{
// Check number of spaces after the var name.
$spaces = ($maxVar - strlen($param['var']) + $spacing);
diff --git a/src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php b/src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php
index 0c0afa9868..5551d86df7 100644
--- a/src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php
+++ b/src/Standards/Squiz/Sniffs/Functions/MultiLineFunctionDeclarationSniff.php
@@ -175,7 +175,7 @@ public function processMultiLineDeclaration(File $phpcsFile, int $stackPtr, arra
*
* @return void
*/
- public function processBracket(File $phpcsFile, int $openBracket, array $tokens, string $type='function')
+ public function processBracket(File $phpcsFile, int $openBracket, array $tokens, string $type = 'function')
{
$errorPrefix = '';
if ($type === 'use') {
diff --git a/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.php b/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.php
index 44b0b1ef0c..bcbcd1a5c7 100644
--- a/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.php
+++ b/src/Standards/Squiz/Tests/Arrays/ArrayDeclarationUnitTest.php
@@ -30,7 +30,7 @@ final class ArrayDeclarationUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ArrayDeclarationUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.php b/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.php
index 15e63206ff..7d15f9b512 100644
--- a/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.php
+++ b/src/Standards/Squiz/Tests/Classes/ClassFileNameUnitTest.php
@@ -71,7 +71,7 @@ protected function getTestFiles(string $testFileBase)
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ClassFileNameUnitTest.inc':
diff --git a/src/Standards/Squiz/Tests/Commenting/ClassCommentUnitTest.php b/src/Standards/Squiz/Tests/Commenting/ClassCommentUnitTest.php
index f05f72c9cb..11dbeb82d4 100644
--- a/src/Standards/Squiz/Tests/Commenting/ClassCommentUnitTest.php
+++ b/src/Standards/Squiz/Tests/Commenting/ClassCommentUnitTest.php
@@ -30,7 +30,7 @@ final class ClassCommentUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ClassCommentUnitTest.1.inc':
@@ -65,7 +65,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'ClassCommentUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.php b/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.php
index 818a5b873f..30c30a5456 100644
--- a/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.php
+++ b/src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.php
@@ -30,7 +30,7 @@ final class ClosingDeclarationCommentUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ClosingDeclarationCommentUnitTest.1.inc':
@@ -76,7 +76,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
return [];
diff --git a/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.php b/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.php
index 43905bd669..937a504812 100644
--- a/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.php
+++ b/src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.php
@@ -30,7 +30,7 @@ final class FileCommentUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'FileCommentUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.php b/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.php
index 4a45b4dba6..53c53a715f 100644
--- a/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.php
+++ b/src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.php
@@ -30,7 +30,7 @@ final class FunctionCommentUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'FunctionCommentUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.php b/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.php
index 683c7714c7..86e8d86f59 100644
--- a/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.php
+++ b/src/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.php
@@ -30,7 +30,7 @@ final class ControlSignatureUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
diff --git a/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php b/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php
index 8ea3b71a72..f9c663555e 100644
--- a/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php
+++ b/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php
@@ -30,7 +30,7 @@ final class ForLoopDeclarationUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ForLoopDeclarationUnitTest.1.inc':
@@ -84,7 +84,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
return [];
diff --git a/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.php b/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.php
index c5bae080ed..02f6aecb42 100644
--- a/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.php
+++ b/src/Standards/Squiz/Tests/Files/FileExtensionUnitTest.php
@@ -30,7 +30,7 @@ final class FileExtensionUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'FileExtensionUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.php b/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.php
index 7cb2a100ba..6c6d139a11 100644
--- a/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.php
+++ b/src/Standards/Squiz/Tests/Formatting/OperatorBracketUnitTest.php
@@ -30,7 +30,7 @@ final class OperatorBracketUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'OperatorBracketUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.php b/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.php
index b179ef1a5b..29f6ad2d61 100644
--- a/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.php
+++ b/src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.php
@@ -30,7 +30,7 @@ final class FunctionDeclarationArgumentSpacingUnitTest extends AbstractSniffTest
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'FunctionDeclarationArgumentSpacingUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.php b/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.php
index 198815d6f5..30d3105cd6 100644
--- a/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.php
+++ b/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.php
@@ -30,7 +30,7 @@ final class FunctionDeclarationUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'FunctionDeclarationUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.php b/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.php
index b4997e0548..f5a664592b 100644
--- a/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.php
+++ b/src/Standards/Squiz/Tests/Functions/GlobalFunctionUnitTest.php
@@ -45,7 +45,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'GlobalFunctionUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.php b/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.php
index 09d669e88f..377454dd7a 100644
--- a/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.php
+++ b/src/Standards/Squiz/Tests/NamingConventions/ValidFunctionNameUnitTest.php
@@ -30,7 +30,7 @@ final class ValidFunctionNameUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ValidFunctionNameUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.php b/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.php
index 3cda4075d2..42ead313f6 100644
--- a/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.php
+++ b/src/Standards/Squiz/Tests/NamingConventions/ValidVariableNameUnitTest.php
@@ -30,7 +30,7 @@ final class ValidVariableNameUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ValidVariableNameUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.php b/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.php
index d4175295b0..788766651e 100644
--- a/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.php
+++ b/src/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.php
@@ -30,7 +30,7 @@ final class DisallowMultipleAssignmentsUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'DisallowMultipleAssignmentsUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.php b/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.php
index 04fd767068..96d098b2d8 100644
--- a/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.php
+++ b/src/Standards/Squiz/Tests/PHP/EmbeddedPhpUnitTest.php
@@ -30,7 +30,7 @@ final class EmbeddedPhpUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'EmbeddedPhpUnitTest.1.inc':
@@ -233,7 +233,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
if ($testFile === 'EmbeddedPhpUnitTest.24.inc'
&& (bool) ini_get('short_open_tag') === false
diff --git a/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.php b/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.php
index f11260f263..d58922be81 100644
--- a/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.php
+++ b/src/Standards/Squiz/Tests/PHP/HeredocUnitTest.php
@@ -30,7 +30,7 @@ final class HeredocUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'HeredocUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.php b/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.php
index 9aa7381645..ba173b4817 100644
--- a/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.php
+++ b/src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.php
@@ -45,7 +45,7 @@ public function getErrorList()
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'NonExecutableCodeUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.php b/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.php
index 6a84a125c8..79b7e1b077 100644
--- a/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.php
+++ b/src/Standards/Squiz/Tests/Scope/MemberVarScopeUnitTest.php
@@ -30,7 +30,7 @@ final class MemberVarScopeUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'MemberVarScopeUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/Scope/MethodScopeUnitTest.php b/src/Standards/Squiz/Tests/Scope/MethodScopeUnitTest.php
index b7ec7b7be1..c56db7015b 100644
--- a/src/Standards/Squiz/Tests/Scope/MethodScopeUnitTest.php
+++ b/src/Standards/Squiz/Tests/Scope/MethodScopeUnitTest.php
@@ -30,7 +30,7 @@ final class MethodScopeUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'MethodScopeUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.php b/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.php
index dd3287918a..38cc453200 100644
--- a/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.php
+++ b/src/Standards/Squiz/Tests/WhiteSpace/FunctionSpacingUnitTest.php
@@ -30,7 +30,7 @@ final class FunctionSpacingUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'FunctionSpacingUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.php b/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.php
index 07564a0a0e..64ce562c8c 100644
--- a/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.php
+++ b/src/Standards/Squiz/Tests/WhiteSpace/MemberVarSpacingUnitTest.php
@@ -30,7 +30,7 @@ final class MemberVarSpacingUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'MemberVarSpacingUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.php b/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.php
index 21f693b40e..2114bf68ab 100644
--- a/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.php
+++ b/src/Standards/Squiz/Tests/WhiteSpace/OperatorSpacingUnitTest.php
@@ -30,7 +30,7 @@ final class OperatorSpacingUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'OperatorSpacingUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.php b/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.php
index 8b9269ba71..b5218de5ad 100644
--- a/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.php
+++ b/src/Standards/Squiz/Tests/WhiteSpace/ScopeKeywordSpacingUnitTest.php
@@ -30,7 +30,7 @@ final class ScopeKeywordSpacingUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ScopeKeywordSpacingUnitTest.1.inc':
diff --git a/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.php b/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.php
index c647b3f639..78bcb676c5 100644
--- a/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.php
+++ b/src/Standards/Squiz/Tests/WhiteSpace/SuperfluousWhitespaceUnitTest.php
@@ -30,7 +30,7 @@ final class SuperfluousWhitespaceUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'SuperfluousWhitespaceUnitTest.1.inc':
diff --git a/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.php b/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.php
index 7e5204dc1e..4d7a32d982 100644
--- a/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.php
+++ b/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.php
@@ -30,7 +30,7 @@ final class ClosingTagUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ClosingTagUnitTest.1.inc':
diff --git a/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php b/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php
index 02eb07541d..bc314eede3 100644
--- a/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php
+++ b/src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php
@@ -30,7 +30,7 @@ final class ValidVariableNameUnitTest extends AbstractSniffTestCase
*
* @return array
*/
- public function getErrorList($testFile='')
+ public function getErrorList($testFile = '')
{
switch ($testFile) {
case 'ValidVariableNameUnitTest.1.inc':
@@ -90,7 +90,7 @@ public function getErrorList($testFile='')
*
* @return array
*/
- public function getWarningList($testFile='')
+ public function getWarningList($testFile = '')
{
switch ($testFile) {
case 'ValidVariableNameUnitTest.1.inc':
diff --git a/src/Tokenizers/Tokenizer.php b/src/Tokenizers/Tokenizer.php
index 2dcda2a870..a2e940a335 100644
--- a/src/Tokenizers/Tokenizer.php
+++ b/src/Tokenizers/Tokenizer.php
@@ -109,7 +109,7 @@ abstract class Tokenizer
* @return void
* @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the file appears to be minified.
*/
- public function __construct(string $content, ?Config $config, string $eolChar='\n')
+ public function __construct(string $content, ?Config $config, string $eolChar = '\n')
{
$this->eolChar = $eolChar;
@@ -140,7 +140,7 @@ public function __construct(string $content, ?Config $config, string $eolChar='\
*
* @return boolean
*/
- protected function isMinifiedContent(string $content, string $eolChar='\n')
+ protected function isMinifiedContent(string $content, string $eolChar = '\n')
{
// Minified files often have a very large number of characters per line
// and cause issues when tokenizing.
@@ -501,7 +501,7 @@ private function createPositionMap()
*
* @return void
*/
- public function replaceTabsInToken(array &$token, string $prefix=' ', string $padding=' ', ?int $tabWidth=null)
+ public function replaceTabsInToken(array &$token, string $prefix = ' ', string $padding = ' ', ?int $tabWidth = null)
{
$checkEncoding = false;
if (function_exists('iconv_strlen') === true) {
@@ -841,7 +841,7 @@ private function createScopeMap()
* @return int The position in the stack that closed the scope.
* @throws \PHP_CodeSniffer\Exceptions\TokenizerException If the nesting level gets too deep.
*/
- private function recurseScopeMap(int $stackPtr, int $depth=1, int &$ignore=0)
+ private function recurseScopeMap(int $stackPtr, int $depth = 1, int &$ignore = 0)
{
if (PHP_CODESNIFFER_VERBOSITY > 1) {
StatusWriter::write("=> Begin scope map recursion at token $stackPtr with depth $depth", $depth);
diff --git a/src/Util/Cache.php b/src/Util/Cache.php
index d1429c45b4..deafa444e8 100644
--- a/src/Util/Cache.php
+++ b/src/Util/Cache.php
@@ -307,7 +307,7 @@ public static function save()
*
* @return mixed
*/
- public static function get(?string $key=null)
+ public static function get(?string $key = null)
{
if ($key === null) {
return self::$cache;
diff --git a/src/Util/Common.php b/src/Util/Common.php
index 753b0189f9..96b45151bf 100644
--- a/src/Util/Common.php
+++ b/src/Util/Common.php
@@ -285,7 +285,7 @@ public static function escapeshellcmd(string $cmd)
*
* @return string
*/
- public static function prepareForOutput(string $content, array $exclude=[])
+ public static function prepareForOutput(string $content, array $exclude = [])
{
if (PHP_OS_FAMILY === 'Windows') {
if (in_array("\r", $exclude, true) === false) {
@@ -358,9 +358,9 @@ public static function stripColors(string $text)
*/
public static function isCamelCaps(
string $name,
- bool $classFormat=false,
- bool $visibilityPublic=true,
- bool $strict=true
+ bool $classFormat = false,
+ bool $visibilityPublic = true,
+ bool $strict = true
) {
// Check the first character first.
if ($classFormat === false) {
diff --git a/src/Util/Help.php b/src/Util/Help.php
index fd4adcb208..96b8ca3181 100644
--- a/src/Util/Help.php
+++ b/src/Util/Help.php
@@ -137,7 +137,7 @@ final class Help
* @param array $longOptions The long options which should be shown.
* @param string $shortOptions The short options which should be shown.
*/
- public function __construct(Config $config, array $longOptions, string $shortOptions='')
+ public function __construct(Config $config, array $longOptions, string $shortOptions = '')
{
$this->config = $config;
$this->requestedOptions = array_merge($longOptions, str_split($shortOptions));
diff --git a/src/Util/MessageCollector.php b/src/Util/MessageCollector.php
index 99984d863d..b5200595c0 100644
--- a/src/Util/MessageCollector.php
+++ b/src/Util/MessageCollector.php
@@ -96,7 +96,7 @@ final class MessageCollector
* @throws \InvalidArgumentException If the message text is not a string.
* @throws \InvalidArgumentException If the message type is not one of the accepted types.
*/
- public function add($message, $type=self::NOTICE)
+ public function add($message, $type = self::NOTICE)
{
if (is_string($message) === false) {
throw new InvalidArgumentException('The $message should be of type string. Received: '.gettype($message).'.');
@@ -146,7 +146,7 @@ public function containsBlockingErrors()
*
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException When there are blocking errors.
*/
- public function display(string $order=self::ORDERBY_SEVERITY)
+ public function display(string $order = self::ORDERBY_SEVERITY)
{
if ($this->cache === []) {
return;
diff --git a/src/Util/Standards.php b/src/Util/Standards.php
index ce1d7104de..1b4a339292 100644
--- a/src/Util/Standards.php
+++ b/src/Util/Standards.php
@@ -77,8 +77,8 @@ public static function getInstalledStandardPaths()
* @see getInstalledStandardPaths()
*/
public static function getInstalledStandardDetails(
- bool $includeGeneric=false,
- string $standardsDir=''
+ bool $includeGeneric = false,
+ string $standardsDir = ''
) {
$rulesets = [];
@@ -166,8 +166,8 @@ public static function getInstalledStandardDetails(
* @see isInstalledStandard()
*/
public static function getInstalledStandards(
- bool $includeGeneric=false,
- string $standardsDir=''
+ bool $includeGeneric = false,
+ string $standardsDir = ''
) {
$installedStandards = [];
diff --git a/src/Util/Timing.php b/src/Util/Timing.php
index 11d57f48a9..3ca696a129 100644
--- a/src/Util/Timing.php
+++ b/src/Util/Timing.php
@@ -132,7 +132,7 @@ public static function getHumanReadableDuration(float $duration)
*
* @return void
*/
- public static function printRunTime(bool $force=false)
+ public static function printRunTime(bool $force = false)
{
if ($force === false && self::$printed === true) {
// A double call.
diff --git a/src/Util/Writers/StatusWriter.php b/src/Util/Writers/StatusWriter.php
index e147a0c7b0..c7be4d6417 100644
--- a/src/Util/Writers/StatusWriter.php
+++ b/src/Util/Writers/StatusWriter.php
@@ -60,7 +60,7 @@ final class StatusWriter
*
* @return void
*/
- public static function write(string $message, int $indent=0, int $newlines=1)
+ public static function write(string $message, int $indent = 0, int $newlines = 1)
{
if (self::$paused === true) {
return;
@@ -83,7 +83,7 @@ public static function write(string $message, int $indent=0, int $newlines=1)
*
* @return void
*/
- public static function forceWrite(string $message, int $indent=0, int $newlines=1)
+ public static function forceWrite(string $message, int $indent = 0, int $newlines = 1)
{
if ($indent > 0) {
$message = str_repeat("\t", $indent).$message;
@@ -106,7 +106,7 @@ public static function forceWrite(string $message, int $indent=0, int $newlines=
*
* @return void
*/
- public static function writeNewline(int $nr=1)
+ public static function writeNewline(int $nr = 1)
{
self::write('', 0, $nr);
@@ -121,7 +121,7 @@ public static function writeNewline(int $nr=1)
*
* @return void
*/
- public static function forceWriteNewline(int $nr=1)
+ public static function forceWriteNewline(int $nr = 1)
{
self::forceWrite('', 0, $nr);
diff --git a/tests/ConfigDouble.php b/tests/ConfigDouble.php
index 886a814f32..42e14c75a5 100644
--- a/tests/ConfigDouble.php
+++ b/tests/ConfigDouble.php
@@ -56,7 +56,7 @@ final class ConfigDouble extends Config
*
* @return void
*/
- public function __construct(array $cliArgs=[], bool $skipSettingStandard=false, bool $skipSettingReportWidth=false)
+ public function __construct(array $cliArgs = [], bool $skipSettingStandard = false, bool $skipSettingReportWidth = false)
{
$this->skipSettingStandard = $skipSettingStandard;
diff --git a/tests/Core/AbstractMethodTestCase.php b/tests/Core/AbstractMethodTestCase.php
index e4a1d05258..0927edc9c6 100644
--- a/tests/Core/AbstractMethodTestCase.php
+++ b/tests/Core/AbstractMethodTestCase.php
@@ -149,7 +149,7 @@ public static function assertTestMarkersAreUnique(File $phpcsFile)
*
* @return int
*/
- public function getTargetToken($commentString, $tokenType, $tokenContent=null)
+ public function getTargetToken($commentString, $tokenType, $tokenContent = null)
{
return self::getTargetTokenFromFile(self::$phpcsFile, $commentString, $tokenType, $tokenContent);
@@ -172,7 +172,7 @@ public function getTargetToken($commentString, $tokenType, $tokenContent=null)
* @throws \Exception When the test delimiter comment is not found.
* @throws \Exception When the test target token is not found.
*/
- public static function getTargetTokenFromFile(File $phpcsFile, $commentString, $tokenType, $tokenContent=null)
+ public static function getTargetTokenFromFile(File $phpcsFile, $commentString, $tokenType, $tokenContent = null)
{
$start = ($phpcsFile->numTokens - 1);
$comment = $phpcsFile->findPrevious(
diff --git a/tests/Core/Config/IniSetTest.php b/tests/Core/Config/IniSetTest.php
index 9a82908bee..7d06d32b7d 100644
--- a/tests/Core/Config/IniSetTest.php
+++ b/tests/Core/Config/IniSetTest.php
@@ -272,7 +272,7 @@ public function testIniValueIsSilentlyIgnoredForUnknownIniName()
*
* @return void
*/
- public function testIniValueCannotBeUpdatedAtRuntime($option, $newValue, $alternativeValue='')
+ public function testIniValueCannotBeUpdatedAtRuntime($option, $newValue, $alternativeValue = '')
{
$this->expectException(DeepExitException::class);
$this->expectExceptionMessage("ERROR: Ini option \"$option\" cannot be changed at runtime.");
diff --git a/tests/Core/ErrorSuppressionTest.php b/tests/Core/ErrorSuppressionTest.php
index 793574b83a..3c07aeccf0 100644
--- a/tests/Core/ErrorSuppressionTest.php
+++ b/tests/Core/ErrorSuppressionTest.php
@@ -36,7 +36,7 @@ final class ErrorSuppressionTest extends TestCase
*
* @return void
*/
- public function testSuppressError($before, $after, $expectedErrors=0)
+ public function testSuppressError($before, $after, $expectedErrors = 0)
{
static $config, $ruleset;
@@ -150,7 +150,7 @@ public static function dataSuppressError()
*
* @return void
*/
- public function testSuppressSomeErrors($before, $between, $expectedErrors=1)
+ public function testSuppressSomeErrors($before, $between, $expectedErrors = 1)
{
static $config, $ruleset;
@@ -232,7 +232,7 @@ public static function dataSuppressSomeErrors()
*
* @return void
*/
- public function testSuppressWarning($before, $after, $expectedWarnings=0)
+ public function testSuppressWarning($before, $after, $expectedWarnings = 0)
{
static $config, $ruleset;
@@ -306,7 +306,7 @@ public static function dataSuppressWarning()
*
* @return void
*/
- public function testSuppressLine($before, $after='', $expectedErrors=1)
+ public function testSuppressLine($before, $after = '', $expectedErrors = 1)
{
static $config, $ruleset;
@@ -538,7 +538,7 @@ public static function dataNestedSuppressLine()
*
* @return void
*/
- public function testSuppressScope($before, $after, $expectedErrors=0)
+ public function testSuppressScope($before, $after, $expectedErrors = 0)
{
static $config, $ruleset;
@@ -624,7 +624,7 @@ public static function dataSuppressScope()
*
* @return void
*/
- public function testSuppressFile($before, $after='', $expectedWarnings=0)
+ public function testSuppressFile($before, $after = '', $expectedWarnings = 0)
{
static $config, $ruleset;
@@ -718,7 +718,7 @@ public static function dataSuppressFile()
*
* @return void
*/
- public function testDisableSelected($before, $expectedErrors=0, $expectedWarnings=0)
+ public function testDisableSelected($before, $expectedErrors = 0, $expectedWarnings = 0)
{
static $config, $ruleset;
diff --git a/tests/Core/Files/File/GetDeclarationNameTest.php b/tests/Core/Files/File/GetDeclarationNameTest.php
index ecd732d1cb..0baf8f8b89 100644
--- a/tests/Core/Files/File/GetDeclarationNameTest.php
+++ b/tests/Core/Files/File/GetDeclarationNameTest.php
@@ -92,7 +92,7 @@ public static function dataInvalidTokenPassed()
*
* @return void
*/
- public function testGetDeclarationName($testMarker, $expected, $targetType=null)
+ public function testGetDeclarationName($testMarker, $expected, $targetType = null)
{
if (isset($targetType) === false) {
$targetType = [
diff --git a/tests/Core/Files/File/GetMethodParametersTest.php b/tests/Core/Files/File/GetMethodParametersTest.php
index fb3eca9414..d45fac6409 100644
--- a/tests/Core/Files/File/GetMethodParametersTest.php
+++ b/tests/Core/Files/File/GetMethodParametersTest.php
@@ -123,7 +123,7 @@ public static function dataInvalidUse()
*
* @return void
*/
- public function testNoParams($commentString, $targetTokenType=[T_FUNCTION, T_CLOSURE, T_FN])
+ public function testNoParams($commentString, $targetTokenType = [T_FUNCTION, T_CLOSURE, T_FN])
{
$target = $this->getTargetToken($commentString, $targetTokenType);
$result = self::$phpcsFile->getMethodParameters($target);
@@ -3289,7 +3289,7 @@ public function testClosureUseWithTrailingComma()
*
* @return void
*/
- private function getMethodParametersTestHelper($commentString, $expected, $targetType=[T_FUNCTION, T_CLOSURE, T_FN])
+ private function getMethodParametersTestHelper($commentString, $expected, $targetType = [T_FUNCTION, T_CLOSURE, T_FN])
{
$target = $this->getTargetToken($commentString, $targetType);
$found = self::$phpcsFile->getMethodParameters($target);
diff --git a/tests/Core/Files/FileList/AddFileTest.php b/tests/Core/Files/FileList/AddFileTest.php
index e46091003b..ac4d78d7f4 100644
--- a/tests/Core/Files/FileList/AddFileTest.php
+++ b/tests/Core/Files/FileList/AddFileTest.php
@@ -50,7 +50,7 @@ protected function setUp(): void
*
* @return void
*/
- public function testAddFile($fileName, $fileObject=null)
+ public function testAddFile($fileName, $fileObject = null)
{
$this->assertCount(0, $this->fileList);
diff --git a/tests/Core/Filters/AbstractFilterTestCase.php b/tests/Core/Filters/AbstractFilterTestCase.php
index 1c656cc23f..dd586ae851 100644
--- a/tests/Core/Filters/AbstractFilterTestCase.php
+++ b/tests/Core/Filters/AbstractFilterTestCase.php
@@ -85,7 +85,7 @@ public static function tearDownAfterClass(): void
*
* @return \PHPUnit\Framework\MockObject\MockObject
*/
- protected function getMockedClass($className, array $constructorArgs=[], $methodsToMock=null)
+ protected function getMockedClass($className, array $constructorArgs = [], $methodsToMock = null)
{
$mockedObj = $this->getMockBuilder($className);
diff --git a/tests/Core/Ruleset/AbstractRulesetTestCase.php b/tests/Core/Ruleset/AbstractRulesetTestCase.php
index 247d49784e..0c5ffc5fe4 100644
--- a/tests/Core/Ruleset/AbstractRulesetTestCase.php
+++ b/tests/Core/Ruleset/AbstractRulesetTestCase.php
@@ -25,7 +25,7 @@ abstract class AbstractRulesetTestCase extends TestCase
*
* @return void
*/
- protected function assertXObjectHasProperty($propertyName, $object, $message='')
+ protected function assertXObjectHasProperty($propertyName, $object, $message = '')
{
if (method_exists($this, 'assertObjectHasProperty') === true) {
$this->assertObjectHasProperty($propertyName, $object, $message);
@@ -47,7 +47,7 @@ protected function assertXObjectHasProperty($propertyName, $object, $message='')
*
* @return void
*/
- protected function assertXObjectNotHasProperty($propertyName, $object, $message='')
+ protected function assertXObjectNotHasProperty($propertyName, $object, $message = '')
{
if (method_exists($this, 'assertObjectNotHasProperty') === true) {
$this->assertObjectNotHasProperty($propertyName, $object, $message);
diff --git a/tests/Core/Ruleset/ShowSniffDeprecationsTest.php b/tests/Core/Ruleset/ShowSniffDeprecationsTest.php
index 712fa7d64b..03a76d7f50 100644
--- a/tests/Core/Ruleset/ShowSniffDeprecationsTest.php
+++ b/tests/Core/Ruleset/ShowSniffDeprecationsTest.php
@@ -78,7 +78,7 @@ public static function dataHasSniffDeprecations()
*
* @return void
*/
- public function testDeprecatedSniffsListDoesNotShow($standard, $additionalArgs=[])
+ public function testDeprecatedSniffsListDoesNotShow($standard, $additionalArgs = [])
{
$args = $additionalArgs;
$args[] = '.';
@@ -134,7 +134,7 @@ public static function dataDeprecatedSniffsListDoesNotShow()
*
* @return void
*/
- public function testDeprecatedSniffsListDoesNotShowNeedsCsMode($standard, $additionalArgs=[])
+ public function testDeprecatedSniffsListDoesNotShowNeedsCsMode($standard, $additionalArgs = [])
{
if (PHP_CODESNIFFER_CBF === true) {
$this->markTestSkipped('This test needs CS mode to run');
diff --git a/tests/Core/Runner/PrintProgressDotsTest.php b/tests/Core/Runner/PrintProgressDotsTest.php
index c1184bad4b..9de16fa02e 100644
--- a/tests/Core/Runner/PrintProgressDotsTest.php
+++ b/tests/Core/Runner/PrintProgressDotsTest.php
@@ -196,7 +196,7 @@ public static function dataProgressDotCbf()
*
* @return void
*/
- private function checkProgressDot($colors, $code, $sniffs, $expected, $enableFixer=false)
+ private function checkProgressDot($colors, $code, $sniffs, $expected, $enableFixer = false)
{
$this->expectNoStdoutOutput();
diff --git a/tests/Core/Tokenizers/AbstractTokenizerTestCase.php b/tests/Core/Tokenizers/AbstractTokenizerTestCase.php
index c0bd7496f9..85bff39308 100644
--- a/tests/Core/Tokenizers/AbstractTokenizerTestCase.php
+++ b/tests/Core/Tokenizers/AbstractTokenizerTestCase.php
@@ -104,7 +104,7 @@ public function testTestMarkersAreUnique()
*
* @return int
*/
- protected function getTargetToken($commentString, $tokenType, $tokenContent=null)
+ protected function getTargetToken($commentString, $tokenType, $tokenContent = null)
{
return AbstractMethodTestCase::getTargetTokenFromFile($this->phpcsFile, $commentString, $tokenType, $tokenContent);
diff --git a/tests/Core/Tokenizers/PHP/ArrayKeywordTest.php b/tests/Core/Tokenizers/PHP/ArrayKeywordTest.php
index f94971d9d5..8dcdc5fe44 100644
--- a/tests/Core/Tokenizers/PHP/ArrayKeywordTest.php
+++ b/tests/Core/Tokenizers/PHP/ArrayKeywordTest.php
@@ -26,7 +26,7 @@ final class ArrayKeywordTest extends AbstractTokenizerTestCase
*
* @return void
*/
- public function testArrayKeyword($testMarker, $testContent='array')
+ public function testArrayKeyword($testMarker, $testContent = 'array')
{
$tokens = $this->phpcsFile->getTokens();
@@ -84,7 +84,7 @@ public static function dataArrayKeyword()
*
* @return void
*/
- public function testArrayType($testMarker, $testContent='array')
+ public function testArrayType($testMarker, $testContent = 'array')
{
$tokens = $this->phpcsFile->getTokens();
@@ -158,7 +158,7 @@ public static function dataArrayType()
*
* @return void
*/
- public function testNotArrayKeyword($testMarker, $testContent='array')
+ public function testNotArrayKeyword($testMarker, $testContent = 'array')
{
$tokens = $this->phpcsFile->getTokens();
diff --git a/tests/Core/Tokenizers/PHP/BackfillEnumTest.php b/tests/Core/Tokenizers/PHP/BackfillEnumTest.php
index dc0534b5f4..5e8516a6d0 100644
--- a/tests/Core/Tokenizers/PHP/BackfillEnumTest.php
+++ b/tests/Core/Tokenizers/PHP/BackfillEnumTest.php
@@ -139,7 +139,7 @@ public static function dataEnums()
*
* @return void
*/
- public function testNotEnums($testMarker, $testContent, $expectedType='T_STRING')
+ public function testNotEnums($testMarker, $testContent, $expectedType = 'T_STRING')
{
$targetTypes = Tokens::NAME_TOKENS;
$targetTypes += [T_ENUM => T_ENUM];
diff --git a/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.php b/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.php
index cb5e2501a0..614740409c 100644
--- a/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.php
+++ b/tests/Core/Tokenizers/PHP/BackfillFnTokenTest.php
@@ -838,7 +838,7 @@ public function testNestedInMethod()
*
* @return void
*/
- public function testNotAnArrowFunction($testMarker, $testContent='fn', $expectedType='T_STRING')
+ public function testNotAnArrowFunction($testMarker, $testContent = 'fn', $expectedType = 'T_STRING')
{
$targetTypes = Tokens::NAME_TOKENS;
$targetTypes += [T_FN => T_FN];
@@ -942,7 +942,7 @@ public static function dataNotAnArrowFunction()
*
* @return void
*/
- private function backfillHelper($token, $skipScopeCloserCheck=false)
+ private function backfillHelper($token, $skipScopeCloserCheck = false)
{
$tokens = $this->phpcsFile->getTokens();
@@ -994,7 +994,7 @@ private function backfillHelper($token, $skipScopeCloserCheck=false)
*
* @return void
*/
- private function scopePositionTestHelper($token, $openerOffset, $closerOffset, $expectedCloserType='semicolon')
+ private function scopePositionTestHelper($token, $openerOffset, $closerOffset, $expectedCloserType = 'semicolon')
{
$tokens = $this->phpcsFile->getTokens();
$expectedScopeOpener = ($token + $openerOffset);
diff --git a/tests/Core/Tokenizers/PHP/BackfillMatchTokenTest.php b/tests/Core/Tokenizers/PHP/BackfillMatchTokenTest.php
index 1d854e0cc1..247ac9c2ff 100644
--- a/tests/Core/Tokenizers/PHP/BackfillMatchTokenTest.php
+++ b/tests/Core/Tokenizers/PHP/BackfillMatchTokenTest.php
@@ -30,7 +30,7 @@ final class BackfillMatchTokenTest extends AbstractTokenizerTestCase
*
* @return void
*/
- public function testMatchExpression($testMarker, $openerOffset, $closerOffset, $testContent='match')
+ public function testMatchExpression($testMarker, $openerOffset, $closerOffset, $testContent = 'match')
{
$tokens = $this->phpcsFile->getTokens();
@@ -213,7 +213,7 @@ public static function dataMatchExpression()
*
* @return void
*/
- public function testNotAMatchStructure($testMarker, $testContent='match', $expectedType='T_STRING')
+ public function testNotAMatchStructure($testMarker, $testContent = 'match', $expectedType = 'T_STRING')
{
$targetTypes = Tokens::NAME_TOKENS;
$targetTypes += [T_MATCH => T_MATCH];
@@ -484,7 +484,7 @@ public static function dataSwitchCaseVersusMatch()
*
* @return void
*/
- private function scopeTestHelper($token, $openerOffset, $closerOffset, $skipScopeCloserCheck=false)
+ private function scopeTestHelper($token, $openerOffset, $closerOffset, $skipScopeCloserCheck = false)
{
$tokens = $this->phpcsFile->getTokens();
$tokenArray = $tokens[$token];
diff --git a/tests/Core/Tokenizers/PHP/BackfillReadonlyTest.php b/tests/Core/Tokenizers/PHP/BackfillReadonlyTest.php
index 8951303821..1c8c188209 100644
--- a/tests/Core/Tokenizers/PHP/BackfillReadonlyTest.php
+++ b/tests/Core/Tokenizers/PHP/BackfillReadonlyTest.php
@@ -28,7 +28,7 @@ final class BackfillReadonlyTest extends AbstractTokenizerTestCase
*
* @return void
*/
- public function testReadonly($testMarker, $testContent='readonly')
+ public function testReadonly($testMarker, $testContent = 'readonly')
{
$tokens = $this->phpcsFile->getTokens();
$target = $this->getTargetToken($testMarker, [T_READONLY, T_STRING], $testContent);
@@ -187,7 +187,7 @@ public static function dataReadonly()
*
* @return void
*/
- public function testNotReadonly($testMarker, $testContent='readonly', $expectedType='T_STRING')
+ public function testNotReadonly($testMarker, $testContent = 'readonly', $expectedType = 'T_STRING')
{
$targetTypes = Tokens::NAME_TOKENS;
$targetTypes += [T_READONLY => T_READONLY];
diff --git a/tests/Core/Tokenizers/PHP/DNFTypesTest.php b/tests/Core/Tokenizers/PHP/DNFTypesTest.php
index 6f96a968ac..1301bb9d0d 100644
--- a/tests/Core/Tokenizers/PHP/DNFTypesTest.php
+++ b/tests/Core/Tokenizers/PHP/DNFTypesTest.php
@@ -28,7 +28,7 @@ final class DNFTypesTest extends AbstractTokenizerTestCase
*
* @return void
*/
- public function testNormalParentheses($testMarker, $skipCheckInside=false)
+ public function testNormalParentheses($testMarker, $skipCheckInside = false)
{
$tokens = $this->phpcsFile->getTokens();
diff --git a/tests/Core/Tokenizers/PHP/DefaultKeywordTest.php b/tests/Core/Tokenizers/PHP/DefaultKeywordTest.php
index 819ea28775..385be28d0c 100644
--- a/tests/Core/Tokenizers/PHP/DefaultKeywordTest.php
+++ b/tests/Core/Tokenizers/PHP/DefaultKeywordTest.php
@@ -31,7 +31,7 @@ final class DefaultKeywordTest extends AbstractTokenizerTestCase
*
* @return void
*/
- public function testMatchDefault($testMarker, $testContent='default')
+ public function testMatchDefault($testMarker, $testContent = 'default')
{
$tokens = $this->phpcsFile->getTokens();
@@ -111,7 +111,7 @@ public static function dataMatchDefault()
*
* @return void
*/
- public function testSwitchDefault($testMarker, $testContent='default')
+ public function testSwitchDefault($testMarker, $testContent = 'default')
{
$tokens = $this->phpcsFile->getTokens();
@@ -169,7 +169,7 @@ public static function dataSwitchDefault()
*
* @return void
*/
- public function testNotDefaultKeyword($testMarker, $testContent='DEFAULT', $expectedType='T_STRING')
+ public function testNotDefaultKeyword($testMarker, $testContent = 'DEFAULT', $expectedType = 'T_STRING')
{
$targetTypes = Tokens::NAME_TOKENS;
$targetTypes += [
diff --git a/tests/Core/Tokenizers/PHP/ExitKeywordTest.php b/tests/Core/Tokenizers/PHP/ExitKeywordTest.php
index e8fc436dfa..7de945c16c 100644
--- a/tests/Core/Tokenizers/PHP/ExitKeywordTest.php
+++ b/tests/Core/Tokenizers/PHP/ExitKeywordTest.php
@@ -123,7 +123,7 @@ public static function dataExitIsKeyword()
*
* @return void
*/
- public function testNotExitKeyword($testMarker, $testContent, $expected='T_STRING')
+ public function testNotExitKeyword($testMarker, $testContent, $expected = 'T_STRING')
{
$tokens = $this->phpcsFile->getTokens();
$tokenCode = constant($expected);
diff --git a/tests/Core/Tokenizers/PHP/GotoLabelTest.php b/tests/Core/Tokenizers/PHP/GotoLabelTest.php
index 935f9823e0..bb037edab7 100644
--- a/tests/Core/Tokenizers/PHP/GotoLabelTest.php
+++ b/tests/Core/Tokenizers/PHP/GotoLabelTest.php
@@ -189,7 +189,7 @@ public static function dataGotoDeclaration()
*
* @return void
*/
- public function testNotAGotoDeclaration($testMarker, $testContent, $expectedType='T_STRING')
+ public function testNotAGotoDeclaration($testMarker, $testContent, $expectedType = 'T_STRING')
{
$targetTypes = Tokens::NAME_TOKENS;
$targetTypes += [T_GOTO_LABEL => T_GOTO_LABEL];
diff --git a/tests/Core/Tokenizers/PHP/NullsafeObjectOperatorTest.php b/tests/Core/Tokenizers/PHP/NullsafeObjectOperatorTest.php
index 27fbfe71db..aba26f2dd5 100644
--- a/tests/Core/Tokenizers/PHP/NullsafeObjectOperatorTest.php
+++ b/tests/Core/Tokenizers/PHP/NullsafeObjectOperatorTest.php
@@ -95,7 +95,7 @@ public static function dataNullsafeObjectOperator()
*
* @return void
*/
- public function testTernaryThen($testMarker, $testObjectOperator=false)
+ public function testTernaryThen($testMarker, $testObjectOperator = false)
{
$tokens = $this->phpcsFile->getTokens();
diff --git a/tests/Core/Tokenizers/Tokenizer/CreateParenthesisNestingMapDNFTypesTest.php b/tests/Core/Tokenizers/Tokenizer/CreateParenthesisNestingMapDNFTypesTest.php
index d8393387c9..126aca08dd 100644
--- a/tests/Core/Tokenizers/Tokenizer/CreateParenthesisNestingMapDNFTypesTest.php
+++ b/tests/Core/Tokenizers/Tokenizer/CreateParenthesisNestingMapDNFTypesTest.php
@@ -26,7 +26,7 @@ final class CreateParenthesisNestingMapDNFTypesTest extends AbstractTokenizerTes
*
* @return void
*/
- public function testNormalParentheses($testMarker, $owner=false)
+ public function testNormalParentheses($testMarker, $owner = false)
{
$tokens = $this->phpcsFile->getTokens();
diff --git a/tests/Core/Tokenizers/Tokenizer/CreatePositionMapYieldFromTest.php b/tests/Core/Tokenizers/Tokenizer/CreatePositionMapYieldFromTest.php
index a6d919859b..75dbbf4c16 100644
--- a/tests/Core/Tokenizers/Tokenizer/CreatePositionMapYieldFromTest.php
+++ b/tests/Core/Tokenizers/Tokenizer/CreatePositionMapYieldFromTest.php
@@ -32,7 +32,7 @@ final class CreatePositionMapYieldFromTest extends AbstractTokenizerTestCase
*
* @return void
*/
- public function testYieldFromTabReplacement($testMarker, $expected, $content=null)
+ public function testYieldFromTabReplacement($testMarker, $expected, $content = null)
{
$tokens = $this->phpcsFile->getTokens();
$target = $this->getTargetToken($testMarker, [T_YIELD_FROM], $content);
diff --git a/tests/Core/Tokenizers/Tokenizer/CreateTokenMapArrayParenthesesTest.php b/tests/Core/Tokenizers/Tokenizer/CreateTokenMapArrayParenthesesTest.php
index e811211fda..047bcd0eee 100644
--- a/tests/Core/Tokenizers/Tokenizer/CreateTokenMapArrayParenthesesTest.php
+++ b/tests/Core/Tokenizers/Tokenizer/CreateTokenMapArrayParenthesesTest.php
@@ -26,7 +26,7 @@ final class CreateTokenMapArrayParenthesesTest extends AbstractTokenizerTestCase
*
* @return void
*/
- public function testArrayKeyword($testMarker, $testContent='array')
+ public function testArrayKeyword($testMarker, $testContent = 'array')
{
$tokens = $this->phpcsFile->getTokens();
@@ -88,7 +88,7 @@ public static function dataArrayKeyword()
*
* @return void
*/
- public function testArrayType($testMarker, $testContent='array')
+ public function testArrayType($testMarker, $testContent = 'array')
{
$tokens = $this->phpcsFile->getTokens();
@@ -166,7 +166,7 @@ public static function dataArrayType()
*
* @return void
*/
- public function testNotArrayKeyword($testMarker, $testContent='array')
+ public function testNotArrayKeyword($testMarker, $testContent = 'array')
{
$tokens = $this->phpcsFile->getTokens();
diff --git a/tests/Core/Tokenizers/Tokenizer/CreateTokenMapClosureUseParenthesesTest.php b/tests/Core/Tokenizers/Tokenizer/CreateTokenMapClosureUseParenthesesTest.php
index 38db182e83..5c5879b028 100644
--- a/tests/Core/Tokenizers/Tokenizer/CreateTokenMapClosureUseParenthesesTest.php
+++ b/tests/Core/Tokenizers/Tokenizer/CreateTokenMapClosureUseParenthesesTest.php
@@ -79,7 +79,7 @@ public static function dataUseNotClosure()
*
* @return void
*/
- public function testUseNotClosureNextOpenClose($testMarker, $expectedOwnerCode=null)
+ public function testUseNotClosureNextOpenClose($testMarker, $expectedOwnerCode = null)
{
$tokens = $this->phpcsFile->getTokens();
$opener = $this->getTargetToken($testMarker, T_OPEN_PARENTHESIS);
diff --git a/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapCaseKeywordConditionsTest.php b/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapCaseKeywordConditionsTest.php
index 2b185c5721..02a4b4f0c9 100644
--- a/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapCaseKeywordConditionsTest.php
+++ b/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapCaseKeywordConditionsTest.php
@@ -76,7 +76,7 @@ public static function dataEnumCases()
*
* @return void
*/
- public function testNotEnumCases($testMarker, $expectedTokens, $testCloserMarker=null)
+ public function testNotEnumCases($testMarker, $expectedTokens, $testCloserMarker = null)
{
$tokens = $this->phpcsFile->getTokens();
$caseIndex = $this->getTargetToken($testMarker, [T_ENUM_CASE, T_CASE]);
diff --git a/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapDefaultKeywordConditionsTest.php b/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapDefaultKeywordConditionsTest.php
index a7dcb9c4e4..0fdf869730 100644
--- a/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapDefaultKeywordConditionsTest.php
+++ b/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapDefaultKeywordConditionsTest.php
@@ -44,7 +44,7 @@ final class RecurseScopeMapDefaultKeywordConditionsTest extends AbstractTokenize
*
* @return void
*/
- public function testMatchDefault($testMarker, $testContent='default')
+ public function testMatchDefault($testMarker, $testContent = 'default')
{
$tokens = $this->phpcsFile->getTokens();
@@ -154,7 +154,7 @@ public static function dataMatchDefault()
*
* @return void
*/
- public function testSwitchDefault($testMarker, $openerMarker, $closerMarker, $conditionStopMarker=null, $testContent='default', $sharedScopeCloser=false)
+ public function testSwitchDefault($testMarker, $openerMarker, $closerMarker, $conditionStopMarker = null, $testContent = 'default', $sharedScopeCloser = false)
{
$tokens = $this->phpcsFile->getTokens();
@@ -356,7 +356,7 @@ public static function dataSwitchDefault()
*
* @return void
*/
- public function testNotDefaultKeyword($testMarker, $testContent='DEFAULT')
+ public function testNotDefaultKeyword($testMarker, $testContent = 'DEFAULT')
{
$targetTypes = Tokens::NAME_TOKENS;
$targetTypes += [
diff --git a/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapSwitchTokenScopeTest.php b/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapSwitchTokenScopeTest.php
index dd6634ace4..7b4b9f6d94 100644
--- a/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapSwitchTokenScopeTest.php
+++ b/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapSwitchTokenScopeTest.php
@@ -32,7 +32,7 @@ final class RecurseScopeMapSwitchTokenScopeTest extends AbstractTokenizerTestCas
*
* @return void
*/
- public function testSwitchScope($testMarker, $expectedTokens, $testOpenerMarker=null, $testCloserMarker=null)
+ public function testSwitchScope($testMarker, $expectedTokens, $testOpenerMarker = null, $testCloserMarker = null)
{
$tokens = $this->phpcsFile->getTokens();
$switchIndex = $this->getTargetToken($testMarker, [T_SWITCH]);
diff --git a/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapWithNamespaceOperatorTest.php b/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapWithNamespaceOperatorTest.php
index c6acda7274..79c1cf84f3 100644
--- a/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapWithNamespaceOperatorTest.php
+++ b/tests/Core/Tokenizers/Tokenizer/RecurseScopeMapWithNamespaceOperatorTest.php
@@ -28,7 +28,7 @@ final class RecurseScopeMapWithNamespaceOperatorTest extends AbstractTokenizerTe
*
* @return void
*/
- public function testScopeSetting($testMarker, $tokenTypes, $open=[T_OPEN_CURLY_BRACKET], $close=[T_CLOSE_CURLY_BRACKET])
+ public function testScopeSetting($testMarker, $tokenTypes, $open = [T_OPEN_CURLY_BRACKET], $close = [T_CLOSE_CURLY_BRACKET])
{
$tokens = $this->phpcsFile->getTokens();
diff --git a/tests/Core/Tokenizers/Tokenizer/ReplaceTabsInTokenTestCase.php b/tests/Core/Tokenizers/Tokenizer/ReplaceTabsInTokenTestCase.php
index 041da55f05..cf8ab8e273 100644
--- a/tests/Core/Tokenizers/Tokenizer/ReplaceTabsInTokenTestCase.php
+++ b/tests/Core/Tokenizers/Tokenizer/ReplaceTabsInTokenTestCase.php
@@ -78,7 +78,7 @@ public static function tearDownAfterClass(): void
*
* @return void
*/
- public function testNoReplacementsAreMadeWhenNoTabsAreFound($testMarker, $testTarget, $expected, $offset=0)
+ public function testNoReplacementsAreMadeWhenNoTabsAreFound($testMarker, $testTarget, $expected, $offset = 0)
{
$tokens = $this->phpcsFile->getTokens();
$target = $this->getTargetToken($testMarker, $testTarget);
@@ -145,7 +145,7 @@ public static function dataNoReplacementsAreMadeWhenNoTabsAreFound()
*
* @return void
*/
- public function testTabReplacement($testMarker, $testTarget, $expected, $offset=0)
+ public function testTabReplacement($testMarker, $testTarget, $expected, $offset = 0)
{
$tokens = $this->phpcsFile->getTokens();
$target = $this->getTargetToken($testMarker, $testTarget);
diff --git a/tests/Core/Util/Common/EscapeshellcmdTest.php b/tests/Core/Util/Common/EscapeshellcmdTest.php
index 213010de49..dab28e2299 100644
--- a/tests/Core/Util/Common/EscapeshellcmdTest.php
+++ b/tests/Core/Util/Common/EscapeshellcmdTest.php
@@ -34,7 +34,7 @@ final class EscapeshellcmdTest extends TestCase
*
* @return void
*/
- public function testEscapeshellcmd($command, $expected, $expectedWin=null)
+ public function testEscapeshellcmd($command, $expected, $expectedWin = null)
{
if (PHP_OS_FAMILY === 'Windows' && empty($expectedWin) === false) {
$expected = $expectedWin;
diff --git a/tests/Core/Util/Help/HelpTest.php b/tests/Core/Util/Help/HelpTest.php
index ebf102b34f..c51a608e52 100644
--- a/tests/Core/Util/Help/HelpTest.php
+++ b/tests/Core/Util/Help/HelpTest.php
@@ -723,7 +723,7 @@ public static function dataPrintCategoryOptions()
*
* @return mixed
*/
- private function invokeReflectionMethod(Help $help, $methodName, $params=null)
+ private function invokeReflectionMethod(Help $help, $methodName, $params = null)
{
$reflMethod = new ReflectionMethod($help, $methodName);
(PHP_VERSION_ID < 80100) && $reflMethod->setAccessible(true);