lmc/coding-standard
Deprecated PHP coding standard for Alma Career Czechia (formerly LMC). Based on PSR-12 and partially PER 2.0, delivered via EasyCodingStandard with rules for PHP-CS-Fixer and PHP_CodeSniffer to enforce readable, consistent code and catch common mistakes.
NullableTypeDeclarationFixer.php-cs-fixer up to version 3.56.ecs.php. See UPGRADE-4.0.md for step-by-step upgrade howto.ecs-7.4.php, ecs-8.0.php and ecs-8.1.php to ecs.php and remove the former files.php-cs-fixer sniffs to new ones.symplify/easy-coding-standard to <10.2.4 because of backward incompatibilities introduced in its bugfix releases.slevomat/coding-standard ^7ecs-8.0.php coding standard declaration file for PHP 8.0+.ecs-8.1.php coding standard declaration file for PHP 8.1+.$numeric_prefix parameter in PHP 7.4+.ecs-7.4.php coding standard declaration file for PHP 7.4+.PhpUnitExpectationFixer is now used only on PHP 8.0+. See symplify#3130.Symplify\CodingStandard\Sniffs\Naming\[AbstractClassNameSniff, ClassNameSuffixByParentSniff, InterfaceNameSniff and TraitNameSniff] with equivalent versions backported to this repository.ArrayPushFixer - Converts simple usages of array_push($x, $y); to $x[] = $y;.SwitchContinueToBreakFixer - Switch case must not be ended with continue but with break.LambdaNotUsedImportFixer - Lambda must not import variables it doesn't use.NoUselessSprintfFixer - There must be no sprintf calls with only the first argument.SingleSpaceAfterConstructFixer - Ensures a single space after language constructs.CleanNamespaceFixer - Namespace must not contain spacing, comments or PHPDoc.TernaryToElvisOperatorFixer - Use the Elvis operator ?: where possible.PhpdocOrderByValueFixer Order phpdoc tags by value (order by default contents of 'covers', 'group' and 'throws').HeredocIndentationFixer - Heredoc/nowdoc content must be properly indented.GitMergeConflictSniff - Detects merge conflict artifacts left in files.symplify/coding-standard to <7.2.20 to avoid deprecation errors.ArrayDeclarationSniff.ValueNoNewline because of bug in PHP_CodeSniffer 3.5.5.easy-coding-standard.yaml (change %vendor_dir% placeholder directly to name of the vendor directory like vendor). See example in README.VisibilityRequiredFixer now check visibility is declared also on class constants.Symplify\ParamReturnAndVarTagMalformsFixer - the [@param](https://github.com/param), [@return](https://github.com/return) and [@var](https://github.com/var) annotations should keep standard format.NativeFunctionTypeDeclarationCasingFixer - native type hints for functions should use the correct case.SingleTraitInsertPerStatementFixer - each trait use must be done as single statement.PhpUnitDedicateAssertInternalTypeFixer - PHPUnit assertions like assertIsArray() should be used over assertInternalType() (PHPUnit 7.5+ required).PhpUnitMockShortWillReturnFixer - Use of eg. ->will($this->returnValue(..)) must be replaced by its shorter equivalent such as ->willReturn(...).NoSuperfluousPhpdocTagsFixer now also removes superfluous [@inheritdoc](https://github.com/inheritdoc) tags.CombineNestedDirnameFixer - replace multiple nested calls of dirname by only one call with second $level parameter.FopenFlagOrderFixer - order the flags in fopen calls, b and t must be last.FopenFlagsFixer - the flags in fopen calls must contain b and must omit t.ImplodeCallFixer - function implode must be called with 2 arguments in the documented order.PhpdocVarAnnotationCorrectOrderFixer - [@var](https://github.com/var) and [@type](https://github.com/type) annotations must have type and name in the correct order[@mixed](https://github.com/mixed) annotations preserved when explicitly declared.Symplify\CodingStandard\Fixer\Naming\MagicMethodsNamingFixer with PhpCsFixer\Fixer\Casing\MagicMethodCasingFixer.NoSuperfluousPhpdocTagsFixer to remove unnecessary [@return](https://github.com/return) and [@param](https://github.com/param) PHPDocs.PhpUnitTestCaseStaticMethodCallsFixer to unify how assertion methods in PHPUnit tests are called.SetTypeToCastFixer to ensure casting is used instead of settype() .Symplify\CodingStandard\Fixer\Naming\ClassNameSuffixByParentFixer to Symplify\CodingStandard\Sniffs\Naming\ClassNameSuffixByParentSniffGeneric.Commenting.DocComment.SpacingBeforeTags being reported on one-line phpDoc annotations (when PHP_Codesniffer 3.3.0+ is used).SpecifyArgSeparatorFixer to make sure arg_separator is always defined when using http_build_query() function.PhpUnitMockFixer: Ensure dedicated helper methods createMock() and createPartialMock() are used where possible instead of ->getMock().PhpUnitNoExpectationAnnotationFixer: Use setExpectedException() instead of [@expectedException](https://github.com/expectedException) annotation.PhpUnitSetUpTearDownVisibilityFixer: Visibility of setUp() and tearDown() method should be kept protected as defined in PHPUnit TestCase.EventSubscriber class suffixes via ClassNameSuffixByParentFixer.ExceptionNameFixer with more generic ClassNameSuffixByParentFixer.How can I help you explore Laravel packages today?