Skip to content

Commit e323d38

Browse files
committed
Should be using plural form here (ref #2349)
1 parent f78fa6f commit e323d38

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
3232
-- This allows you change the "exact" rule for only some parts of a file
3333
- Generic.WhiteSpace.ScopeIndent now disables exact indent checking inside all arrays
3434
-- Previously, this was only done when using long array syntax, but it now works for short array syntax as well
35+
- PSR12.Classes.ClassInstantiation has changed it's error code from MissingParenthesis to MissingParentheses
3536
</notes>
3637
<contents>
3738
<dir name="/">

src/Standards/PSR12/Sniffs/Classes/ClassInstantiationSniff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Verifies that classes are instantiated with parenthesis.
3+
* Verifies that classes are instantiated with parentheses.
44
*
55
* @author Greg Sherwood <gsherwood@squiz.net>
66
* @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
@@ -87,8 +87,8 @@ public function process(File $phpcsFile, $stackPtr)
8787
return;
8888
}
8989

90-
$error = 'Parenthesis must be used when instantiating a new class';
91-
$fix = $phpcsFile->addFixableError($error, $stackPtr, 'MissingParenthesis');
90+
$error = 'Parentheses must be used when instantiating a new class';
91+
$fix = $phpcsFile->addFixableError($error, $stackPtr, 'MissingParentheses');
9292
if ($fix === true) {
9393
$prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($classNameEnd - 1), null, true);
9494
$phpcsFile->fixer->addContent($prev, '()');

0 commit comments

Comments
 (0)