@@ -674,9 +674,9 @@ public function addError(
674
674
string $ error ,
675
675
?int $ stackPtr ,
676
676
string $ code ,
677
- array $ data= [],
678
- int $ severity= 0 ,
679
- bool $ fixable= false
677
+ array $ data = [],
678
+ int $ severity = 0 ,
679
+ bool $ fixable = false
680
680
) {
681
681
if ($ stackPtr === null ) {
682
682
$ line = 1 ;
@@ -708,9 +708,9 @@ public function addWarning(
708
708
string $ warning ,
709
709
?int $ stackPtr ,
710
710
string $ code ,
711
- array $ data= [],
712
- int $ severity= 0 ,
713
- bool $ fixable= false
711
+ array $ data = [],
712
+ int $ severity = 0 ,
713
+ bool $ fixable = false
714
714
) {
715
715
if ($ stackPtr === null ) {
716
716
$ line = 1 ;
@@ -741,8 +741,8 @@ public function addErrorOnLine(
741
741
string $ error ,
742
742
int $ line ,
743
743
string $ code ,
744
- array $ data= [],
745
- int $ severity= 0
744
+ array $ data = [],
745
+ int $ severity = 0
746
746
) {
747
747
return $ this ->addMessage (true , $ error , $ line , 1 , $ code , $ data , $ severity , false );
748
748
@@ -765,8 +765,8 @@ public function addWarningOnLine(
765
765
string $ warning ,
766
766
int $ line ,
767
767
string $ code ,
768
- array $ data= [],
769
- int $ severity= 0
768
+ array $ data = [],
769
+ int $ severity = 0
770
770
) {
771
771
return $ this ->addMessage (false , $ warning , $ line , 1 , $ code , $ data , $ severity , false );
772
772
@@ -791,8 +791,8 @@ public function addFixableError(
791
791
string $ error ,
792
792
int $ stackPtr ,
793
793
string $ code ,
794
- array $ data= [],
795
- int $ severity= 0
794
+ array $ data = [],
795
+ int $ severity = 0
796
796
) {
797
797
$ recorded = $ this ->addError ($ error , $ stackPtr , $ code , $ data , $ severity , true );
798
798
if ($ recorded === true && $ this ->fixer ->enabled === true ) {
@@ -822,8 +822,8 @@ public function addFixableWarning(
822
822
string $ warning ,
823
823
int $ stackPtr ,
824
824
string $ code ,
825
- array $ data= [],
826
- int $ severity= 0
825
+ array $ data = [],
826
+ int $ severity = 0
827
827
) {
828
828
$ recorded = $ this ->addWarning ($ warning , $ stackPtr , $ code , $ data , $ severity , true );
829
829
if ($ recorded === true && $ this ->fixer ->enabled === true ) {
@@ -2264,7 +2264,7 @@ public function isReference(int $stackPtr)
2264
2264
* @return string The token contents.
2265
2265
* @throws \PHP_CodeSniffer\Exceptions\RuntimeException If the specified position does not exist.
2266
2266
*/
2267
- public function getTokensAsString ($ start , $ length , bool $ origContent= false )
2267
+ public function getTokensAsString ($ start , $ length , bool $ origContent = false )
2268
2268
{
2269
2269
if (is_int ($ start ) === false || isset ($ this ->tokens [$ start ]) === false ) {
2270
2270
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)
2324
2324
public function findPrevious (
2325
2325
$ types ,
2326
2326
int $ start ,
2327
- ?int $ end= null ,
2328
- bool $ exclude= false ,
2329
- ?string $ value= null ,
2330
- bool $ local= false
2327
+ ?int $ end = null ,
2328
+ bool $ exclude = false ,
2329
+ ?string $ value = null ,
2330
+ bool $ local = false
2331
2331
) {
2332
2332
$ types = (array ) $ types ;
2333
2333
@@ -2405,10 +2405,10 @@ public function findPrevious(
2405
2405
public function findNext (
2406
2406
$ types ,
2407
2407
int $ start ,
2408
- ?int $ end= null ,
2409
- bool $ exclude= false ,
2410
- ?string $ value= null ,
2411
- bool $ local= false
2408
+ ?int $ end = null ,
2409
+ bool $ exclude = false ,
2410
+ ?string $ value = null ,
2411
+ bool $ local = false
2412
2412
) {
2413
2413
$ types = (array ) $ types ;
2414
2414
@@ -2451,7 +2451,7 @@ public function findNext(
2451
2451
*
2452
2452
* @return int
2453
2453
*/
2454
- public function findStartOfStatement (int $ start , $ ignore= null )
2454
+ public function findStartOfStatement (int $ start , $ ignore = null )
2455
2455
{
2456
2456
$ startTokens = Tokens::BLOCK_OPENERS ;
2457
2457
$ startTokens [T_OPEN_SHORT_ARRAY ] = true ;
@@ -2642,7 +2642,7 @@ public function findStartOfStatement(int $start, $ignore=null)
2642
2642
*
2643
2643
* @return int
2644
2644
*/
2645
- public function findEndOfStatement (int $ start , $ ignore= null )
2645
+ public function findEndOfStatement (int $ start , $ ignore = null )
2646
2646
{
2647
2647
$ endTokens = [
2648
2648
T_COLON => true ,
@@ -2769,7 +2769,7 @@ public function findEndOfStatement(int $start, $ignore=null)
2769
2769
* FALSE when no matching token could be found between the start of
2770
2770
* the line and the start token.
2771
2771
*/
2772
- public function findFirstOnLine ($ types , int $ start , bool $ exclude= false , ?string $ value= null )
2772
+ public function findFirstOnLine ($ types , int $ start , bool $ exclude = false , ?string $ value = null )
2773
2773
{
2774
2774
if (is_array ($ types ) === false ) {
2775
2775
$ types = [$ types ];
@@ -2860,7 +2860,7 @@ public function hasCondition(int $stackPtr, $types)
2860
2860
*
2861
2861
* @return int|false
2862
2862
*/
2863
- public function getCondition (int $ stackPtr , $ type , bool $ first= true )
2863
+ public function getCondition (int $ stackPtr , $ type , bool $ first = true )
2864
2864
{
2865
2865
// Check for the existence of the token.
2866
2866
if (isset ($ this ->tokens [$ stackPtr ]) === false ) {
0 commit comments