-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'repository-cleanup-from-base' into 'master'
Repository cleanup from base See merge request tjvb/githash!10
- Loading branch information
Showing
66 changed files
with
4,474 additions
and
42 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
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,92 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use PHP_CodeSniffer\Standards\Generic\Sniffs\Arrays\ArrayIndentSniff; | ||
use PHP_CodeSniffer\Standards\Generic\Sniffs\Formatting\SpaceAfterCastSniff; | ||
use PHP_CodeSniffer\Standards\Generic\Sniffs\PHP\ForbiddenFunctionsSniff; | ||
use PhpCsFixer\Fixer\ClassNotation\FinalClassFixer; | ||
use PhpCsFixer\Fixer\PhpUnit\PhpUnitConstructFixer; | ||
use PhpCsFixer\Fixer\PhpUnit\PhpUnitDedicateAssertFixer; | ||
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer; | ||
use PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer; | ||
use SlevomatCodingStandard\Sniffs\Classes\ClassConstantVisibilitySniff; | ||
use SlevomatCodingStandard\Sniffs\Classes\ClassStructureSniff; | ||
use SlevomatCodingStandard\Sniffs\Classes\MethodSpacingSniff; | ||
use SlevomatCodingStandard\Sniffs\Commenting\EmptyCommentSniff; | ||
use SlevomatCodingStandard\Sniffs\Functions\StaticClosureSniff; | ||
use SlevomatCodingStandard\Sniffs\Functions\StrictCallSniff; | ||
use SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff; | ||
use SlevomatCodingStandard\Sniffs\Namespaces\UnusedUsesSniff; | ||
use SlevomatCodingStandard\Sniffs\Namespaces\UselessAliasSniff; | ||
use SlevomatCodingStandard\Sniffs\Namespaces\UseSpacingSniff; | ||
use SlevomatCodingStandard\Sniffs\Variables\DisallowSuperGlobalVariableSniff; | ||
use Symplify\EasyCodingStandard\Config\ECSConfig; | ||
|
||
return ECSConfig::configure() | ||
->withPaths([ | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests', | ||
]) | ||
|
||
->withPreparedSets( | ||
psr12: true, | ||
cleanCode: true, | ||
) | ||
->withSkip([ | ||
FinalClassFixer::class => [ | ||
__DIR__ . '/tests/TestCase.php', | ||
__DIR__ . '/src/Exceptions/GitHashException.php', | ||
], | ||
]) | ||
->withConfiguredRule(UnusedUsesSniff::class, [ | ||
'searchAnnotations' => true, | ||
]) | ||
->withConfiguredRule(ForbiddenFunctionsSniff::class, [ | ||
'forbiddenFunctions' => [ | ||
'sizeof' => 'count', //keep the default option | ||
'delete' => 'unset', //keep the default option | ||
'dump' => null, //debug statement | ||
'dd' => null, //debug statement | ||
'var_dump' => null, //debug statement | ||
'print_r' => null, //debug statement | ||
'exit' => null, | ||
], | ||
]) | ||
->withConfiguredRule(ClassStructureSniff::class, [ | ||
'groups' => [ | ||
'uses', | ||
'constants', | ||
'enum cases', | ||
'properties', | ||
'constructor', | ||
'static constructors', | ||
'destructor', | ||
'magic methods', | ||
'all public methods', | ||
'all protected methods', | ||
'all private methods', | ||
], | ||
]) | ||
->withConfiguredRule(ReferenceUsedNamesOnlySniff::class, [ | ||
'searchAnnotations' => true, | ||
'allowFullyQualifiedNameForCollidingClasses' => true, | ||
]) | ||
->withRules([ | ||
ArrayIndentSniff::class, | ||
SpaceAfterCastSniff::class, | ||
StaticClosureSniff::class, | ||
DisallowSuperGlobalVariableSniff::class, | ||
ClassConstantVisibilitySniff::class, | ||
DeclareStrictTypesFixer::class, | ||
NoExtraBlankLinesFixer::class, | ||
FinalClassFixer::class, | ||
MethodSpacingSniff::class, | ||
UselessAliasSniff::class, | ||
EmptyCommentSniff::class, | ||
UseSpacingSniff::class, | ||
StrictCallSniff::class, | ||
PhpUnitConstructFixer::class, | ||
PhpUnitDedicateAssertFixer::class, | ||
]) | ||
; |
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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Core settings appear at the top | ||
# (the "global" section). | ||
|
||
StylesPath = styles | ||
MinAlertLevel = suggestion | ||
|
||
Packages = proselint, alex | ||
|
||
[*.{md,html,yaml}] | ||
BasedOnStyles = Vale, TJVB, proselint, alex | ||
|
||
# replaced by TJVB spelling that ignores some technical words | ||
Vale.Spelling = NO | ||
# replaced by TJVB repeatedWords that ignores the cases | ||
Vale.Repetition = no | ||
|
||
alex.Ablist = NO | ||
alex.Condescending = NO | ||
alex.ProfanityLikely = NO | ||
alex.ProfanityUnlikely = NO | ||
|
||
proselint.Annotations = NO | ||
|
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 @@ | ||
beek |
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,4 @@ | ||
laravel | ||
phpstan | ||
config | ||
shell_exec |
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,12 @@ | ||
extends: substitution | ||
message: Use '%s' instead of '%s' | ||
level: warning | ||
ignorecase: true | ||
# swap maps tokens in form of bad: good | ||
swap: | ||
# NOTE: The left-hand (bad) side can match the right-hand (good) side; Vale | ||
# will ignore any alerts that match the intended form. | ||
'java[ -]?scripts?': JavaScript | ||
'Post?gr?e(?:SQL)': PostgreSQL | ||
'[\s]php?': PHP | ||
'[\s]gitlab?': GitLab |
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,7 @@ | ||
extends: repetition | ||
message: "'%s' is repeated!" | ||
level: error | ||
ignorecase: true | ||
alpha: true | ||
tokens: | ||
- '[^\s]+' |
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,6 @@ | ||
extends: spelling | ||
message: "Did you really mean '%s'?" | ||
level: error | ||
ignore: | ||
- tools/vale/ignore-spelling/name.txt | ||
- tools/vale/ignore-spelling/tech-words.txt |
Oops, something went wrong.