Skip to content

Commit

Permalink
Add and update tests after PR review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoprimo committed Nov 26, 2024
1 parent f8639a2 commit 8fc0f50
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,12 @@ function shouldBeIgnored()
function dnfReturnType(): (Response&SuccessResponse)|AnotherResponse|string
{}

function contentAfterOpeningBrace() { // Some comment.
function commentAfterOpeningBrace() { // Some comment.
}

function variableAssignmentAfterOpeningBrace() { $a = 1;
}

abstract class MyClass {
abstract public function abstractMethod();
}
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ function shouldBeIgnored()
function dnfReturnType(): (Response&SuccessResponse)|AnotherResponse|string {
}

function contentAfterOpeningBrace() {
function commentAfterOpeningBrace() {
// Some comment.
}

function variableAssignmentAfterOpeningBrace() {
$a = 1;
}

abstract class MyClass {
abstract public function abstractMethod();
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

// Intentional parse error (missing opening parenthesis).
// Intentional parse error (missing opening curly brace).
// This should be the only test in this file.
// Testing that the sniff is *not* triggered.

function missingOpeningParenthesis
function missingOpeningCurlyBrace()
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public function getErrorList($testFile='')
214 => 1,
222 => 1,
224 => 1,
227 => 1,
];
case 'OpeningFunctionBraceKernighanRitchieUnitTest.2.inc':
return [
Expand Down

0 comments on commit 8fc0f50

Please sign in to comment.