-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from inpsyde/modernization
This merge will: Modernize the codebase: - Move from PSR-2 or PSR-12 - Use latest PHPCS - Use latest WPCS - Use latest VIP CS now in separate repo from WPCS Cleanup: - Remove custom and 3rd party sniffs that are duplicated - Remove PHPCSAliases.php that's no more necessary - Remove arg and config from ruleset.xml Improve: - Make customization of ElementNameMinimalLength sniff - Improve detection of hook callback Overall, merging this PR will fix: - #21 - #25 - #26 (some outdated packages will be there because of PHPUnit 6 that we can't upgrade due to PHP 7.0 support) - #29 - #33
- Loading branch information
Showing
35 changed files
with
465 additions
and
675 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 0 additions & 137 deletions
137
Inpsyde/Sniffs/CodeQuality/AssignmentInsideConditionSniff.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the php-coding-standards package. | ||
* | ||
* (c) Inpsyde GmbH | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Inpsyde\Sniffs\CodeQuality; | ||
|
||
use Inpsyde\PhpcsHelpers; | ||
use PHP_CodeSniffer\Files\File; | ||
use PHP_CodeSniffer\Standards\PSR12\Sniffs\Properties as PSR12; | ||
|
||
/** | ||
* @package php-coding-standards | ||
* @license http://opensource.org/licenses/MIT MIT | ||
*/ | ||
final class ConstantVisibilitySniff extends PSR12\ConstantVisibilitySniff | ||
{ | ||
/** | ||
* @param File $phpcsFile | ||
* @param int $stackPtr | ||
* @return void | ||
*/ | ||
public function process(File $phpcsFile, $stackPtr) | ||
{ | ||
$min = PhpcsHelpers::minPhpTestVersion(); | ||
if ($min && version_compare($min, '7.1', '<')) { | ||
return; | ||
} | ||
|
||
parent::process($phpcsFile, $stackPtr); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.