-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Run checks every monday * Fix code style * Add properties types * fix cs
- Loading branch information
Showing
14 changed files
with
59 additions
and
86 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,49 +1,38 @@ | ||
<?php | ||
$config = PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@PSR2' => true, | ||
'psr4' => true, | ||
'phpdoc_indent' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'blank_line_before_statement' => false, | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
'no_null_property_initialization' => true, | ||
'yoda_style' => false, | ||
'ordered_imports' => ['sortAlgorithm' => 'alpha'], | ||
'ordered_class_elements' => [ | ||
'use_trait', | ||
'constant_public', | ||
'constant_protected', | ||
'constant_private', | ||
'property_public', | ||
'property_protected', | ||
'property_private', | ||
'construct', | ||
'destruct', | ||
'magic', | ||
'phpunit', | ||
'method_public', | ||
'method_protected', | ||
'method_private' | ||
], | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->in(__DIR__.'/src') | ||
->in(__DIR__.'/tests') | ||
) | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__.'/src') | ||
->in(__DIR__ . '/tests') | ||
; | ||
// special handling of fabbot.io service if it's using too old PHP CS Fixer version | ||
try { | ||
PhpCsFixer\FixerFactory::create() | ||
->registerBuiltInFixers() | ||
->registerCustomFixers($config->getCustomFixers()) | ||
->useRuleSet(new PhpCsFixer\RuleSet($config->getRules())); | ||
} catch (PhpCsFixer\ConfigurationException\InvalidConfigurationException $e) { | ||
$config->setRules([]); | ||
} catch (UnexpectedValueException $e) { | ||
$config->setRules([]); | ||
} | ||
return $config; | ||
|
||
return PhpCsFixer\Config::create() | ||
->setFinder($finder) | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@PSR2' => true, | ||
'psr4' => true, | ||
'phpdoc_indent' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'blank_line_before_statement' => false, | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
'no_null_property_initialization' => true, | ||
'yoda_style' => false, | ||
'ordered_imports' => ['sortAlgorithm' => 'alpha'], | ||
'ordered_class_elements' => [ | ||
'use_trait', | ||
'constant_public', | ||
'constant_protected', | ||
'constant_private', | ||
'property_public', | ||
'property_protected', | ||
'property_private', | ||
'construct', | ||
'destruct', | ||
'magic', | ||
'phpunit', | ||
'method_public', | ||
'method_protected', | ||
'method_private' | ||
], | ||
]); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
*/ | ||
class ElementCollection implements \IteratorAggregate, \Countable | ||
{ | ||
|
||
/** | ||
* @var Element[] | ||
*/ | ||
|
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 |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
*/ | ||
class RegexStringFilter implements StringFilterInterface | ||
{ | ||
|
||
/** | ||
* @var string | ||
*/ | ||
|
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 |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
*/ | ||
class RegexReplace implements StringModifyInterface | ||
{ | ||
|
||
/** | ||
* @var string | ||
*/ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
*/ | ||
class StringCollection implements \IteratorAggregate, \Countable | ||
{ | ||
|
||
/** | ||
* @var string[] | ||
*/ | ||
|
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Xparse\ElementFinder\DomNodeListAction; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
*/ | ||
class Element extends \DOMElement | ||
{ | ||
|
||
/** | ||
* @return array Array<String, String> | ||
*/ | ||
|
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 |
---|---|---|
|
@@ -13,7 +13,6 @@ | |
*/ | ||
interface ElementFinderInterface | ||
{ | ||
|
||
/** | ||
* @throws \Exception | ||
*/ | ||
|
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 |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
*/ | ||
class FormHelper | ||
{ | ||
|
||
/** | ||
* @var ElementFinderInterface | ||
*/ | ||
|