Skip to content

Commit

Permalink
Remove debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeTowers committed Dec 16, 2024
1 parent 16d7cc2 commit 09b945e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
6 changes: 0 additions & 6 deletions modules/system/Phpcs/Sniffs/NoGlobalAliasesSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ public function process(File $phpcsFile, $stackPtr)
// Normalize the use statement and remove "as" aliases
$useStatement = trim(preg_replace('/\s+as\s+\w+$/i', '', $useStatement));

// $phpcsFile->addError(
// $useStatement . var_export(isset($this->aliases[$useStatement]), true),
// $stackPtr,
// 'NoGlobalAliases'
// );

// Check if the use statement matches a key in the aliases
foreach ($this->aliases as $alias => $fullyQualifiedName) {
if ($useStatement === $alias) {
Expand Down
12 changes: 6 additions & 6 deletions modules/system/Phpcs/Tests/Sniffs/NoGlobalAliasesSniffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
class NoGlobalAliasesSniffTest extends AbstractSniffUnitTest
{
/**
* Returns the lines where errors should occur.
* Returns the lines where warnings should occur.
*
* @return array<int, int> Line numbers as keys, number of errors as values.
* @return array<int, int> Line numbers as keys, number of warnings as values.
*/
public function getErrorList(): array
public function getWarningList(): array
{
return [
3 => 1, // Global alias Config
Expand All @@ -25,11 +25,11 @@ public function getErrorList(): array
}

/**
* Returns the lines where warnings should occur.
* Returns the lines where errors should occur.
*
* @return array<int, int> Line numbers as keys, number of warnings as values.
* @return array<int, int> Line numbers as keys, number of errors as values.
*/
public function getWarningList(): array
public function getErrorList(): array
{
return [];
}
Expand Down

0 comments on commit 09b945e

Please sign in to comment.