Skip to content

Commit 771d9da

Browse files
committed
CS: remove class/function end comments
Includes removing the rule from the PHPCS native ruleset and adding another one to enforce the opposite, i.e. forbid end comments.
1 parent 1adb191 commit 771d9da

File tree

656 files changed

+3043
-3043
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

656 files changed

+3043
-3043
lines changed

autoload.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public static function load(string $className)
141141

142142
return false;
143143

144-
}//end load()
144+
}
145145

146146

147147
/**
@@ -184,7 +184,7 @@ public static function loadFile(string $path)
184184
self::$loadedFiles[$className] = $path;
185185
return self::$loadedClasses[$path];
186186

187-
}//end loadFile()
187+
}
188188

189189

190190
/**
@@ -245,7 +245,7 @@ static function ($remaining, $current) {
245245

246246
return $className;
247247

248-
}//end determineLoadedClass()
248+
}
249249

250250

251251
/**
@@ -260,7 +260,7 @@ public static function addSearchPath(string $path, string $nsPrefix = '')
260260
{
261261
self::$searchPaths[$path] = rtrim(trim((string) $nsPrefix), '\\');
262262

263-
}//end addSearchPath()
263+
}
264264

265265

266266
/**
@@ -272,7 +272,7 @@ public static function getSearchPaths()
272272
{
273273
return self::$searchPaths;
274274

275-
}//end getSearchPaths()
275+
}
276276

277277

278278
/**
@@ -291,7 +291,7 @@ public static function getLoadedClassName(string $path)
291291

292292
return self::$loadedClasses[$path];
293293

294-
}//end getLoadedClassName()
294+
}
295295

296296

297297
/**
@@ -310,7 +310,7 @@ public static function getLoadedFileName(string $className)
310310

311311
return self::$loadedFiles[$className];
312312

313-
}//end getLoadedFileName()
313+
}
314314

315315

316316
/**
@@ -322,7 +322,7 @@ public static function getLoadedClasses()
322322
{
323323
return self::$loadedClasses;
324324

325-
}//end getLoadedClasses()
325+
}
326326

327327

328328
/**
@@ -334,10 +334,10 @@ public static function getLoadedFiles()
334334
{
335335
return self::$loadedFiles;
336336

337-
}//end getLoadedFiles()
337+
}
338338

339339

340-
}//end class
340+
}
341341

342342
// Register the autoloader before any existing autoloaders to ensure
343343
// it gets a chance to hear about every autoload request, and record

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<!-- Include some sniffs from other standards that don't conflict with PEAR -->
3838
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
3939
<rule ref="Squiz.Arrays.ArrayDeclaration"/>
40-
<rule ref="Squiz.Commenting.ClosingDeclarationComment"/>
40+
<rule ref="PSR12.Classes.ClosingBrace"/>
4141
<rule ref="Squiz.ControlStructures.ControlSignature"/>
4242
<rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
4343
<rule ref="Squiz.Commenting.BlockComment"/>

requirements.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ function checkRequirements()
7070
exit($exitCode);
7171
}
7272

73-
}//end checkRequirements()
73+
}

scripts/BuildRequirementsCheckMatrix.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function getBuilds()
7272

7373
return $builds;
7474

75-
}//end getBuilds()
75+
}
7676

7777

7878
/**
@@ -106,7 +106,7 @@ private function getValidBuilds()
106106

107107
return $builds;
108108

109-
}//end getValidBuilds()
109+
}
110110

111111

112112
/**
@@ -138,7 +138,7 @@ private function getInvalidPHPBuilds()
138138

139139
return $builds;
140140

141-
}//end getInvalidPHPBuilds()
141+
}
142142

143143

144144
/**
@@ -182,7 +182,7 @@ private function getMissingExtensionsBuilds()
182182

183183
return $builds;
184184

185-
}//end getMissingExtensionsBuilds()
185+
}
186186

187187

188-
}//end class
188+
}

scripts/build-phar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function stripWhitespaceAndComments(string $fullpath, Config $config)
7676

7777
return $stripped;
7878

79-
}//end stripWhitespaceAndComments()
79+
}
8080

8181

8282
Timing::startTiming();

src/Config.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public function __get(string $name)
276276

277277
return $this->settings[$name];
278278

279-
}//end __get()
279+
}
280280

281281

282282
/**
@@ -349,7 +349,7 @@ public function __set(string $name, $value)
349349

350350
$this->settings[$name] = $value;
351351

352-
}//end __set()
352+
}
353353

354354

355355
/**
@@ -363,7 +363,7 @@ public function __isset(string $name)
363363
{
364364
return isset($this->settings[$name]);
365365

366-
}//end __isset()
366+
}
367367

368368

369369
/**
@@ -377,7 +377,7 @@ public function __unset(string $name)
377377
{
378378
$this->settings[$name] = null;
379379

380-
}//end __unset()
380+
}
381381

382382

383383
/**
@@ -389,7 +389,7 @@ public function getSettings()
389389
{
390390
return $this->settings;
391391

392-
}//end getSettings()
392+
}
393393

394394

395395
/**
@@ -403,7 +403,7 @@ public function setSettings(array $settings)
403403
{
404404
$this->settings = $settings;
405405

406-
}//end setSettings()
406+
}
407407

408408

409409
/**
@@ -488,7 +488,7 @@ public function __construct(array $cliArgs = [], bool $dieOnUnknownArg = true)
488488

489489
fclose($handle);
490490

491-
}//end __construct()
491+
}
492492

493493

494494
/**
@@ -539,7 +539,7 @@ public function setCommandLineValues(array $args)
539539
}//end if
540540
}//end for
541541

542-
}//end setCommandLineValues()
542+
}
543543

544544

545545
/**
@@ -663,7 +663,7 @@ public function restoreDefaults()
663663
$this->parallel = max((int) $parallel, 1);
664664
}
665665

666-
}//end restoreDefaults()
666+
}
667667

668668

669669
/**
@@ -775,7 +775,7 @@ public function processShortArgument(string $arg, int $pos)
775775
}
776776
}//end switch
777777

778-
}//end processShortArgument()
778+
}
779779

780780

781781
/**
@@ -1307,7 +1307,7 @@ public function processLongArgument(string $arg, int $pos)
13071307
break;
13081308
}//end switch
13091309

1310-
}//end processLongArgument()
1310+
}
13111311

13121312

13131313
/**
@@ -1394,7 +1394,7 @@ static function ($carry, $item) {
13941394

13951395
return $sniffs;
13961396

1397-
}//end parseSniffCodes()
1397+
}
13981398

13991399

14001400
/**
@@ -1423,7 +1423,7 @@ public function processUnknownArgument(string $arg, int $pos)
14231423

14241424
$this->processFilePath($arg);
14251425

1426-
}//end processUnknownArgument()
1426+
}
14271427

14281428

14291429
/**
@@ -1459,7 +1459,7 @@ public function processFilePath(string $path)
14591459
$this->overriddenDefaults['files'] = true;
14601460
}
14611461

1462-
}//end processFilePath()
1462+
}
14631463

14641464

14651465
/**
@@ -1479,7 +1479,7 @@ public function printUsage()
14791479

14801480
echo PHP_EOL;
14811481

1482-
}//end printUsage()
1482+
}
14831483

14841484

14851485
/**
@@ -1506,7 +1506,7 @@ public function printShortUsage(bool $returnOutput = false)
15061506

15071507
echo $usage;
15081508

1509-
}//end printShortUsage()
1509+
}
15101510

15111511

15121512
/**
@@ -1532,7 +1532,7 @@ public function printPHPCSUsage()
15321532

15331533
(new Help($this, $longOptions, $shortOptions))->display();
15341534

1535-
}//end printPHPCSUsage()
1535+
}
15361536

15371537

15381538
/**
@@ -1548,7 +1548,7 @@ public function printPHPCBFUsage()
15481548

15491549
(new Help($this, $longOptions, $shortOptions))->display();
15501550

1551-
}//end printPHPCBFUsage()
1551+
}
15521552

15531553

15541554
/**
@@ -1574,7 +1574,7 @@ public static function getConfigData(string $key)
15741574

15751575
return $phpCodeSnifferConfig[$key];
15761576

1577-
}//end getConfigData()
1577+
}
15781578

15791579

15801580
/**
@@ -1615,7 +1615,7 @@ public static function getExecutablePath(string $name)
16151615
self::$executablePaths[$name] = $result;
16161616
return $result;
16171617

1618-
}//end getExecutablePath()
1618+
}
16191619

16201620

16211621
/**
@@ -1697,7 +1697,7 @@ public function setConfigData(string $key, ?string $value, bool $temp = false)
16971697

16981698
return true;
16991699

1700-
}//end setConfigData()
1700+
}
17011701

17021702

17031703
/**
@@ -1739,7 +1739,7 @@ public static function getAllConfigData()
17391739
self::$configData = $phpCodeSnifferConfig;
17401740
return self::$configData;
17411741

1742-
}//end getAllConfigData()
1742+
}
17431743

17441744

17451745
/**
@@ -1774,7 +1774,7 @@ public function prepareConfigDataForDisplay(array $data)
17741774

17751775
return $output;
17761776

1777-
}//end prepareConfigDataForDisplay()
1777+
}
17781778

17791779

17801780
/**
@@ -1790,7 +1790,7 @@ public function printConfigData(array $data)
17901790
{
17911791
echo $this->prepareConfigDataForDisplay($data);
17921792

1793-
}//end printConfigData()
1793+
}
17941794

17951795

1796-
}//end class
1796+
}

src/Exceptions/DeepExitException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
class DeepExitException extends Exception
2323
{
2424

25-
}//end class
25+
}

src/Exceptions/GeneratorException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
class GeneratorException extends DomainException
1616
{
1717

18-
}//end class
18+
}

src/Exceptions/RuntimeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
class RuntimeException extends PHPRuntimeException
1515
{
1616

17-
}//end class
17+
}

src/Exceptions/TokenizerException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
class TokenizerException extends Exception
1515
{
1616

17-
}//end class
17+
}

0 commit comments

Comments
 (0)