Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Rules

1,369 rules: 164 format, 835 lint, 370 analyse. 919 have a fix. 7 are Planned and do not run yet. Search all rules.

Topic groups

arrays · 17 rules

Array literals, list() destructuring and array access.

format: 12 · lint: 2 · analyse: 3

attributes · 17 rules

PHP attributes (#[…]).

format: 3 · analyse: 14

casing · 10 rules

The casing of keywords, constants, types and names.

format: 9 · analyse: 1

casts · 6 rules

Type casts.

format: 5 · analyse: 1

classes · 87 rules

Class, interface, trait and enum declarations and their members.

format: 8 · lint: 15 · analyse: 64

comments · 9 rules

Comments other than PHPDoc, including ignore comments.

format: 7 · lint: 1 · analyse: 1

complexity · 56 rules

Code that can be written more simply, and size and complexity limits.

lint: 56

control-flow · 37 rules

if, switch, match, loops, return and the other control structures.

format: 13 · lint: 16 · analyse: 8

dead-code · 98 rules

Code that never runs, or whose result is never used.

lint: 56 · analyse: 42

debug · 5 rules

Type debugging helpers (dumpType, assertType).

analyse: 5

deprecated · 8 rules

Uses of something marked deprecated.

analyse: 8

functions · 41 rules

Function and method declarations, calls, arguments and closures.

format: 8 · lint: 17 · analyse: 16

imports · 15 rules

Namespaces and use imports.

format: 13 · lint: 1 · analyse: 1

operators · 37 rules

Operators and their operands.

format: 15 · lint: 7 · analyse: 15

performance · 4 rules

Faster equivalents of slow constructs.

lint: 4

phpdoc · 71 rules

PHPDoc blocks and tags.

format: 25 · lint: 14 · analyse: 32

refactor · 33 rules

Configurable codemods: they do nothing until configured.

lint: 33

security · 13 rules

Code that can be exploited, or that leaks or hides data.

lint: 13

statements · 24 rules

Statements, declare and semicolons.

format: 15 · lint: 3 · analyse: 6

strings · 16 rules

String literals, heredoc and nowdoc.

format: 9 · lint: 5 · analyse: 2

style · 91 rules

One consistent way to write the same thing.

lint: 91

tags · 6 rules

The PHP open and close tags.

format: 5 · lint: 1

types · 202 rules

Type declarations, type checks and inferred types.

format: 6 · lint: 78 · analyse: 118

undefined · 18 rules

References to something declared nowhere.

analyse: 18

whitespace · 9 rules

Indentation, blank lines, line endings and trailing whitespace.

format: 9

lumen · 2 rules

Lumen routes: the Lumen framework’s own route syntax.

lint: 2

Ecosystem groups

laravel · 125 rules

Laravel (ecosystem: on when composer.lock has laravel/framework).

format: 1 · lint: 109 · analyse: 15

pest · 59 rules

Pest (ecosystem: on when composer.lock has pestphp/pest).

lint: 59

phpunit · 135 rules

PHPUnit (ecosystem: on when composer.lock has phpunit/phpunit).

format: 1 · lint: 134

Upgrade groups

laravel-5.7 · 5 rules

Upgrade to Laravel 5.7: code a newer Laravel removes, deprecates or does better.

lint: 5

laravel-5.8 · 1 rules

Upgrade to Laravel 5.8: code a newer Laravel removes, deprecates or does better.

lint: 1

laravel-8 · 4 rules

Upgrade to Laravel 8: code a newer Laravel removes, deprecates or does better.

lint: 4

laravel-9 · 2 rules

Upgrade to Laravel 9: code a newer Laravel removes, deprecates or does better.

lint: 2

laravel-10 · 7 rules

Upgrade to Laravel 10: code a newer Laravel removes, deprecates or does better.

lint: 7

laravel-11 · 4 rules

Upgrade to Laravel 11: code a newer Laravel removes, deprecates or does better.

lint: 4

laravel-12 · 1 rules

Upgrade to Laravel 12: code a newer Laravel removes, deprecates or does better.

lint: 1

cashier-13 · 1 rules

Upgrade to Laravel Cashier 13: code a newer Cashier removes, deprecates or does better.

lint: 1

faker-1 · 1 rules

Upgrade to Faker 1.0 (fakerphp/faker): code a newer Faker removes, deprecates or does better.

lint: 1

livewire-3 · 2 rules

Upgrade to Livewire 3: code a newer Livewire removes, deprecates or does better.

lint: 2

php-5.3 · 1 rules

Upgrade to PHP 5.3: code a newer PHP removes, deprecates or does better.

lint: 1

php-5.5 · 3 rules

Upgrade to PHP 5.5: code a newer PHP removes, deprecates or does better.

lint: 3

php-7.0 · 10 rules

Upgrade to PHP 7.0: code a newer PHP removes, deprecates or does better.

lint: 10

php-7.1 · 4 rules

Upgrade to PHP 7.1: code a newer PHP removes, deprecates or does better.

lint: 4

php-7.2 · 7 rules

Upgrade to PHP 7.2: code a newer PHP removes, deprecates or does better.

lint: 7

php-7.3 · 9 rules

Upgrade to PHP 7.3: code a newer PHP removes, deprecates or does better.

lint: 9

php-7.4 · 10 rules

Upgrade to PHP 7.4: code a newer PHP removes, deprecates or does better.

lint: 10

php-8.0 · 10 rules

Upgrade to PHP 8.0: code a newer PHP removes, deprecates or does better.

lint: 10

php-8.1 · 15 rules

Upgrade to PHP 8.1: code a newer PHP removes, deprecates or does better.

lint: 15

php-8.2 · 4 rules

Upgrade to PHP 8.2: code a newer PHP removes, deprecates or does better.

lint: 4

php-8.3 · 6 rules

Upgrade to PHP 8.3: code a newer PHP removes, deprecates or does better.

lint: 6

php-8.4 · 3 rules

Upgrade to PHP 8.4: code a newer PHP removes, deprecates or does better.

lint: 3

php-8.5 · 6 rules

Upgrade to PHP 8.5: code a newer PHP removes, deprecates or does better.

lint: 6

php-8.6 · 2 rules

Upgrade to PHP 8.6: code a newer PHP removes, deprecates or does better.

lint: 2

All rules

Search by Pun ID or upstream name.

1369 of 1,369 rules

Fix: ✓ safe · ! unsafe · ± mixed · — report only. Dim icons do not apply.

IDSummaryEnabled byFix
format/arrays/indentationEach element of an array must be indented exactly once.format-laravel
format/arrays/index-braceArray index should always be written by using square braces.format-laravel
format/arrays/list-syntaxList (array destructuring) assignment should be declared using the configured syntax.format-laravel
format/arrays/no-multiline-double-arrowOperator => should not be surrounded by multi-line whitespaces.format-laravel
format/arrays/no-space-around-offsetThere MUST NOT be spaces around offset braces.format-laravel
format/arrays/no-space-before-commaIn array declaration, there MUST NOT be a whitespace before each comma.format-laravel
format/arrays/no-space-in-emptyEmpty arrays should not contain only whitespace.Opt-in
format/arrays/no-trailing-comma-single-lineIf a list of values separated by a comma is contained on a single line, then the last item MUST NOT have a trailing comma.format-laravel
format/arrays/space-after-commaIn array declaration, there MUST be a whitespace after each comma.format-laravel
format/arrays/syntaxPHP arrays should be declared using the configured syntax.format-laravel
format/arrays/trailing-comma-multilineArguments lists, array destructuring lists, arrays that are multi-line, match-lines and parameters lists must have a trailing comma.format-laravel
format/arrays/trim-spacesArrays should be formatted like function/method arguments, without leading or trailing single line space.format-laravel
format/attributes/empty-parenthesesPHP attributes declared without arguments must (not) be followed by empty parentheses.Opt-in
format/attributes/no-block-spacesRemove spaces before and after the attributes block.Opt-in
format/attributes/orderedSorts attributes using the configured sort algorithm.Opt-in
format/casing/class-referenceWhen referencing an internal class it must be written using the correct casing.Opt-in
format/casing/constantsThe PHP constants true, false, and null MUST be written using the correct casing.format-laravelformat-psr12
format/casing/integer-literalsInteger literals must be in correct case.format-laravel
format/casing/keywordsPHP keywords MUST be in lower case.format-laravelformat-psr12
format/casing/magic-constantsMagic constants should be referred to using the correct casing.format-laravel
format/casing/magic-methodsMagic method definitions and calls must be using the correct casing.format-laravel
format/casing/native-functionsFunction defined by PHP should be called using the correct casing.format-laravel
format/casing/native-typesNative type declarations should be used in the correct case.format-laravel
format/casing/static-referenceClass static references self, static and parent MUST be in lower case.format-laravelformat-psr12
format/casts/lowercaseCast should be written in lower case.format-laravelformat-psr12
format/casts/no-short-boolShort cast bool using double exclamation mark should not be used.format-laravel
format/casts/no-unsetVariables must be set null instead of using (unset) casting.format-laravel
format/casts/short-scalarCast (boolean) and (integer) should be written as (bool) and (int), (double) and (real) as (float), (binary) as (string).format-laravelformat-psr12
format/casts/spacingA single space or none should be between cast and variable.format-laravel
format/classes/definitionWhitespace around the keywords of a class, trait, enum or interfaces definition should be one space.format-laravelformat-psr12
format/classes/member-separationClass, trait and interface elements must be separated with one or none blank line.format-laravel
format/classes/modifier-keywordsClasses, constants, properties, and methods MUST have visibility declared, and keyword modifiers MUST be in the following order: inheritance modifier (abstract or final), visibility modifier (public, protected, or private), set-visibility modifier (public(set), protected(set), or private(set)), scope modifier (static), mutation modifier (readonly), type declaration, name.format-laravelformat-psr12
format/classes/multiline-promoted-propertiesPromoted properties must be on separate lines.Opt-in
format/classes/no-blank-line-after-openingThere should be no empty lines after class opening brace.format-laravelformat-psr12
format/classes/ordered-interfacesOrders the interfaces in an implements or interface extends clause.format-laravel
format/classes/single-member-per-statementThere MUST NOT be more than one property or constant declared per statement.format-laravelformat-psr12
format/classes/single-trait-per-statementEach trait use must be done as single statement.format-psr12
format/comments/align-multilineEach line of multi-line DocComments must have an asterisk [PSR-5] and must be aligned with the first one.Opt-in
format/comments/headerAdd, replace or remove header comment.Opt-in
format/comments/multiline-delimitersDocBlocks must start with two asterisks, multiline comments must start with a single asterisk, after the opening slash. Both must end with a single asterisk before the closing slash.Opt-in
format/comments/no-emptyThere should not be any empty comments.Opt-in
format/comments/no-trailing-whitespaceThere must be no trailing whitespace at the end of lines in comments and PHPDocs.format-laravelformat-psr12
format/comments/single-line-spacingSingle-line comments must have proper spacing.format-laravel
format/comments/single-line-styleSingle-line comments and multi-line comments with only one line of actual content should use the // syntax.format-laravel
format/control-flow/bracesThe body of each control structure MUST be enclosed within braces.format-laravelformat-psr12
format/control-flow/continuation-positionControl structure continuation keyword must be on the configured line.format-laravelformat-psr12
format/control-flow/elseifThe keyword elseif should be used instead of else if so that all control keywords look like single words.format-laravelformat-psr12
format/control-flow/empty-loop-bodyEmpty loop-body must be in configured style.Opt-in
format/control-flow/empty-loop-conditionEmpty loop-condition must be in configured style.Opt-in
format/control-flow/includeInclude/Require and file path should be divided with a single space. File path should not be placed within parentheses.format-laravel
format/control-flow/no-alternative-syntaxReplace control structure alternative syntax to use braces.format-laravel
format/control-flow/no-break-commentThere must be a comment when fall-through is intentional in a non-empty case body.format-psr12
format/control-flow/no-unneeded-bracesRemoves unneeded braces that are superfluous and aren't part of a control structure's body.format-laravel
format/control-flow/no-unneeded-parenthesesRemoves unneeded parentheses around control statements.format-laravel
format/control-flow/switch-case-colonA case should be followed by a colon and not a semicolon.format-laravelformat-psr12
format/control-flow/switch-case-spaceRemoves extra spaces between colon and case value.format-laravelformat-psr12
format/control-flow/yodaWrite conditions in Yoda style (true), non-Yoda style (['equal' => false, 'identical' => false, 'less_and_greater' => false]) or ignore those conditions (null) based on configuration.format-laravel
format/functions/argument-spacingIn method arguments and method call, there MUST NOT be a space before each comma and there MUST be one space after each comma. Argument lists MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one argument per line.format-laravelformat-psr12
format/functions/backtick-to-shell-execConverts backtick operators to shell_exec calls.Opt-in
format/functions/chain-indentationMethod chaining MUST be properly indented. Method chaining with different levels of indentation is not supported.format-laravel
format/functions/declarationSpaces should be properly placed in a function declaration.format-laravelformat-psr12
format/functions/no-alias-construct-callMaster language constructs shall be used instead of aliases.format-laravel
format/functions/no-space-after-nameWhen making a method or function call, there MUST NOT be a space between the method or function name and the opening parenthesis.format-laravelformat-psr12
format/functions/return-type-spacingAdjust spacing around colon in return type declarations and backed enum types.format-laravelformat-psr12
format/functions/single-line-throwThrowing exception must be done in single line.Opt-in
format/imports/blank-line-afterEach namespace use MUST go on its own line and there MUST be one blank line after the use statements block.format-laravelformat-psr12
format/imports/blank-line-after-namespaceThere MUST be one blank line after the namespace declaration.format-laravelformat-psr12
format/imports/blank-line-between-groupsPutting blank lines between use statement groups.format-laravelformat-psr12
format/imports/blank-lines-before-namespaceControls blank lines before a namespace declaration.format-laravelformat-psr12
format/imports/clean-namespaceNamespace must not contain spacing, comments or PHPDoc.format-laravel
format/imports/fully-qualified-strict-typesRemoves the leading part of fully qualified symbol references if a given symbol is imported or belongs to the current namespace.format-laravel
format/imports/global-namespaceImports or fully qualifies global classes/functions/constants.Opt-in
format/imports/groupThere MUST be group use for the same namespaces.Opt-in
format/imports/no-leading-namespace-whitespaceThe namespace declaration line shouldn't contain leading whitespace.format-laravel
format/imports/no-leading-slashRemove leading slashes in use clauses.format-laravelformat-psr12
format/imports/no-unneeded-aliasImports should not be aliased as the same name.format-laravel
format/imports/orderedOrdering use statements.format-laravelformat-psr12
format/imports/single-per-statementThere MUST be one use keyword per declaration.format-laravelformat-psr12
format/laravel/bladeFormats Blade templates as Pint 1.30 does, with Prettier + prettier-plugin-blade, or natively without Node under [format] blade = "native".Opt-in
format/operators/binary-spacingBinary operators should be surrounded by space as configured.format-laravelformat-psr12
format/operators/concat-spacingConcatenation should be spaced according to configuration.format-laravel
format/operators/increment-stylePre- or post-increment and decrement operators should be used if possible.format-laravel
format/operators/linebreakIn a multiline expression, each operator must be at the beginning or at the end of the line.Opt-in
format/operators/new-expression-parenthesesAll new expressions with a further call must (not) be wrapped in parentheses.Opt-in
format/operators/new-parenthesesAll instances created with new keyword must (not) be followed by parentheses.format-laravelformat-psr12
format/operators/no-space-around-arrowThere should not be space before or after object operators -> and ?->.format-laravel
format/operators/no-space-around-double-colonThere must be no space around double colons (also called Scope Resolution Operator or Paamayim Nekudotayim).format-laravelformat-psr12
format/operators/no-useless-concatThere should not be useless concat operations.Opt-in
format/operators/not-with-spaceLogical NOT operators (!) should have leading and trailing whitespaces.Opt-in
format/operators/not-with-successor-spaceLogical NOT operators (!) should have one trailing whitespace.format-laravel
format/operators/standardize-incrementIncrement and decrement operators should be used if possible.Opt-in
format/operators/standardize-not-equalsReplace all <> with !=.format-laravel
format/operators/ternary-spacingStandardize spaces around ternary operator.format-laravelformat-psr12
format/operators/unary-spacingUnary operators should be placed adjacent to their operands.format-laravelformat-psr12
format/phpdoc/alignAll items of the given PHPDoc tags must be either left-aligned or (by default) aligned vertically.format-laravel
format/phpdoc/annotation-without-dotPHPDoc annotation descriptions should not be a sentence.Opt-in
format/phpdoc/indentDocblocks should have the same indentation as the documented subject.format-laravel
format/phpdoc/inline-tagFixes PHPDoc inline tags.format-laravel
format/phpdoc/line-spanChanges doc blocks from single to multi line, or reversed.Opt-in
format/phpdoc/no-alias-tagNo alias PHPDoc tags should be used.Opt-in
format/phpdoc/no-blank-line-afterThere should not be blank lines between docblock and the documented element.format-laravel
format/phpdoc/no-duplicate-typesRemoves duplicate PHPDoc types.Opt-in
format/phpdoc/no-emptyThere should not be empty PHPDoc blocks.format-laravel
format/phpdoc/orderAnnotations in PHPDoc should be ordered in defined sequence.format-laravel
format/phpdoc/order-by-valueOrder PHPDoc tags by value.Opt-in
format/phpdoc/param-orderOrders all @param annotations in DocBlocks according to method signature.Opt-in
format/phpdoc/return-self-referenceThe type of @return annotations of methods returning a reference to itself must the configured one.Opt-in
format/phpdoc/scalarScalar types should always be written in the same form. int not integer, bool not boolean, float not real or double.format-laravel
format/phpdoc/separationAnnotations in PHPDoc should be grouped together so that annotations of the same type immediately follow each other. Annotations of a different type are separated by a single blank line.format-laravel
format/phpdoc/single-line-var-spacingSingle line @var PHPDoc should have proper spacing.format-laravel
format/phpdoc/summaryPHPDoc summary should end in either a full stop, exclamation mark, or question mark.Opt-in
format/phpdoc/tag-casingFixes casing of PHPDoc tags.Opt-in
format/phpdoc/tag-typeForces PHPDoc tags to be either regular annotations or inline.format-laravel
format/phpdoc/trimPHPDoc should start and end with content, excluding the very first and last line of the docblocks.format-laravel
format/phpdoc/trim-blank-linesRemoves extra blank lines after summary and after description in PHPDoc.Opt-in
format/phpdoc/typesThe correct case must be used for standard PHP types in PHPDoc.format-laravel
format/phpdoc/types-orderSorts PHPDoc types.Opt-in
format/phpdoc/var-order@var and @type annotations must have type and name in the correct order.Opt-in
format/phpdoc/var-without-name@var and @type annotations of classy properties should not contain the name.format-laravel
format/phpunit/fqcn-annotationPHPUnit annotations should be a FQCNs including a root namespace.Opt-in
format/statements/blank-line-beforeAn empty line feed must precede any configured statement.format-laravel
format/statements/braces-positionBraces must be placed as configured.format-laravelformat-psr12
format/statements/declare-equalEqual sign in declare statement should be surrounded by spaces or not following configuration.format-laravelformat-psr12
format/statements/declare-parenthesesThere must not be spaces around declare statement parentheses.format-laravel
format/statements/explicit-indirect-variableAdd curly braces to indirect variables to make them clear to understand.Opt-in
format/statements/multiline-semicolonForbid multi-line whitespace before the closing semicolon or move the semicolon to the new line for chained calls.format-laravel
format/statements/no-mixed-echo-printEither language construct print or echo should be used.format-laravel
format/statements/no-space-before-semicolonSingle-line whitespace before closing semicolon are prohibited.format-laravel
format/statements/numeric-literal-separatorAdds separators to numeric literals of any kind.Opt-in
format/statements/octal-notationLiteral octal must be in 0o notation.Opt-in
format/statements/one-per-lineThere must not be more than one statement per line.format-laravelformat-psr12
format/statements/semicolon-after-instructionInstructions must be terminated with a semicolon.Opt-in
format/statements/single-line-empty-bodyEmpty body of class, interface, trait, enum or function must be abbreviated as {} and placed on the same line as the previous symbol, separated by a single space.format-laravel
format/statements/space-after-semicolonFix whitespace after a semicolon.format-laravel
format/statements/space-around-constructEnsures a single space after language constructs.format-laravelformat-psr12
format/strings/complex-variableConverts explicit variables in double-quoted strings and heredoc syntax from simple to complex format (${ to {$).Opt-in
format/strings/explicit-variableConverts implicit variables into explicit ones in double-quoted strings or heredoc syntax.Opt-in
format/strings/heredoc-closing-markerUnify heredoc or nowdoc closing marker.Opt-in
format/strings/heredoc-indentationHeredoc/nowdoc content must be properly indented.Opt-in
format/strings/heredoc-to-nowdocConvert heredoc to nowdoc where possible.format-laravel
format/strings/implicit-backslashesHandles implicit backslashes in strings and heredocs. Depending on the chosen strategy, it can escape implicit backslashes to ease the understanding of which are special chars interpreted by PHP and which not (escape), or it can remove these additional backslashes if you find them superfluous (unescape). You can also leave them as-is using ignore strategy.Opt-in
format/strings/multiline-to-heredocConvert multiline string to heredoc or nowdoc.Opt-in
format/strings/no-binaryThere should not be a binary flag before strings.format-laravel
format/strings/single-quoteConvert double quotes to single quotes for simple strings.format-laravel
format/tags/blank-line-after-openingEnsure there is no code on the same line as the PHP open tag and it is followed by a blank line.format-laravelformat-psr12
format/tags/echo-syntaxReplaces short-echo <?= with long format <?php echo/<?php print syntax, or vice-versa.Opt-in
format/tags/full-openingPHP code must use the long <?php tags or short-echo <?= tags and not other tag variations.format-laravelformat-psr12
format/tags/linebreak-after-openingEnsure there is no code on the same line as the PHP open tag.format-laravel
format/tags/no-closingThe closing ?> tag MUST be omitted from files containing only PHP.format-laravelformat-psr12
format/types/compact-nullableRemove extra spaces in a nullable type declaration.format-laravelformat-psr12
format/types/declaration-spacingEnsure single space between a variable and its type declaration in function arguments and properties.format-laravel
format/types/nullable-for-null-defaultAdds or removes ? before single type declarations or |null at the end of union types when parameters have a default null value.format-laravel
format/types/nullable-syntaxNullable single type declaration should be standardized using configured syntax.format-laravel
format/types/orderedSort union types and intersection types using configured order.Opt-in
format/types/union-spacingA single space or none should be around union type and intersection type operators.format-laravel
format/whitespace/encodingPHP code MUST use only UTF-8 without BOM (remove BOM).format-laravelformat-psr12
format/whitespace/final-newlineA PHP file without end tag must always end with a single empty line feed.format-laravelformat-psr12
format/whitespace/indentation-typeCode MUST use configured indentation type.format-laravelformat-psr12
format/whitespace/inside-parenthesesParentheses must be declared using the configured whitespace.format-laravelformat-psr12
format/whitespace/line-endingAll PHP files must use same line ending.format-laravelformat-psr12
format/whitespace/no-blank-line-whitespaceRemove trailing whitespace at the end of blank lines.format-laravelformat-psr12
format/whitespace/no-extra-blank-linesRemoves extra blank lines and/or blank lines following configuration.format-laravelformat-psr12
format/whitespace/no-trailingThere must be no trailing whitespace at the end of non-blank lines.format-laravelformat-psr12
format/whitespace/statement-indentationEach statement must be indented.format-laravelformat-psr12
lint/arrays/no-implicit-array-creationDisallows implicit array creation: appending to or writing an offset of an undefined or null variable.lint-essentiallint-recommendedlint-strict
lint/arrays/prefer-array-spreadDetects calls to array_merge() and suggests using the array spread operator (...) in an array literal instead.lint-strict
lint/cashier-13/prefer-stripe-methodRenames the Billable stripeOptions() to stripe().rector-laravel/cashier-13rector-laravel/up-to-cashier-13rector-laravel/up-to-cashier-14
lint/classes/add-stringableA class that implements the __toString() method must explicitly implement the Stringable interface.lint-recommendedlint-strictrector/php80
lint/classes/no-explicit-constructor-callDisallows calling __construct() on an existing object outside a constructor.lint-essentiallint-recommendedlint-strict
lint/classes/no-null-property-defaultProperties MUST not be explicitly initialized with null except when they have a type declaration (PHP 7.4).lint-essentiallint-recommendedlint-strictrector/dead-code
lint/classes/no-protected-constant-in-finalChange protected constant to private if possiblelint-strictrector/privatization
lint/classes/no-protected-in-finalConverts protected variables and methods to private where possible.lint-strict
lint/classes/no-protected-method-in-finalChange protected class method to private if possiblelint-strictrector/privatization
lint/classes/no-protected-property-in-finalChange property to private if possiblelint-strictrector/privatization
lint/classes/no-redundant-readonlyRemoves redundant readonly from properties in readonly classes.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/classes/no-static-constructor-callDisallows calling a constructor statically (Foo::__construct()) outside a child class's constructor.lint-essentiallint-recommendedlint-strict
lint/classes/no-underscore-classDetects class, interface, trait, or enum declarations named _.lint-recommendedlint-strict
lint/classes/no-unset-on-propertyProperties should be set to null instead of using unset.lint-strict
lint/classes/prefer-new-selfChange new static() to new self() in a final classlint-recommendedlint-strictrector/code-quality
lint/classes/prefer-self-in-finalInside an enum or final/anonymous class, self should be preferred over static.lint-recommendedlint-strictrector/code-qualityrector/php55
lint/classes/require-class-matches-fileClasses must be in a path that matches their namespace, be at least one namespace deep and the class name should match the file name.lint-strict
lint/classes/require-member-orderOrders the elements of classes/interfaces/traits/enums.lint-strict
lint/comments/no-unused-ignoreA @pun-ignore comment that suppressed nothing. Fix removes it.lint-essentiallint-recommendedlint-strict
lint/complexity/no-and-assignmentSplit 2 assigns with "and" to separate lineslint-recommendedlint-strictrector/code-quality
lint/complexity/no-boolean-flag-parameterFlags function-like parameters that use a boolean type and drive the function's behavior.Opt-in
lint/complexity/no-compactChange compact() call to own arraylint-recommendedlint-strictrector/code-quality
lint/complexity/no-concat-assign-new-itemChange concat assign on a new array item to plain assign, as the new item is always nulllint-recommendedlint-strictrector/code-quality
lint/complexity/no-constant-conditionDetects if statements whose condition is a constant that is always true or always false.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/complexity/no-constant-via-variableChange variable class constant fetch to direct class constant fetch when class or constant target is finallint-recommendedlint-strictrector/code-quality
lint/complexity/no-dirname-dir-concatChange dirname() and string concat, to __DIR__ and direct string pathlint-recommendedlint-strictrector/code-quality
lint/complexity/no-duplicate-match-armDetects match arms that produce the same result as an earlier arm.lint-recommendedlint-strict
lint/complexity/no-else-clauseFlags if statements that include an else or elseif branch.Opt-in
lint/complexity/no-empty-fileDetects redundant files that contain no executable code or declarations.Opt-in
lint/complexity/no-excessive-cyclomaticChecks the cyclomatic complexity of classes, traits, enums, interfaces, functions, and closures.Opt-in
lint/complexity/no-excessive-enum-casesDetects enums with too many cases.Opt-in
lint/complexity/no-excessive-halsteadComputes Halstead metrics (volume, difficulty, effort) and reports if they exceed configured thresholds.Opt-in
lint/complexity/no-excessive-kan-defectDetects classes, traits, interfaces, functions, and closures with high kan defect.Opt-in
lint/complexity/no-excessive-methodsDetects class-like structures with too many methods.Opt-in
lint/complexity/no-excessive-nestingChecks if the nesting level in any block exceeds a configurable threshold.Opt-in
lint/complexity/no-excessive-parametersDetects functions, closures, and methods with too many parameters.Opt-in
lint/complexity/no-excessive-propertiesDetects class-like structures with too many properties.Opt-in
lint/complexity/no-gotoDetects the use of goto statements and labels.Opt-in
lint/complexity/no-iterator-to-array-in-foreachDetects iterator_to_array() calls used directly as a foreach expression.lint-recommendedlint-strict
lint/complexity/no-negated-boolean-literalReplace negated boolean literals (!false, !true) with their simplified equivalents (true, false)lint-recommendedlint-strictrector/code-quality
lint/complexity/no-negated-groupSimplify negated conditions with de Morgan theoremlint-recommendedlint-strictrector/code-quality
lint/complexity/no-negated-instanceof-ternaryFlip negated ternary of instanceof to direct use of objectlint-recommendedlint-strictrector/code-quality
lint/complexity/no-phpdoc-class-case-mismatchFix a misspelled class name casing in a @var docblock to match the real class namelint-recommendedlint-strictrector/code-quality
lint/complexity/no-redundant-issetDetects redundant arguments in isset() calls where a nested access already implies the parent checks.lint-recommendedlint-strict
lint/complexity/no-redundant-literal-returnDetects redundant literal guard patterns where an if statement checks if a variable equals a literal and returns that same literal, followed by returning the variable.lint-recommendedlint-strict
lint/complexity/no-redundant-null-checkReturn the value directly instead of checking it for null first.lint-recommendedlint-strictrector/code-quality
lint/complexity/no-redundant-nullsafeFlags the use of the nullsafe operator (?->) in contexts where its null-checking behavior is redundant.lint-recommendedlint-strict
lint/complexity/no-redundant-write-visibilityDetects redundant write visibility modifiers on properties.lint-recommendedlint-strict
lint/complexity/no-single-case-switchChange switch with only 1 check to iflint-recommendedlint-strictrector/code-quality
lint/complexity/no-single-item-in-arrayChanges in_array() with single element to ===lint-recommendedlint-strictrector/code-quality
lint/complexity/no-sole-value-sprintfRemove sprintf() wrapper if not neededlint-recommendedlint-strictrector/code-quality
lint/complexity/no-unused-labelDetects redundant goto labels that are declared but not used.lint-recommendedlint-strict
lint/complexity/no-useless-array-valuesRemoves unneeded array_values() in in_array() calllint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-absolute-includeMigrate include/require to absolute path. This Rector might introduce backwards incompatible code, when the include/require being changed depends on the current working directory.lint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-array-literalChange array_merge of non arrays to array directlylint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-coalesce-over-empty-ternaryChange ternary empty on array property with array dim fetch to coalesce operatorlint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-empty-array-compareCompare with [] instead of empty()/is_array() on arrays.lint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-explicit-array-comparisonMake array if conditions more explicitlint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-func-num-argsSimplify count of func_get_args() to func_num_args()lint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-if-statementChange inline if to explicit iflint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-in-arrayUse in_array() instead of repeated ||/&& comparisons, array_search() checks and foreach loops.lint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-inline-array-returnInline just in time array dim fetch assigns to direct returnlint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-instance-methodChange static method and local-only calls to non-staticlint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-min-maxChange ternary number compare to max() calllint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-named-literal-argumentName literal arguments (true, false, null, numbers) in calls.Opt-in
lint/complexity/prefer-not-in-arrayUse ! in_array() instead of repeated !==/!= comparisons of one value joined by &&.lint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-null-coalesceUse ?? instead of isset()/array_key_exists() ternaries, if/return chains and foreach lookups.lint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-property-defaultMove property default from constructor to property defaultlint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-property-existsUse property_exists() instead of array_key_exists() or isset() on object properties.lint-recommendedlint-strictrector/code-quality
lint/complexity/prefer-simple-conditionSimplify a negated comparison or a comparison with a booleanlint-essentiallint-recommendedlint-strictrector/code-qualityrector/dead-code
lint/complexity/require-attribute-argument-orderSort named arguments in PHP 8 attributes to match their declaration orderlint-recommendedlint-strictrector/code-qualityrector/named-args
lint/complexity/require-consistent-returnAdd explicit return null to method/function that returns a value, but missed main returnlint-recommendedlint-strictrector/code-quality
lint/complexity/require-is-a-allow-stringComplete missing 3rd argument in case is_a() function in case of stringslint-recommendedlint-strictrector/code-quality
lint/complexity/require-named-argument-orderOrder named arguments as the parameters are declared.lint-recommendedlint-strictrector/code-qualityrector/named-args
lint/complexity/require-previous-exceptionWhen throwing into a catch block, checks that the previous exception is passed to the new throw clauselint-recommendedlint-strictrector/code-quality
lint/control-flow/no-assign-in-conditionDetects assignments in conditions. They can cause unexpected behavior and make the code harder to read.lint-essentiallint-recommendedlint-strict
lint/control-flow/no-else-after-returnDrop the else after a branch that always returns, throws or exits, and move its body after the if.lint-recommendedlint-strictrector/code-quality
lint/control-flow/no-empty-catchReport an empty catch block, which swallows the exception.lint-essentiallint-recommendedlint-strict
lint/control-flow/no-for-init-overwriteDisallows a for loop's init expression overwriting a variable that is already defined.lint-essentiallint-recommendedlint-strict
lint/control-flow/no-loop-variable-overwriteDisallows a foreach key or value variable overwriting a variable that is already defined.lint-essentiallint-recommendedlint-strict
lint/control-flow/no-return-assignmentLocal, dynamic and directly referenced variables should not be assigned and directly returned by a function or method.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/control-flow/no-superfluous-elseifReplaces superfluous elseif with if.lint-essentiallint-recommendedlint-strict
lint/control-flow/no-switch-continueSwitch case must not be ended with continue but with break.lint-recommendedlint-strictrector/php52
lint/control-flow/no-unsafe-finallyDetects control flow statements in finally blocks.lint-essentiallint-recommendedlint-strict
lint/control-flow/no-useless-elseThere should not be useless else cases.lint-strict
lint/control-flow/no-useless-returnThere should not be an empty return statement at the end of a function.lint-essentiallint-recommendedlint-strict
lint/control-flow/prefer-bare-returnA return statement wishing to return void should not return null.Opt-in
lint/control-flow/prefer-bool-returnSimplify if control structures that return the boolean result of their condition.lint-recommendedlint-strictrector/code-quality
lint/control-flow/prefer-combined-issetUsing isset($var) && multiple times should be done in one call.lint-recommendedlint-strict
lint/control-flow/prefer-combined-unsetCalling unset on multiple items should be done in one call.lint-recommendedlint-strict
lint/control-flow/prefer-yield-fromIf the function explicitly returns an array, and has the return type iterable, then yield from must be used instead of return.lint-recommendedlint-strict
lint/dead-code/no-always-false-conditionReduce always false in a if (a || b) conditionlint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-always-true-ifRemove if condition that is always truelint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-always-true-instanceofRemove instanceof checks and assert(instanceof) calls that are always true for the known type.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-and-trueRemove and true that has no added valuelint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-cast-in-concatRemove (string) casting when it comes to concat, that does this by defaultlint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-condition-exact-returnRemove an if that returns the value it compares when the next statement returns the compared expression.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-dead-catchRemove dead catcheslint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-dead-php-version-checkRemove PHP_VERSION_ID / version_compare() checks that are always true for the configured PHP version.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-double-self-assignmentRemove duplicated self assign of the same variablelint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-duplicate-array-keyRemove duplicated key in defined arrayslint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-duplicate-case-body2 following switch keys with identical will be reduced to one resultlint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-empty-blockRemove or report if/for/foreach/while statements with an empty body.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-empty-methodRemove empty class methods not required by parentslint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-false-ternaryChange ternary of bool : false to && boollint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-future-php-version-checkUnwrap if checks on a PHP version that the configured PHP version always meets.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-identical-branchesRemove if/else if they have same contentlint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-implode-ternaryDrop an empty-array ternary around implode()lint-recommendedlint-strictrector/code-quality
lint/dead-code/no-invalid-return-tagRemove @return docblock that contradicts the declared native return typelint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-invalid-var-tagRemoves non-existing @var annotations above the codelint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-null-tag-valueRemove @var/@param/@return null docblocklint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-overridden-assign-before-ifRemove assign before if/else that overrides the variable in both brancheslint-strictrector/dead-code
lint/dead-code/no-parent-call-without-parentRemove unused parent call with no parent classlint-essentiallint-recommendedlint-strictrector/dead-coderector/php80
lint/dead-code/no-redundant-conditionMerge an if into the if before it when both check the same condition.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-redundant-default-argumentRemove arguments that equal the parameter default value.lint-essentiallint-recommendedlint-strictrector/dead-coderector/named-args
lint/dead-code/no-redundant-foreach-guardRemove unused if check to non-empty array before foreach of the arraylint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-redundant-node-instanceofRemove refactor() method of Rector rule double check of $classMethod instance, if already defined in @param typerector/rector-preset
lint/dead-code/no-redundant-promoted-assignRemove useless re-assign from property promotionlint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-redundant-property-defaultRemove redundant default value from property that is always assigned in the constructorlint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-redundant-type-checkRemove is_<type>() check that can never fail on already known typelint-strictrector/dead-code
lint/dead-code/no-return-in-constructorRemove useless return Expr in __construct()lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-self-assignmentDetects and removes self-assignments where a variable or property is assigned to itself.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-typed-property-instanceofRemove dead instanceof check on type hinted propertylint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-unreachable-codeRemove unreachable statementslint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-unused-assignmentRemove assignments whose value is never read, including stores overwritten before use.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-unused-constructor-paramRemove unused parameter in constructorlint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-unused-expressionRemove dead code statementslint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-unused-foreach-keyRemove unused key in foreachlint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-unused-globalFlags global $x; declarations whose name is never read or writtenlint-essentiallint-recommendedlint-strict
lint/dead-code/no-unused-private-constantRemove unused class constantslint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-unused-private-methodRemove unused private methodlint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-unused-private-method-paramRemove unused parameters of private methods, including test-method parameters overwritten before use.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-unused-private-propertyRemove unused private propertieslint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-unused-promoted-propertyRemove unused promoted propertylint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-unused-public-method-paramRemove unused parameter in public method on final class without extends and interfacelint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-unused-return-typeNarrow overly wide union return type declaration if possiblelint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-unused-return-valueDetects private methods whose return value is thrown away at every call site.lint-essentiallint-recommendedlint-strict
lint/dead-code/no-unused-staticFlags static $x; declarations whose name is never read or writtenlint-essentiallint-recommendedlint-strict
lint/dead-code/no-useless-castRemove casts to the type the value already has, including (string) inside concatenation.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-useless-catchRemove dead try/catchlint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-useless-conditionRemove if conditions whose branches return the same value.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-useless-continueRemove continue as the last statement of a loop.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-useless-filter-varRemoves filter_var() calls with exact typelint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-useless-mathRemove arithmetic that does not change the value (+ 0, * 1, ...).lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-useless-overrideRemove methods and constructors that only call the parent with the same arguments.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-useless-phpdoc-typeRemove PHPDoc types that add nothing over the native type (@var null, unions wider than the native return type).lint-essentiallint-recommendedlint-strictrector/dead-code
lint/dead-code/no-useless-ternarySimplify ternaries whose result does not depend on the condition, or that equal a boolean expression.lint-essentiallint-recommendedlint-strictrector/code-qualityrector/dead-code
lint/faker-1/no-faker-property-accessReplace deprecated faker property fetch with method callrector-laravel/faker-10
lint/functions/add-attribute-argument-namesConvert positional arguments on attributes into named arguments, using the attribute constructor parameter namesrector/named-args
lint/functions/add-boolean-argument-nameAdd parameter names to boolean arguments.rector/named-args
lint/functions/add-null-argument-nameAdd parameter names to null arguments.rector/named-args
lint/functions/no-assign-in-argumentDetects assignments in function call arguments. They can cause unexpected behavior and make the code harder to read.lint-essentiallint-recommendedlint-strict
lint/functions/no-call-user-func-methodRefactor call_user_func() on known class method to a method calllint-strictrector/coding-style
lint/functions/no-extra-argumentsRemove extra parameterslint-recommendedlint-strictrector/code-qualityrector/php71
lint/functions/no-missing-format-argumentDetects sprintf-style format calls where the number of placeholderslint-essentiallint-recommendedlint-strict
lint/functions/no-required-after-optionalReport or fix optional parameters declared before required ones.lint-recommendedlint-strictrector/code-qualityrector/php80
lint/functions/no-swapped-explode-argumentsDetects explode calls whose arguments appear to be swapped.lint-essentiallint-recommendedlint-strict
lint/functions/no-unreachable-default-argument-valueIn function arguments there must not be arguments with default values before non-default ones.lint-strict
lint/functions/no-unused-closure-useLambda must not import variables it doesn't use.lint-essentiallint-recommendedlint-strictrector/dead-code
lint/functions/no-void-reference-returnDetects functions, methods, closures, arrow functions, and set property hooks that return by reference from a void function.lint-recommendedlint-strict
lint/functions/require-array-filter-callbackRequires a callback for array_filter(): without one it drops every falsy value, not only null.lint-essentiallint-recommendedlint-strict
lint/functions/require-assert-descriptionDetects assert functions that do not have a description.Opt-in
lint/functions/require-strict-array-searchMakes array_search search for identical elementslint-essentiallint-recommendedlint-strictrector/coding-style
lint/functions/require-strict-function-callRequires the strict flag of in_array(), array_search(), array_keys() with a search value and base64_decode().lint-essentiallint-recommendedlint-strict
lint/functions/require-strict-in-arraySet in_array strict to true when defined on similar typelint-essentiallint-recommendedlint-strictrector/coding-style
lint/imports/no-unusedUnused use statements must be removed.lint-essentiallint-recommendedlint-strict
lint/laravel-10/no-expression-string-castConvert DB Expression string casts to getValue() method calls.rector-laravel/laravel-100rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributes
lint/laravel-10/no-expression-to-stringConvert DB Expression __toString() calls to getValue() method calls.rector-laravel/laravel-100rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributes
lint/laravel-10/prefer-assert-sent-timesReplace assertTimesSent with assertSentTimesrector-laravel/laravel-100rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributes
lint/laravel-10/prefer-date-castsUnify Model $dates property with $castsrector-laravel/laravel-100rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributes
lint/laravel-10/prefer-dispatch-syncDispatch non ShouldQueue jobs to dispatchSyncrector-laravel/laravel-100rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributes
lint/laravel-10/prefer-facade-fakeReplace withoutJobs, withoutEvents and withoutNotifications with Facade fakerector-laravel/laravel-100rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributes
lint/laravel-10/prefer-fake-over-expectsReplace expectJobs and expectEvents methods in testsrector-laravel/laravel-100rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributes
lint/laravel-11/prefer-assert-see-htmlReplace assertSee with assertSeeHtml when testing HTML with escape set to falserector-laravel/laravel-110rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributes
lint/laravel-11/prefer-casts-methodRefactor Model $casts property with casts() methodrector-laravel/laravel-110rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributes
lint/laravel-11/prefer-geometry-columnrefactors calls with the pre Laravel 11 methods for blueprint geometry columnsrector-laravel/laravel-110rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributes
lint/laravel-11/prefer-queueable-traitReplace Dispatchable, InteractsWithQueue, Queueable, and SerializesModels traits with the Queueable traitrector-laravel/laravel-110rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributes
lint/laravel-12/prefer-scope-attributeChanges model scope methods to use the scope attributerector-laravel/laravel-120rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributes
lint/laravel-5.7/add-login-event-guardAdd new $guard argument to Illuminate\Auth\Events\Loginrector-laravel/laravel-57rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-57rector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/laravel-5.7/add-mock-console-output-falseAdd "$this->mockConsoleOutput = false"; to console tests that work with output contentrector-laravel/laravel-57rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-57rector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/laravel-5.7/add-parent-boot-callAdd parent::boot(); call to boot() class method in child of Illuminate\Database\Eloquent\Modelrector-laravel/laravel-57rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-57rector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/laravel-5.7/add-where-timeRefactor whereDate() queries to include both date and time comparisons with Carbonrector-laravel/laravel-57rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-57rector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/laravel-5.7/prefer-permanent-redirectChange "redirect" call with 301 to "permanentRedirect"rector-laravel/laravel-57rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-57rector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/laravel-5.8/prefer-deferrable-providerChange deprecated $defer = true; to Illuminate\Contracts\Support\DeferrableProvider interfacerector-laravel/laravel-58rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/laravel-8/add-parent-register-callAdd parent::register(); call to register() class method in child of Illuminate\Foundation\Support\Providers\EventServiceProviderrector-laravel/laravel-80rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/laravel-8/prefer-factory-classesUpgrade legacy factories to support classes.rector-laravel/laravel-legacy-factories-to-classes
lint/laravel-8/prefer-factory-state-methodsCall the state methods directly instead of specify the name of state.rector-laravel/laravel-legacy-factories-to-classes
lint/laravel-8/prefer-model-factory-methodUse the static factory method instead of global factory function.rector-laravel/laravel-legacy-factories-to-classes
lint/laravel-9/prefer-attribute-accessorMigrate to the new Model attributes syntaxrector-laravel/laravel-90rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-90
lint/laravel-9/prefer-fake-helperReplace $this->faker with the fake() helper function in Factoriesrector-laravel/laravel-90rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-90
lint/laravel/add-factory-extends-phpdocAdds the @extends annotation to Factories.rector-laravel/laravel-90rector-laravel/laravel-factoriesrector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-90
lint/laravel/add-has-factory-traitAdds the HasFactory trait to Models.rector-laravel/laravel-factories
lint/laravel/add-legacy-relation-genericsAdd generic return type to relations in child of Illuminate\Database\Eloquent\Modellint-strictrector-laravel/laravel-type-declarations
lint/laravel/add-new-relation-genericsAdd generic return type to relations in child of Illuminate\Database\Eloquent\Modellint-strictrector-laravel/laravel-type-declarations
lint/laravel/add-query-closure-typeType-hint the closure parameter of Eloquent where()/whereHas() and similar query methods.lint-strictrector-laravel/laravel-type-declarations
lint/laravel/add-relation-genericsAdd generic return type to relations in child of Illuminate\Database\Eloquent\Modellint-strictrector-laravel/laravel-type-declarations
lint/laravel/add-relation-query-closure-typeAdd type hinting to where relation has methods e.g. whereHas, orWhereHas, whereDoesntHave, orWhereDoesntHave, whereHasMorph, orWhereHasMorph, whereDoesntHaveMorph, orWhereDoesntHaveMorphlint-strictrector-laravel/laravel-type-declarations
lint/laravel/add-scope-builder-genericsAdd generic Builder return type to scopes in child of Illuminate\Database\Eloquent\Modellint-strictrector-laravel/laravel-type-declarations
lint/laravel/add-tap-closure-typeAutomatically type hints your tappable closureslint-strictrector-laravel/laravel-type-declarations
lint/laravel/no-app-array-accessReplace magical call on $this->app["something"] to standalone type assign variablelint-strictrector-laravel/laravel-code-quality
lint/laravel/no-collection-aliasesUse the base collection methods instead of their aliases.lint-strictrector-laravel/laravel-collection
lint/laravel/no-controller-middlewareThis rule warns against applying middlewares in controllers.Opt-in
lint/laravel/no-default-authorizeRemove the authorize() method from FormRequest classes when it only returns true, as passesAuthorization() defaults to true when the method does not existlint-recommendedlint-strictrector-laravel/laravel-code-quality
lint/laravel/no-dump-callsRemoves dd() and dump() calls (or the configured functions) from the code.Opt-in
lint/laravel/no-factory-model-propertyRemoves the $model property from Factories.Opt-in
lint/laravel/no-implicit-model-queryStart Eloquent queries with Model::query() instead of static magic calls.lint-strictrector-laravel/laravel-eloquent-magic-method-to-query-builder
lint/laravel/no-negated-blank-filledSwap the use of NotBooleans used with filled() and blank() to the correct helper.lint-strictrector-laravel/laravel-code-quality
lint/laravel/no-negated-containsConvert negated calls to contains to doesntContain, or vice versa.lint-strictrector-laravel/laravel-collection
lint/laravel/no-negated-filterAvoid negated conditionals in filter() by using reject(), or vice versa.lint-strictrector-laravel/laravel-collection
lint/laravel/no-negated-whenReverse conditionable method callslint-strictrector-laravel/laravel-code-quality
lint/laravel/no-request-allDetects the use of $request->all() or Request::all() in Laravel applications.lint-recommendedlint-strict
lint/laravel/no-useless-value-callRemoves redundant value helper callslint-strictrector-laravel/laravel-code-quality
lint/laravel/no-useless-with-callRemoves redundant with helper callslint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-abort-ifChange if abort to abort_ifrector-laravel/laravel-if-helpers
lint/laravel/prefer-aliases-attributeChanges the aliases property to use the Aliases attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-anonymous-migrationPrefer using anonymous classes for Laravel migrations instead of named classes.lint-recommendedlint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-appends-attributeChanges model appends property to use the appends attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-array-validation-rulesUse array syntax for validation rules instead of 'a|b' strings.lint-recommendedlint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-back-helperReplace redirect()->back() and Redirect::back() with back()lint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-backoff-attributeChanges the backoff property to use the Backoff attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-blank-filledReplace use of the unsafe empty() function with Laravel's safer blank() & filled() functions.Opt-in
lint/laravel/prefer-cache-secondsChange minutes argument to seconds in Illuminate\Contracts\Cache\Store and Illuminate\Support\Facades\CacheOpt-in
lint/laravel/prefer-callable-route-actionUse PHP callable syntax instead of string syntax for controller route declarations.Opt-in
lint/laravel/prefer-casts-methodDetects the $casts property on an Eloquent model. Laravel 11 introduced the casts()lint-recommendedlint-strict
lint/laravel/prefer-class-container-keyChanges the string or class const used for a service container make callrector-laravel/laravel-container-string-to-fully-qualified-name
lint/laravel/prefer-closure-only-bindDrop the specified abstract class from the bind method and replace it with a closure that returns the abstract class.rector-laravel/laravel-120rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributes
lint/laravel/prefer-collected-by-attributeChanges model newCollection method to use the CollectedBy attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-collection-allConvert toArray() to all() when the collection does not contain any Arrayable objects.lint-strictrector-laravel/laravel-collection
lint/laravel/prefer-collection-is-emptyConvert collection count() comparisons against 0 or 1 to isEmpty() or isNotEmpty()lint-strictrector-laravel/laravel-collection
lint/laravel/prefer-collects-attributeChanges the collects property to use the Collects attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-command-hidden-attributeChanges the hidden property to use the Hidden attribute on console commandsrector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-components-propertyUse $this->components property within commandsOpt-in
lint/laravel/prefer-connection-attributeChanges model connection property to use the Connection attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-constructor-injectionMove help facade-like function calls to constructor injectionrector-laravel/laravel-static-to-injection
lint/laravel/prefer-container-method-callChange array access on the container to the matching method call, as the contract does not extend ArrayAccessrector-laravel/laravel-arrayaccess-to-method-call
lint/laravel/prefer-date-facadeRefactor Carbon static method calls to use the Date facade instead.lint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-date-format-attributeChanges model dateFormat property to use the DateFormat attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-date-shorthandReplace date comparison where clauses with Laravel query builder shorthand methods.Opt-in
lint/laravel/prefer-dedicated-status-assertionUse assertOk(), assertNotFound() and similar instead of assertStatus(200).lint-recommendedlint-strictrector-laravel/laravel-testing
lint/laravel/prefer-default-argumentApply default instead of null coalescelint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-delay-attributeChanges the delay property to use the Delay attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-delete-when-missing-models-attributeChanges the deleteWhenMissingModels property to use the DeleteWhenMissingModels attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-description-attributeChanges the description property to use the Description attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-dispatch-helperUse the event or dispatch helpers instead of the static dispatch method.lint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-env-helperChange env variable to env static calllint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-environment-checkReplace app environment comparison with parameter or method calllint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-error-bag-attributeChanges the errorBag property to use the ErrorBag attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-exception-class-stringchanges use of a new throw instance to class stringlint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-explicit-json-callChange method calls from $this->json to $this->postJson, $this->putJson, etc.lint-strictrector-laravel/laravel-testing
lint/laravel/prefer-facade-over-appChange app() func calls to facade callsrector-laravel/laravel-static-to-injection
lint/laravel/prefer-fail-on-timeout-attributeChanges the failOnTimeout property to use the FailOnTimeout attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-fake-helperUse the fake() helper instead of $this->faker.lint-strict
lint/laravel/prefer-file-facade-deleteUse the File facade instead of the unlink() function.lint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-fillable-attributeChanges model fillable property to use the fillable attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-forwards-callsReplaces the use of call_user_func and call_user_func_array method with the CallForwarding traitOpt-in
lint/laravel/prefer-guarded-attributeChanges model guarded property to use the guarded attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-help-attributeChanges the help property to use the Help attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-hidden-attributeChanges model hidden property to use the hidden attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-job-connection-attributeChanges the connection property to use the Connection attribute on queue jobsrector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-json-responseUse new JsonResponse instead of response()->json()Opt-in
lint/laravel/prefer-latest-oldestChanges orderBy() to latest() or oldest()lint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-max-exceptions-attributeChanges the maxExceptions property to use the MaxExceptions attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-nullsafeConvert simple calls to optional helper to use the nullsafe operatorlint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-pivot-classPlannedChanges the pivot table name of a many to many relation to the pivot model class.lint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-preserve-keys-attributeChanges the preserveKeys property to use the PreserveKeys attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-protected-model-methodsMakes Model attributes and scopes protectedlint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-queue-attributeChanges the queue property to use the Queue attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-report-ifChange if report to report_ifrector-laravel/laravel-if-helpers
lint/laravel/prefer-repository-method-callChange array access on a config or cache repository to the matching method call, as the contracts do not extend ArrayAccessrector-laravel/laravel-arrayaccess-to-method-call
lint/laravel/prefer-request-facadeUse the Request facade instead of $_GET, $_POST and $_SERVER.lint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-request-serverChange server variable to Request facade's server methodlint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-request-validateChange Request::validate() and request() to an injected $request. Adds a Request $request parameter to the method, so update its callers.rector-laravel/laravel-static-to-injection
lint/laravel/prefer-resolve-helperConvert app() to resolve() where applicable.lint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-route-key-attributeChanges model getRouteKeyName() method to use the RouteKey attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-session-facadeChange PHP session usage to Session Facade methodslint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-signature-attributeChanges the signature property to use the Signature attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-sleep-facadeUse Sleep::sleep() and Sleep::usleep() instead of the sleep() and usleep() function.lint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-stop-on-first-failure-attributeChanges the stopOnFirstFailure property to use the StopOnFirstFailure attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-str-starts-withUse Str::startsWith() or Str::endsWith() instead of substr() === $strlint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-table-attributeChanges model table-related properties to use the Table attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-throw-ifChange if throw to throw_ifrector-laravel/laravel-if-helpers
lint/laravel/prefer-timeout-attributeChanges the timeout property to use the Timeout attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-to-route-helperReplace redirect()->route("home") and Redirect::route("home") with to_route("home")lint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-todayUse today() instead of now()->startOfDay()lint-strictrector-laravel/laravel-code-quality
lint/laravel/prefer-touches-attributeChanges model touches property to use the touches attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-travel-toUse the $this->travelTo() method in Laravel's TestCase class instead of the Carbon::setTestNow() method.lint-strictrector-laravel/laravel-testing
lint/laravel/prefer-tries-attributeChanges the tries property to use the Tries attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-typed-assert-closureChanges assert calls to use a type hinted closure.lint-strictrector-laravel/laravel-testing
lint/laravel/prefer-typed-configRefactor config() calls to use type-specific methods when the expected type is knownOpt-in
lint/laravel/prefer-unguarded-attributeChanges model empty guarded property to use the Unguarded attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-unique-for-attributeChanges the uniqueFor property to use the UniqueFor attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-view-arrayPrefer passing data to views using the array parameter in the view() function,Opt-in
lint/laravel/prefer-visible-attributeChanges model visible property to use the Visible attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-where-likeChanges where method and static calls to whereLike calls in the Eloquent & Query Builder.Opt-in
lint/laravel/prefer-where-nullConvert to where comparison to whereNull method callOpt-in
lint/laravel/prefer-without-incrementing-attributeChanges model incrementing = false property to use the WithoutIncrementing attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/prefer-without-timestamps-attributeChanges model timestamps = false property to use the WithoutTimestamps attributerector-laravel/laravel-130rector-laravel/laravel-130-attributesrector-laravel/up-to-laravel-130
lint/laravel/require-final-controllerEnforces that controller classes are declared as final.Opt-in
lint/laravel/require-phpdoc-types-onlyKeeps only type annotations in PHPDoc.Opt-in
lint/livewire-3/prefer-computed-attributeConverts the computed methods of a Livewire component to use the Computed Attributerector-laravel/livewire-30rector-laravel/up-to-livewire-30
lint/livewire-3/prefer-url-attributeConverts the $queryString property of a Livewire component to use the Url Attributerector-laravel/livewire-30rector-laravel/up-to-livewire-30
lint/lumen/prefer-middleware-arrayChanges middlewares from rule definitions from string to array notation.rector-laravel/lumen
lint/lumen/prefer-uses-arrayChanges action in rule definitions from string to array notation.rector-laravel/lumen
lint/operators/no-and-or-keywordsUse && and || logical operators instead of and and or.lint-strictrector/code-quality
lint/operators/no-error-suppressionError control operator should be added to deprecation notices and/or removed from other cases.lint-strict
lint/operators/no-loose-equalityDisallows the loose comparison operators == and !=; use === and !==.lint-essentiallint-recommendedlint-strict
lint/operators/no-useless-nullsafeThere should not be useless Null-safe operator ?-> used.lint-essentiallint-recommendedlint-strict
lint/operators/prefer-coalesceUse null coalescing operator ?? where possible.lint-recommendedlint-strictrector/php70
lint/operators/prefer-coalesce-assignUse the null coalescing assignment operator ??= where possible.lint-recommendedlint-strictrector/php74
lint/operators/prefer-coalesce-assign-over-fallbackSuggests the null coalescing assignment operator (??=) when the right operand of ?? assigns to the same variable or property as its left operand.lint-recommendedlint-strict
lint/performance/prefer-explode-over-preg-splitDetects calls to preg_split() whose pattern has no regex meta-characters and no modifiers, which means the split could be done with explode().lint-recommendedlint-strict
lint/performance/prefer-static-closureLambdas not (indirectly) referencing $this must be declared static.Opt-in
lint/performance/require-qualified-native-constantAdd leading \ before constant invocation of internal constant to speed up resolving. Constant name match is case-sensitive, except for null, false and true.Opt-in
lint/performance/require-qualified-native-functionAdd leading \ before function invocation to speed up resolving.Opt-in
lint/pest/no-before-all-in-describeReplaces invalid beforeAll() and afterAll() hooks inside describe() with beforeEach() and afterEach()lint-recommendedlint-strictpest/coding-style
lint/pest/no-invalid-repeatNormalizes invalid literal repeat() counts to 1lint-recommendedlint-strictpest/coding-style
lint/pest/no-negated-boolean-matcherSimplifies double-negative expectations like ->not->toBeFalse() to ->toBeTrue()lint-recommendedlint-strictpest/coding-style
lint/pest/no-onlyRemove ->only() from Pest tests.lint-strictpest/coding-style
lint/pest/no-redundant-type-expectationRemoves redundant literal type expectations when a later matcher keeps the chain meaningfullint-recommendedlint-strictpest/coding-style
lint/pest/no-redundant-usesRemoves redundant local Pest uses already configured globally in tests/Pest.phplint-recommendedlint-strictpest/coding-style
lint/pest/no-static-test-closureRemoves static from Pest test and hook callbacks that use the test case instancelint-recommendedlint-strictpest/coding-style
lint/pest/prefer-chained-expectChains consecutive expect() calls into a single chained expectation, combining calls on the same value and joining different values with ->and() (configurable)lint-recommendedlint-strictpest/coding-style
lint/pest/prefer-dedicated-expectationUse dedicated Pest matchers (toBeArray(), toStartWith(), toHaveCount(), ...) instead of expect(fn(...))->toBeTrue().lint-strict
lint/pest/prefer-deferReplaces deprecated ->tap() method with ->defer() for Pest v3 migrationlint-recommendedlint-strictpest/coding-style
lint/pest/prefer-each-modifierConverts foreach loops with expect() calls to use the ->each modifierlint-recommendedlint-strictpest/coding-style
lint/pest/prefer-expectConverts $this->assert*() calls to Pest expect() chainslint-recommendedlint-strictpest/coding-style
lint/pest/prefer-extendConverts uses() and pest()->uses() to pest()->extend() for classes and pest()->use() for traitslint-recommendedlint-strictpest/coding-style
lint/pest/prefer-filesystem-matchersSimplifies combined filesystem checks to single Pest matcherslint-strictpest/coding-style
lint/pest/prefer-not-modifierSimplifies negated expectations by flipping the matcher (e.g., expect(!$x)->toBeTrue() becomes expect($x)->toBeFalse())lint-recommendedlint-strictpest/coding-style
lint/pest/prefer-separate-expectsSplits ->and() calls in expect() chains into separate expect() statementsOpt-in
lint/pest/prefer-sequenceConverts consecutive indexed expect() calls to sequence()lint-recommendedlint-strictpest/coding-style
lint/pest/prefer-simpler-expectationSimplify Pest expectations: expect($a > $b)->toBeTrue() becomes expect($a)->toBeGreaterThan($b), and similar.lint-recommendedlint-strictpest/coding-style
lint/pest/prefer-specific-expectationsUse toBeTrue()/toBeFalse()/toBeNull() instead of toBe(true|false|null).lint-recommendedlint-strictpest/coding-style
lint/pest/prefer-strict-equality-matchersConverts strict equality expressions to toBe() matcherlint-recommendedlint-strictpest/coding-style
lint/pest/prefer-to-be-alphaConverts ctype_alpha() checks to toBeAlpha() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-alpha-numericConverts ctype_alnum() checks to toBeAlphaNumeric() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-betweenConverts expect($value >= $min && $value <= $max)->toBeTrue() to expect($value)->toBeBetween($min, $max)lint-recommendedlint-strictpest/coding-style
lint/pest/prefer-to-be-digitsConverts ctype_digit() checks to toBeDigits() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-directoryConverts is_dir() checks to toBeDirectory() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-emptyConverts empty checks and count-zero comparisons to toBeEmpty() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-fileConverts is_file() checks to toBeFile() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-inConverts strict in_array() checks to the toBeIn() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-infiniteConverts is_infinite() checks to toBeInfinite() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-instance-ofConverts expect($obj instanceof User)->toBeTrue() to expect($obj)->toBeInstanceOf(User::class)lint-recommendedlint-strictpest/coding-style
lint/pest/prefer-to-be-jsonConverts json_decode() null checks to toBeJson() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-listConverts array_is_list() checks to toBeList() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-lowercaseConverts strtolower() equality checks to toBeLowercase() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-nanConverts is_nan() checks to toBeNan() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-truthy-falsyConverts bool cast assertions to toBeTruthy()/toBeFalsy() matcherslint-recommendedlint-strictpest/coding-style
lint/pest/prefer-to-be-uppercaseConverts strtoupper() equality checks to toBeUppercase() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-urlConverts filter_var($url, FILTER_VALIDATE_URL) checks to toBeUrl() matcherlint-strictpest/coding-style
lint/pest/prefer-to-be-uuidConverts UUID regex validation to toBeUuid() matcherlint-strictpest/coding-style
lint/pest/prefer-to-containConverts in_array() checks to toContain() matcherlint-strictpest/coding-style
lint/pest/prefer-to-contain-equalConverts in_array(..., false) checks to toContainEqual() matcherlint-strictpest/coding-style
lint/pest/prefer-to-contain-only-instances-ofConverts ->each->toBeInstanceOf() pattern to toContainOnlyInstancesOf() matcherlint-strictpest/coding-style
lint/pest/prefer-to-end-withConverts str_ends_with() checks to toEndWith() matcherlint-strictpest/coding-style
lint/pest/prefer-to-equal-canonicalizingConverts sort-then-compare to toEqualCanonicalizing() matcherlint-strictpest/coding-style
lint/pest/prefer-to-equal-with-deltaConverts expect(abs($a - $b) < $delta)->toBeTrue() to expect($a)->toEqualWithDelta($b, $delta).lint-recommendedlint-strictpest/coding-style
lint/pest/prefer-to-have-countConverts expect(count($arr))->toBe(5) to expect($arr)->toHaveCount(5)lint-strictpest/coding-style
lint/pest/prefer-to-have-keyConverts array_key_exists() checks to toHaveKey() matcherlint-strictpest/coding-style
lint/pest/prefer-to-have-keysConverts chained toHaveKey() calls to toHaveKeys() with array of keyslint-recommendedlint-strictpest/coding-style
lint/pest/prefer-to-have-lengthConverts strlen()/mb_strlen() comparisons to toHaveLength() matcherlint-strictpest/coding-style
lint/pest/prefer-to-have-method-on-classChanges expect($object)->toHaveMethod() to expect($object::class)->toHaveMethod() for Pest v3lint-recommendedlint-strictpest/coding-style
lint/pest/prefer-to-have-propertiesConverts chained toHaveProperty() calls to toHaveProperties() with array of propertieslint-recommendedlint-strictpest/coding-style
lint/pest/prefer-to-have-propertyConverts property_exists() checks to toHaveProperty() matcherlint-strictpest/coding-style
lint/pest/prefer-to-have-same-sizeConverts expect(count($a))->toBe(count($b)) to expect($a)->toHaveSameSize($b)lint-strictpest/coding-style
lint/pest/prefer-to-matchConverts expect(preg_match("/pattern/", $str))->toBe(1) to expect($str)->toMatch("/pattern/")lint-strictpest/coding-style
lint/pest/prefer-to-match-arrayConverts multiple array element assertions to toMatchArray() matcherlint-recommendedlint-strictpest/coding-style
lint/pest/prefer-to-match-objectConverts consecutive toHaveProperty() with values to toMatchObject() matcherlint-recommendedlint-strictpest/coding-style
lint/pest/prefer-to-start-withConverts str_starts_with() checks to toStartWith() matcherlint-strictpest/coding-style
lint/pest/prefer-to-throwUse expect()->toThrow() instead of expectException() or try/catch in Pest tests.lint-recommendedlint-strictpest/coding-style
lint/pest/prefer-type-matchersConverts expect(is_array($x))->toBeTrue() to expect($x)->toBeArray()lint-strictpest/coding-style
lint/pest/require-type-matcher-firstEnsure type-check matchers (e.g. toBeInt, toBeInstanceOf) appear before value assertions in expect() chains and consecutive expectslint-recommendedlint-strictpest/coding-style
lint/php-5.3/no-http-varsRename old $HTTP_* variable names to new replacementslint-recommendedlint-strictrector/php53
lint/php-5.5/no-class-magic-constantChange __CLASS__ to self::classlint-recommendedlint-strictrector/php55
lint/php-5.5/prefer-self-over-get-called-classChange get_called_class() to self::class on final classlint-strictrector/php55
lint/php-5.5/prefer-static-over-get-called-classChange get_called_class() to static::class on non-final classlint-recommendedlint-strictrector/php55
lint/php-7.0/no-call-user-methodChanges call_user_method()/call_user_method_array() to call_user_func()/call_user_func_array()lint-recommendedlint-strictrector/php70
lint/php-7.0/no-list-from-stringlist() cannot split string directly anymore, use str_split()lint-recommendedlint-strictrector/php70
lint/php-7.0/prefer-braced-variable-variableEnsure variable variables are wrapped in curly braceslint-recommendedlint-strictrector/php70
lint/php-7.0/prefer-coalesce-returnChange if with isset and return to coalescelint-recommendedlint-strictrector/php70
lint/php-7.0/prefer-random-intChanges rand, srand, and getrandmax to newer alternativeslint-strictrector/php70
lint/php-7.0/prefer-spaceshipUse <=> spaceship instead of ternary with same effectlint-recommendedlint-strictrector/php70
lint/php-7.0/prefer-spaceship-returnChanges if/else to spaceship <=> where usefullint-recommendedlint-strictrector/php70
lint/php-7.0/prefer-static-method-callChanges $this->call() to static method to static calllint-recommendedlint-strictrector/php70
lint/php-7.0/prefer-throwable-handlerChange typehint from Exception to Throwablelint-strictrector/php70
lint/php-7.0/prefer-timeRenames mktime() without arguments to time()lint-recommendedlint-strictrector/php70
lint/php-7.1/no-append-to-stringString cannot be turned into array by assignment anymorelint-strictrector/php71
lint/php-7.1/no-non-numeric-string-operandChange binary operation between some number + string to PHP 7.1 compatible versionlint-strictrector/php71
lint/php-7.1/prefer-is-iterableChanges is_array + Traversable check to is_iterablelint-recommendedlint-strictrector/php71
lint/php-7.1/prefer-multi-catchChange multiple catch statements of the same exception to a single one | separatedlint-recommendedlint-strictrector/php71
lint/php-7.2/no-constant-define-nameMake first argument of define() stringlint-recommendedlint-strictrector/php72
lint/php-7.2/no-eachReplace each() assign outside looplint-recommendedlint-strictrector/php72
lint/php-7.2/no-get-class-nullNull is no more allowed in get_class()lint-strictrector/php72
lint/php-7.2/no-list-eacheach() function is deprecated, use key() and current() insteadlint-recommendedlint-strictrector/php72
lint/php-7.2/no-string-assertString asserts must be passed directly to assert()lint-recommendedlint-strictrector/php72
lint/php-7.2/prefer-foreach-over-eachUse foreach() instead of deprecated each()lint-recommendedlint-strictrector/php72
lint/php-7.2/require-parse-str-resultUse $result argument in parse_str() functionlint-strictrector/php72
lint/php-7.3/no-case-insensitive-constantChange case insensitive constants to sensitive oneslint-strictrector/php73
lint/php-7.3/no-case-insensitive-defineChange case insensitive constant definition to sensitive onelint-recommendedlint-strictrector/php73
lint/php-7.3/no-heredoc-label-in-bodyChanges heredoc/nowdoc that contains closing word to safe wrapper namelint-recommendedlint-strictrector/php73
lint/php-7.3/no-unescaped-regex-dashEscape - in some caseslint-strictrector/php73
lint/php-7.3/prefer-array-key-firstMake use of array_key_first() and array_key_last()lint-strictrector/php-polyfillsrector/php73
lint/php-7.3/prefer-array-key-first-lastMake use of array_key_first() and array_key_last() instead of reading a single key off array_keys()lint-strictrector/php-polyfillsrector/php73
lint/php-7.3/prefer-is-countableChanges is_array + Countable check to is_countablelint-recommendedlint-strictrector/php-polyfillsrector/php73
lint/php-7.3/prefer-setcookie-optionsConvert setcookie argument to PHP7.3 option arraylint-recommendedlint-strictrector/php73
lint/php-7.3/require-string-needleMake needles explicit stringslint-strictrector/php73
lint/php-7.4/add-null-property-defaultAdd null default to properties with PHP 7.4 property nullable typelint-strictrector/php74
lint/php-7.4/no-array-key-exists-on-objectChange array_key_exists() on property to property_exists()lint-strictrector/php74
lint/php-7.4/no-filter-magic-quotesChange filter_var() with slash escaping to addslashes()lint-recommendedlint-strictrector/php74
lint/php-7.4/no-hebrevcChange hebrevc($str) to nl2br(hebrev($str))lint-recommendedlint-strictrector/php74
lint/php-7.4/no-mb-strrpos-encoding-offsetChange mb_strrpos() encoding argument positionlint-recommendedlint-strictrector/php74
lint/php-7.4/no-money-formatChange money_format() to equivalent number_format()lint-strictrector/php74
lint/php-7.4/no-reflection-exportChange export() to ReflectionFunction alternativeslint-recommendedlint-strictrector/php74
lint/php-7.4/no-restore-include-pathChange restore_include_path() to ini_restore("include_path")lint-recommendedlint-strictrector/php74
lint/php-7.4/prefer-arrow-functionChange closure to arrow functionlint-strictrector/php74
lint/php-7.4/prefer-coalesce-assign-over-ifChange if null guard with single assign to null coalescing assign ??=lint-recommendedlint-strictrector/php74
lint/php-8.0/no-int-get-headers-formatChange the integer associative argument of the get_headers() function to a booleanlint-recommendedlint-strictrector/php80
lint/php-8.0/no-unused-catch-variableRemove unused variable in catch()lint-recommendedlint-strictrector/php80
lint/php-8.0/no-version-compare-operator-aliasStreamline the operator argument of the version_compare() functionlint-recommendedlint-strictrector/php80
lint/php-8.0/prefer-get-debug-typeChange ternary type resolve to get_debug_type()lint-strictrector/php-polyfillsrector/php80
lint/php-8.0/prefer-matchChange switch() to match()lint-strictrector/php80
lint/php-8.0/prefer-nullsafe-over-ternaryChange null check ternary around a method call or property fetch to nullsafe operatorlint-strictrector/php80
lint/php-8.0/prefer-static-classChange $this::class to static::class or self::class depends on class modifierlint-recommendedlint-strictrector/php80
lint/php-8.0/prefer-str-contains-over-mb-strposReplace mb_strpos() !== false and mb_strstr() with str_contains()lint-strictrector/php-polyfills
lint/php-8.0/prefer-str-ends-withChange helper functions to str_ends_with()lint-strictrector/php-polyfillsrector/php80
lint/php-8.0/prefer-str-starts-withChange helper functions to str_starts_with()lint-strictrector/php-polyfillsrector/php80
lint/php-8.1/no-closure-from-callableChange Closure::fromCallable() to first class callable syntaxlint-recommendedlint-strictrector/php81
lint/php-8.1/no-null-preg-split-limitChange null to strict int defined preg_split limit arg function call argumentlint-recommendedlint-strictrector/php81
lint/php-8.1/no-null-string-argumentChange null to strict string defined function call argsOpt-in
lint/php-8.1/no-reflection-set-accessibleRemove Reflection::setAccessible() callslint-recommendedlint-strictrector/php81
lint/php-8.1/prefer-enum-case-over-myclabs-callRefactor MyCLabs enum fetch to Enum constlint-strictrector/php81
lint/php-8.1/prefer-enum-case-over-spatie-callRefactor Spatie enum method callslint-strictrector/php81
lint/php-8.1/prefer-enum-fromRefactor MyCLabs Enum using constructor for instantiationlint-strictrector/php81
lint/php-8.1/prefer-first-class-callableUse first-class callable syntax (strlen(...)) instead of closures, Closure::fromCallable() and string or array callables.Opt-in
lint/php-8.1/prefer-first-class-callable-argumentUpgrade string callback functions to first class callablelint-strictrector/php81
lint/php-8.1/prefer-first-class-callable-over-arrayUpgrade array callable to first class callablelint-strictrector/php81
lint/php-8.1/prefer-first-class-callable-over-arrow-functionConvert nested arrow function call to first class callablelint-strictrector/php81
lint/php-8.1/prefer-first-class-callable-over-closureConvert closure with sole nested call to first class callablelint-strictrector/php81
lint/php-8.1/prefer-native-enum-over-myclabsRefactor MyCLabs enum class to native Enumlint-strictrector/php81
lint/php-8.1/prefer-native-enum-over-spatieRefactor Spatie enum class to native Enumlint-strictrector/php81
lint/php-8.1/prefer-readonly-propertyDecorate read-only property with readonly attributelint-strictrector/php81
lint/php-8.2/add-skip-dots-flagPrior PHP 8.2 FilesystemIterator::SKIP_DOTS was always set and could not be removed, therefore FilesystemIterator::SKIP_DOTS is added in order to keep this behaviorlint-recommendedlint-strictrector/php82
lint/php-8.2/no-dollar-brace-interpolationReplace deprecated ${var} to {$var}lint-recommendedlint-strictrector/php82
lint/php-8.2/no-utf8-encode-decodeChange deprecated utf8_decode() and utf8_encode() to mb_convert_encoding()lint-recommendedlint-strictrector/php82
lint/php-8.2/prefer-readonly-classDecorate read-only class with readonly attributelint-strictrector/php82
lint/php-8.3/add-const-typeAdd type to constants based on their valuelint-recommendedlint-strictrector/php83
lint/php-8.3/prefer-dynamic-class-constantconstant(Example::class . '::' . $constName) to dynamic class const fetch Example::{$constName}lint-recommendedlint-strictrector/php83
lint/php-8.3/prefer-json-validateReplace json_decode($json, true) !== null && json_last_error() === JSON_ERROR_NONE with json_validate()lint-recommendedlint-strictrector/php-polyfillsrector/php83
lint/php-8.3/prefer-ldap-uriCombine separated host and port on ldap_connect() argslint-recommendedlint-strictrector/php83
lint/php-8.3/prefer-readonly-anonymous-classDecorate read-only anonymous class with readonly attributelint-recommendedlint-strictrector/php83
lint/php-8.3/prefer-self-classReplace calls to get_class() and get_parent_class() without arguments with self::class and parent::classlint-recommendedlint-strictrector/php83
lint/php-8.4/add-csv-escape-argumentAdd escape argument on CSV function callslint-recommendedlint-strictrector/php84
lint/php-8.4/prefer-array-findReplace foreach loops with array_find(), array_find_key(), array_any() or array_all() (PHP 8.4).lint-recommendedlint-strictrector/php-polyfillsrector/php84
lint/php-8.4/prefer-round-mode-enumReplace rounding mode constant to RoundMode enum in round()lint-recommendedlint-strictrector/php84
lint/php-8.5/no-finfo-buffer-contextRemove argument by position by function namelint-recommendedlint-strictrector/php85
lint/php-8.5/no-null-array-keyReplace null key in array_key_exists with empty stringlint-recommendedlint-strictrector/php85
lint/php-8.5/no-null-debug-infoReplaces null return value with empty array in __debugInfo methodslint-recommendedlint-strictrector/php85
lint/php-8.5/no-out-of-range-chrWrap chr() argument with % 256 to avoid deprecated out-of-range integerslint-recommendedlint-strictrector/php85
lint/php-8.5/prefer-array-first-lastMake use of array_first() and array_last()lint-recommendedlint-strictrector/php85
lint/php-8.5/prefer-ord-first-byteReplace ord($str) with ord($str[0])lint-recommendedlint-strictrector/php85
lint/php-8.6/prefer-clampConvert nested min()/max() calls to clamp()lint-recommendedlint-strictrector/php86
lint/php-8.6/prefer-readonly-property-defaultMove a constant constructor assignment of a readonly property to a property default valuelint-strictrector/php86
lint/phpdoc/add-missing-paramPHPDoc should contain @param for all params.lint-strict
lint/phpdoc/no-access@access annotations must be removed from PHPDoc.lint-strict
lint/phpdoc/no-empty-return@return void and @return null annotations must be removed from PHPDoc.lint-strict
lint/phpdoc/no-misplacedDocblocks should only be used on structural elements.lint-strict
lint/phpdoc/no-mixed-overruled-by-nativeRemove @param mixed and @return mixed docblock that duplicates an already declared native typelint-essentiallint-recommendedlint-strictrector/dead-code
lint/phpdoc/no-package@package and @subpackage annotations must be removed from PHPDoc.lint-strict
lint/phpdoc/no-superfluous-tagsRemoves @param, @return and @var tags that don't provide any useful information.lint-essentiallint-recommendedlint-strict
lint/phpdoc/no-useless-inheritdocClassy that does not inherit must not have @inheritdoc tags.lint-strict
lint/phpdoc/no-useless-paramRemove @param docblock with same type as parameter typelint-essentiallint-recommendedlint-strictrector/dead-code
lint/phpdoc/no-useless-readonlyRemove useless @readonly annotation on native readonly typelint-essentiallint-recommendedlint-strictrector/dead-code
lint/phpdoc/no-useless-returnRemove @return docblock with same type as defined in PHPlint-essentiallint-recommendedlint-strictrector/dead-code
lint/phpdoc/no-useless-varRemove unused @var annotation for properties and class constantslint-essentiallint-recommendedlint-strictrector/dead-code
lint/phpdoc/no-void-on-magic-methodRemove useless @return void docblock from magic methods __construct, __destruct, and __clonelint-essentiallint-recommendedlint-strictrector/dead-code
lint/phpdoc/require-no-named-argumentsThere must be @no-named-arguments tag in PHPDoc of a class/enum/interface/trait.Opt-in
lint/phpunit/add-allow-mock-objects-attributeAdd #[AllowMockObjectsWithoutExpectations] to PHPUnit test classes whose mocks have no expectations.rector-phpunit/composer-based
lint/phpunit/add-closure-return-type-from-assertAdd return type to closures narrowed by assertInstanceOf() inside PHPUnit test case classeslint-strictrector/type-declaration
lint/phpunit/add-data-provider-allow-mock-objectsAdd #[AllowMockObjectsWithoutExpectations] attribute to PHPUnit test classes that have methods with data providers and mock objects without expectationsrector-phpunit/composer-based
lint/phpunit/add-data-provider-iterator-return-typeAdd Iterator type on known PHPUnit data providerslint-strictrector/type-declaration
lint/phpunit/add-depended-test-return-typeAdd return type declaration to a test method that returns typelint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/add-does-not-perform-assertionsTests without assertion will have #[DoesNotPerformAssertions] attribute, or @doesNotPerformAssertions annotation on PHPUnit below 10rector-phpunit/composer-based
lint/phpunit/add-instanceof-assertAdd an assertInstanceOf() before a nullable object is used in a PHPUnit test.lint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/add-instanceof-assert-for-argumentAdd explicit instance assert between above nullable object passlint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/add-mock-intersection-paramAdd a MockObject intersection @param docblock with the mocked class, based on the mock passed in the private method calllint-recommendedlint-strictrector-phpunit/composer-basedrector-phpunit/phpunit-mock-to-stub
lint/phpunit/add-mock-intersection-typeAdd MockObject&Foo / Stub&Foo intersection types to PHPDoc of mock and stub properties, params and returns.lint-recommendedlint-strictrector-phpunit/composer-basedrector-phpunit/phpunit-mock-to-stub
lint/phpunit/add-mock-object-typeChange param type of a private test method to MockObject, when expects() is called on itrector-phpunit/composer-based
lint/phpunit/add-param-type-dependsAdd param type declaration based on @depends test method return typelint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/add-parent-test-constructorPHPUnit\Framework\TestCase requires a parent constructor callrector-phpunit/composer-based
lint/phpunit/add-property-type-container-getAdd strict typed property to a private test case property based on its @var object type, when assigned via container fetch in setUp()lint-strictrector/type-declaration
lint/phpunit/add-property-type-create-mockAdd "PHPUnit\Framework\MockObject\MockObject" typed property from assigned mock to clearly separate from real objectslint-strictrector/type-declaration
lint/phpunit/add-property-type-setupAdd strict typed property based on setUp() strict typed assigns in TestCaselint-strictrector/type-declaration
lint/phpunit/add-property-type-setup-docblockAdd property type in PHPUnit test from docblock, if defined in setUp() methodlint-strictrector/type-declaration
lint/phpunit/add-prophecy-traitAdd Prophecy trait for method using $this->prophesize()rector-phpunit/composer-based
lint/phpunit/add-return-type-from-mock-objectAdd known property and return MockObject typeslint-strictrector/type-declaration
lint/phpunit/add-see-test-tagAdd @see annotation test of the class for faster jump to test. Make it FQN, so it stays in the annotation, not in the PHP source code.rector/rector-preset
lint/phpunit/add-stub-intersection-typeAdd a Stub intersection @var docblock with the stubbed class to a native Stub propertylint-recommendedlint-strictrector-phpunit/composer-basedrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-mock-to-stub
lint/phpunit/add-test-void-returnAdd void to PHPUnit test methodslint-strictrector/type-declaration
lint/phpunit/add-will-return-callback-false-fallbackAdd a "return false" fallback to a willReturnCallback() closure that only returns booleans, but can fall through without a returnlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/add-will-return-callback-param-typeDecorate callbacks and arrow functions in willReturnCallback() with known param/return types based on reflection methodlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/no-any-matcherChange deprecated $this->any() matcher assign to direct new AnyInvokedCount()rector-phpunit/composer-based
lint/phpunit/no-assert-class-has-attributeReplace removed assertClassHas*Attribute() with property_exists()rector-phpunit/composer-based
lint/phpunit/no-assert-contains-on-stringChange assertContains()/assertNotContains() method to new string and iterable alternativesrector-phpunit/composer-based
lint/phpunit/no-assert-contains-onlyReplaces Assert::assertContainsOnly() calls with type-specific Assert::assertContainsOnly*() callsrector-phpunit/composer-based
lint/phpunit/no-assert-internal-typeReplace assertInternalType() with the dedicated assertIs*() assertion.lint-strictrector-phpunit/composer-based
lint/phpunit/no-assert-is-typeReplaces Assert::isType() calls with type-specific Assert::is*() callsrector-phpunit/composer-based
lint/phpunit/no-assert-same-type-mismatchCorrect expected type in assertSame() method to match strict type of passed variablelint-recommendedlint-strictrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-narrow-asserts
lint/phpunit/no-at-matcherReplace at() method call with desired matcherlint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/no-bare-mock-assignUse a createMock() result directly where it is used once, instead of assigning it to a variable firstlint-recommendedlint-strictrector-phpunit/composer-basedrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-mock-to-stub
lint/phpunit/no-bare-mock-builderRemove getMockBuilder() to createMock()lint-recommendedlint-strictrector-phpunit/composer-basedrector-phpunit/phpunit-code-quality
lint/phpunit/no-data-provider-test-prefixData provider methods cannot start with "test" prefixrector-phpunit/composer-based
lint/phpunit/no-empty-testRemove empty test methodslint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/no-entity-mockMove from entity mock, to direct use of class instance and setterslint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/no-expected-exception-annotationReplace @expectedException annotations with expectException() calls.lint-strictrector-phpunit/composer-based
lint/phpunit/no-expects-anyRemove expect($this->any()) from mocks as it has no added valuelint-recommendedlint-strictrector-phpunit/composer-basedrector-phpunit/phpunit-code-quality
lint/phpunit/no-final-constructor-overrideRemove override final construct test caserector-phpunit/composer-based
lint/phpunit/no-flipped-assertionTurns accidentally flipped assert order to right one, with expected expr to leftlint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/no-float-delta-parameterChange assertEquals()/assertSame() method using float on expected argument to new specific alternatives.lint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/no-mock-builder-set-methodsRemove "setMethods()" method as never used, move methods to "addMethods()" if non-existent or @method magicrector-phpunit/composer-based
lint/phpunit/no-mock-intersection-propertyMake properties in tests with intersection mock object either object type or mock typelint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/no-negated-assertionTurns not-operator comparisons to their method name alternatives in PHPUnit TestCaselint-recommendedlint-strictrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-narrow-asserts
lint/phpunit/no-scenario-annotationChange @scenario annotation to @test in a test classrector-phpunit/composer-based
lint/phpunit/no-setup-override-attributeRemove override attribute, if setUp()/tearDown() references parent call to improve readabilitylint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/no-stub-with-expectationsChange createStub() to createMock(), when the created variable is passed to a method that requires MockObject typelint-recommendedlint-strictrector-phpunit/composer-basedrector-phpunit/phpunit-mock-to-stub
lint/phpunit/no-test-constructorReplace or remove __construct() in PHPUnit test cases; use setUp().lint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/no-test-listenerRefactor "*TestListener.php" to particular "*Hook.php" filesrector-phpunit/composer-based
lint/phpunit/no-unused-mockRemove standalone method calls with no effectlint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/no-unused-mock-propertyRemove never used property mock, only to set expectationslint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/no-value-object-mockUse a real instance instead of a mock for entities and simple value objects in tests.lint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/no-with-consecutiveRefactor deprecated withConsecutive() to willReturnCallback() structurerector-phpunit/composer-based
lint/phpunit/prefer-assertTurns assert() calls in tests to PHPUnit assert method alternativelint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-assert-array-has-keyTurns assertTrue() + isset() comparisons to more precise assertArrayHasKey() methodlint-recommendedlint-strictrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-narrow-asserts
lint/phpunit/prefer-assert-contains-equalsChange assertContains()/assertNotContains() with non-strict comparison to new specific alternativesrector-phpunit/composer-based
lint/phpunit/prefer-assert-countReplaces use of assertSame and assertEquals on Countable objects with count methodlint-recommendedlint-strictrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-narrow-asserts
lint/phpunit/prefer-assert-instanceofTurns instanceof comparisons to their method name alternatives in PHPUnit TestCaselint-recommendedlint-strictrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-narrow-asserts
lint/phpunit/prefer-assert-instanceof-over-emptyChange assertNotEmpty() and assertNotNull() on an object to more clear assertInstanceof()lint-recommendedlint-strictrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-narrow-asserts
lint/phpunit/prefer-assert-instances-ofSimplify unnecessary foreach check of instanceslint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-assert-matches-regular-expressionTurns preg_match comparisons to their method name alternatives in PHPUnit TestCaserector-phpunit/composer-based
lint/phpunit/prefer-assert-null-true-falseTurns same bool and null comparisons to their method name alternatives in PHPUnit TestCaselint-strictrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-narrow-asserts
lint/phpunit/prefer-assert-samePHPUnit methods like assertSame should be used instead of assertEquals.lint-strictrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-narrow-asserts
lint/phpunit/prefer-assert-string-containsTurns strpos/stripos comparisons to their method name alternatives in PHPUnit TestCaselint-recommendedlint-strictrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-narrow-asserts
lint/phpunit/prefer-assert-true-falseChange $this->assertSame(true, ...) to assertTrue()lint-strictrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-narrow-asserts
lint/phpunit/prefer-attribute-over-annotationChange annotations with value to attributerector-phpunit/annotations-to-attributesrector-phpunit/composer-based
lint/phpunit/prefer-attributesPHPUnit attributes must be used over their respective PHPDoc-based annotations.Opt-in
lint/phpunit/prefer-camel-case-test-namesChanges PHPUnit test methods to camel caseOpt-in
lint/phpunit/prefer-comparison-assertionReplace assertTrue()/assertFalse() on a comparison, instanceof, isset, count or strpos with the specific assertion.lint-recommendedlint-strictrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-narrow-asserts
lint/phpunit/prefer-covers-attributeChange covers annotations with value to attributerector-phpunit/annotations-to-attributesrector-phpunit/composer-based
lint/phpunit/prefer-create-mockReplace getMock*() with createMock().lint-strictrector-phpunit/composer-based
lint/phpunit/prefer-create-stubUse createStub() instead of createMock() when no expectations are set.lint-recommendedlint-strictrector-phpunit/composer-basedrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-mock-to-stub
lint/phpunit/prefer-create-stub-argumentUse createStub() over createMock() when used as argument or array value and does not add any mock requirementslint-recommendedlint-strictrector-phpunit/composer-basedrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-mock-to-stub
lint/phpunit/prefer-create-stub-expressionReplace createMock() assigned to variable that is only used as arg with no expectations, to createStub()lint-recommendedlint-strictrector-phpunit/composer-basedrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-mock-to-stub
lint/phpunit/prefer-create-stub-in-coalesceUse createStub() over createMock() when used as argument/array item coalesce ?? fallbacklint-recommendedlint-strictrector-phpunit/composer-basedrector-phpunit/phpunit-mock-to-stub
lint/phpunit/prefer-data-providerReplace testWith annotation to data provider.lint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-data-provider-attributeChange dataProvider annotations to attributerector-phpunit/annotations-to-attributesrector-phpunit/composer-based
lint/phpunit/prefer-dedicated-assertionUse dedicated PHPUnit assertions such as assertFileExists() instead of assertTrue(file_exists()).lint-strict
lint/phpunit/prefer-depends-attributeChange depends annotations with value to attributerector-phpunit/annotations-to-attributesrector-phpunit/composer-based
lint/phpunit/prefer-direct-assertChange $this->assertThat($value, $this->*()) to direct $this->assert*() methodOpt-in
lint/phpunit/prefer-expect-exceptionReplace setExpectedException*() with expectException*().lint-strictrector-phpunit/composer-based
lint/phpunit/prefer-expect-php-errorUse explicit API for expecting PHP errors, warnings, and noticesrector-phpunit/composer-based
lint/phpunit/prefer-inline-create-stubInline stub property only used to pass as new argument to a method calllint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-local-over-setup-propertyTurn property used only in setUp() to variablelint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-mock-intersection-returnChange a MockObject @return union docblock to an intersection typelint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-named-data-provider-keysChange the array-index names to the argument name of the dataProviderrector-phpunit/composer-based
lint/phpunit/prefer-namespacedPHPUnit classes MUST be used in namespaced version, e.g. \PHPUnit\Framework\TestCase instead of \PHPUnit_Framework_TestCase.lint-strict
lint/phpunit/prefer-narrow-will-return-callbackNarrow single-value match willReturnCallback() to with() and willReturn() calllint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-narrow-with-consecutiveNarrow identical withConsecutive() and willReturnOnConsecutiveCalls() to single calllint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-new-assertion-namesRename deprecated PHPUnit assertions like assertFileNotExists to new methods like assertFileDoesNotExist.lint-strict
lint/phpunit/prefer-property-assertionsSplit object casted to array to assert public properties to standalone assert callslint-recommendedlint-strictrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-narrow-asserts
lint/phpunit/prefer-requires-attributeChange Requires annotations with values to attributesrector-phpunit/annotations-to-attributesrector-phpunit/composer-based
lint/phpunit/prefer-self-callChanges PHPUnit calls from $this->assert*() to self::assert*()Opt-in
lint/phpunit/prefer-short-will-returnUse willReturn() and similar instead of will($this->returnValue()).lint-strict
lint/phpunit/prefer-simple-callback-assertReplaces use of with, callback and sole assertSame() to simple equalTo() matcherlint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-simple-mock-expectationReplace withConsecutive()/willReturnCallback() that cover one value with with()/willReturn().lint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-simple-with-matcherSimplify ->with() matchers: plain values instead of equalTo(), isInstanceOf() instead of a callback.lint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-snake-case-test-namesChanges PHPUnit test methods to snake caseOpt-in
lint/phpunit/prefer-specific-assert-equalsChange assertEquals()/assertNotEquals() method parameters to new specific alternativesrector-phpunit/composer-based
lint/phpunit/prefer-specific-assertionsPHPUnit assertion method calls like ->assertSame(true, $foo) should be written with dedicated method like ->assertTrue($foo).lint-strict
lint/phpunit/prefer-specific-true-false-assertionTurns true/false comparisons to their method name alternatives in PHPUnit TestCase when possiblelint-strictrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-narrow-asserts
lint/phpunit/prefer-specific-will-methodChanges $mock->will() call to more specific methodlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-standalone-asserts-over-callbackReplaces identical compare in $this->callable() sole return to standalone PHPUnit asserts that show more detailed failure messageslint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-stub-varUpdate the @var docblock of a property changed to a Stub native type, from MockObject to Stublint-recommendedlint-strictrector-phpunit/composer-basedrector-phpunit/phpunit-code-qualityrector-phpunit/phpunit-mock-to-stub
lint/phpunit/prefer-test-attributeSuggests using PHPUnit's #[Test] attribute instead of the test method name prefix.lint-recommendedlint-strict
lint/phpunit/prefer-test-prefixReplace @test with prefixed functionlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-test-with-attributeChange @testWith() annotation to #[TestWith] attributerector-phpunit/annotations-to-attributesrector-phpunit/composer-based
lint/phpunit/prefer-this-assertChanges PHPUnit calls from Assert::assert*() to $this->assert*()Opt-in
lint/phpunit/prefer-this-callChanges PHPUnit calls from self::assert*() to $this->assert*()lint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-ticket-attributeChange annotations with value to attributerector-phpunit/annotations-to-attributesrector-phpunit/composer-based
lint/phpunit/prefer-will-return-callbackMerge ->with($this->callback()) and ->willReturn() into willReturnCallback().lint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-with-is-instance-ofReplaces use of with, callable and instance assert to simple isInstanceOf() methodlint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/prefer-yield-data-providerTurns array return to yield in data providerslint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/require-array-key-assertAdd assertArrayHasKey() call for array access with string key, that was not validated beforeOpt-in
lint/phpunit/require-assertion-styleCalls to PHPUnit\Framework\TestCase static methods (like assertions) must all be of the same type, either $this->, self:: or static::.lint-strict
lint/phpunit/require-coversAdds a default @coversNothing annotation to PHPUnit test classes that have no @covers* annotation.Opt-in
lint/phpunit/require-data-provider-namingData provider names must match the name of the test.Opt-in
lint/phpunit/require-data-provider-newlinesChange data provider in PHPUnit test case to newline per itemlint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/require-data-provider-orderData provider method must be placed after/before the last/first test where used.lint-recommendedlint-strict
lint/phpunit/require-exact-test-argument-typeCorrect expected type in setter of tests, if param type is strictly definedlint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/require-explicit-mock-expectsAdd explicit expects() to method() mock calls, to make expectations count explicitOpt-in
lint/phpunit/require-final-test-caseMake PHPUnit test case finallint-recommendedlint-strictrector-phpunit/phpunit-code-qualityrector/rector-preset
lint/phpunit/require-internalAll PHPUnit test classes should be marked as internal.Opt-in
lint/phpunit/require-iterable-data-providerThe return type of PHPUnit data provider must be iterable.lint-strict
lint/phpunit/require-method-casingEnforce camel (or snake) case for PHPUnit test methods, following configuration.lint-recommendedlint-strict
lint/phpunit/require-mock-expectsAdd an explicit expects() to mocked method calls.lint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/require-protected-setupChanges the visibility of the setUp() and tearDown() functions of PHPUnit to protected, to match the PHPUnit TestCase.Opt-in
lint/phpunit/require-public-data-providerChange data provider methods to publicrector-phpunit/composer-based
lint/phpunit/require-sizeAll PHPUnit test cases should have @small, @medium or @large annotation to enable run time limits.Opt-in
lint/phpunit/require-static-data-providerMake PHPUnit data providers static.lint-strictrector-phpunit/composer-based
lint/phpunit/require-strict-types-in-testsAdd declare(strict_types=1) to PHPUnit test class filelint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/require-string-assert-argumentCast 2nd argument in assertStringContainsString() to a string if not yetlint-recommendedlint-strictrector-phpunit/phpunit-code-quality
lint/phpunit/require-test-annotation-styleMark tests consistently: a test prefix or a @test annotation.lint-strict
lint/refactor/add-argument-defaultAdds default value for arguments in defined methods.rector-laravel/laravel-80rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/refactor/add-override-attributeAdd #[Override] to properties that override a parent class's property (PHP 8.5).rector/php85
lint/refactor/add-param-typeAdd param types where neededrector-laravel/laravel-70rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90rector-phpunit/composer-based
lint/refactor/add-return-typeChange defined return typehint of method and classrector-laravel/laravel-58rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90rector-phpunit/composer-based
lint/refactor/change-method-visibilityChange visibility of method from parent classrector-laravel/laravel-56rector-laravel/laravel-57rector-laravel/laravel-60rector-laravel/laravel-90rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-56rector-laravel/up-to-laravel-57rector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/refactor/no-negated-conditionFlip a ternary whose condition is negated: drop the ! (or use === / ==) and swap the branches.lint-strict
lint/refactor/prefer-attribute-over-annotationReplace configured PHPDoc annotations (including nested ones) with attributes.rector-phpunit/annotations-to-attributesrector-phpunit/composer-basedrector/behat-annotations-to-attributes
lint/refactor/prefer-constantReplace function calls that return a constant (php_sapi_name(), pi(), ...) with the constant.lint-strict
lint/refactor/remove-attributeRemoves configured attributes by their respective FQN.Opt-in
lint/refactor/remove-function-argumentRemove argument by position by function namerector/php52rector/php85rector/php86
lint/refactor/remove-function-callRemove defined function callsrector/php85
lint/refactor/remove-interfacesRemove interfaces from classrector-laravel/laravel-53rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-53rector-laravel/up-to-laravel-54rector-laravel/up-to-laravel-55rector-laravel/up-to-laravel-56rector-laravel/up-to-laravel-57rector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/refactor/remove-method-argumentRemove defined arguments in defined methods and their callsrector-laravel/laravel-57rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-57rector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/refactor/remove-phpdoc-annotationRemoves configured annotations from PHPDoc.Opt-in
lint/refactor/rename-attributeRename attribute class namesrector-laravel/livewire-30rector-laravel/up-to-livewire-30
lint/refactor/rename-castRenames castsrector/php74rector/php85
lint/refactor/rename-classReplace defined classes by new onesrector-laravel/laravel-130rector-laravel/laravel-130-corerector-laravel/laravel-130-without-attributesrector-laravel/laravel-50rector-laravel/laravel-51rector-laravel/laravel-52rector-laravel/laravel-53rector-laravel/laravel-54rector-laravel/laravel-55rector-laravel/laravel-60rector-laravel/laravel-70rector-laravel/laravel-facade-aliases-to-full-namesrector-laravel/livewire-40rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-51rector-laravel/up-to-laravel-52rector-laravel/up-to-laravel-53rector-laravel/up-to-laravel-54rector-laravel/up-to-laravel-55rector-laravel/up-to-laravel-56rector-laravel/up-to-laravel-57rector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90rector-phpunit/composer-based
lint/refactor/rename-class-constantReplace defined class constants in their callsrector/php85
lint/refactor/rename-constantReplace constant by new onesrector/php85
lint/refactor/rename-functionTurn defined function call new onerector-laravel/laravel-100rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector/code-qualityrector/php54rector/php56rector/php72rector/php73rector/php74rector/php80rector/php85rector/php86
lint/refactor/rename-methodTurn method names to new onesrector-laravel/cashier-13rector-laravel/cashier-14rector-laravel/laravel-100rector-laravel/laravel-120rector-laravel/laravel-50rector-laravel/laravel-53rector-laravel/laravel-54rector-laravel/laravel-55rector-laravel/laravel-56rector-laravel/laravel-60rector-laravel/laravel-70rector-laravel/laravel-80rector-laravel/laravel-90rector-laravel/up-to-cashier-13rector-laravel/up-to-cashier-14rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-51rector-laravel/up-to-laravel-52rector-laravel/up-to-laravel-53rector-laravel/up-to-laravel-54rector-laravel/up-to-laravel-55rector-laravel/up-to-laravel-56rector-laravel/up-to-laravel-57rector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90rector-phpunit/composer-basedrector/php85
lint/refactor/rename-phpdoc-tagRenames PHPDoc tags.Opt-in
lint/refactor/rename-propertyReplace defined old properties by new onesrector-laravel/laravel-100rector-laravel/laravel-55rector-laravel/laravel-58rector-laravel/laravel-80rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-55rector-laravel/up-to-laravel-56rector-laravel/up-to-laravel-57rector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/refactor/rename-stringChange string valueOpt-in
lint/refactor/replace-attribute-value-with-constantReplace key value on specific attribute to class constantOpt-in
lint/refactor/replace-event-string-with-constantTurns a string event name into a class constant, but only where the event dispatcher is usedrector-laravel/laravel-52rector-laravel/laravel-54rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-52rector-laravel/up-to-laravel-53rector-laravel/up-to-laravel-54rector-laravel/up-to-laravel-55rector-laravel/up-to-laravel-56rector-laravel/up-to-laravel-57rector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/refactor/replace-function-with-constantChanges use of function calls to use constantsrector/coding-style
lint/refactor/replace-function-with-newChange configured function calls to new Instancerector-laravel/laravel-static-to-injection
lint/refactor/replace-function-with-staticTurn defined function call to static method callrector-laravel/laravel-58rector-laravel/laravel-array-str-functions-to-static-callrector-laravel/laravel-static-to-injectionrector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90
lint/refactor/replace-static-with-functionTurn static call to function callrector-laravel/laravel-53rector-laravel/up-to-laravel-100rector-laravel/up-to-laravel-110rector-laravel/up-to-laravel-120rector-laravel/up-to-laravel-130rector-laravel/up-to-laravel-130-without-attributesrector-laravel/up-to-laravel-53rector-laravel/up-to-laravel-54rector-laravel/up-to-laravel-55rector-laravel/up-to-laravel-56rector-laravel/up-to-laravel-57rector-laravel/up-to-laravel-58rector-laravel/up-to-laravel-60rector-laravel/up-to-laravel-70rector-laravel/up-to-laravel-80rector-laravel/up-to-laravel-90rector/php80
lint/refactor/replace-static-with-methodChange static call to service method via constructor injectionrector-laravel/laravel-static-to-injection
lint/refactor/replace-static-with-newChange static call to new instanceOpt-in
lint/refactor/wrap-returnWrap return value of specific methodOpt-in
lint/security/add-sensitive-parameterRequires that parameters that are likely to contain sensitive information (e.g., passwords) are marked with the #[SensitiveParameter] attribute.lint-essentiallint-recommendedlint-strict
lint/security/no-debug-callsRemove or report debug calls left in code: dd(), dump(), var_dump(), ray(), and ->dd()/->dump() in Pest expectations.lint-strictpest/coding-style
lint/security/no-evalDetects unsafe uses of the eval construct.lint-essentiallint-recommendedlint-strict
lint/security/no-ffiDetects unsafe use of the PHP FFI (Foreign Function Interface) extension.lint-essentiallint-recommendedlint-strict
lint/security/no-globalDetects the use of the global keyword and the $GLOBALS variable.lint-essentiallint-recommendedlint-strict
lint/security/no-homoglyph-namesReplace accidental usage of homoglyphs (non ascii characters) in names.lint-strict
lint/security/no-insecure-comparisonDetects insecure comparison of passwords or tokens using ==, !=, ===, or !==.lint-essentiallint-recommendedlint-strict
lint/security/no-literal-passwordDetects the use of literal values for passwords or sensitive data.lint-essentiallint-recommendedlint-strict
lint/security/no-request-variableDetects the use of the $_REQUEST variable, which is considered unsafe.lint-essentiallint-recommendedlint-strict
lint/security/no-restricted-functionsFlags calls to functions that are disallowed via rule configuration.Opt-in
lint/security/no-restricted-instantiationFlags direct instantiation of specific types that are disallowed via rule configuration.Opt-in
lint/security/no-tainted-dataDetects user (tainted) data being passed directly to sink functions or constructs (such as echo, print, or user-defined "log" functions).lint-essentiallint-recommendedlint-strict
lint/security/require-preg-quote-delimiterThis rule requires that when using preg_quote(), the second $delimiter argument is always provided.lint-essentiallint-recommendedlint-strict
lint/statements/add-safe-strict-typesAdd declare(strict_types=1) if missing and only if the file is type-safe (no scalar type coercions).lint-essentiallint-recommendedlint-strictrector/code-quality
lint/statements/no-emptyRemove useless (semicolon) statements.lint-essentiallint-recommendedlint-strict
lint/statements/require-strict-typesForce a strict types mode in all files.lint-essentiallint-recommendedlint-strict
lint/strings/no-non-printable-characterRemove Zero-width space (ZWSP), Non-breaking space (NBSP) and other invisible unicode symbols.lint-strict
lint/strings/no-trailing-whitespace-in-stringThere must be no trailing whitespace at the end of lines in strings.Opt-in
lint/strings/prefer-mb-functionsReplace non multibyte-safe functions with corresponding mb function.Opt-in
lint/strings/require-interpolation-styleEnforces a consistent string style: either prefer string interpolationOpt-in
lint/strings/require-string-line-endingAll multi-line strings must use correct line ending.Opt-in
lint/style/add-param-type-from-phpdocTakes @param annotations of non-mixed types and adjusts accordingly the function signature.Opt-in
lint/style/add-property-type-from-phpdocTakes @var annotation of non-mixed types and adjusts accordingly the property signature..Opt-in
lint/style/add-return-type-from-phpdocTakes @return annotation of non-mixed types and adjusts accordingly the function signature.Opt-in
lint/style/no-alias-functionMaster functions shall be used instead of aliases.lint-strict
lint/style/no-ambiguous-constantEnforces that all constant references made from within a namespace are explicit.Opt-in
lint/style/no-ambiguous-functionEnforces that all function calls made from within a namespace are explicit.Opt-in
lint/style/no-array-accumulation-in-loopDetects O(n²) array accumulation patterns inside loops.lint-strict
lint/style/no-array-pushConverts simple usages of array_push($x, $y); to $x[] = $y;.lint-strictrector/code-quality
lint/style/no-assign-in-ternary-branchAssign outcome of ternary condition to variable, where applicablelint-recommendedlint-strictrector/code-quality
lint/style/no-call-user-funcCall callables directly instead of through call_user_func().lint-strict
lint/style/no-dynamic-method-callDisallows calling a method by a variable name ($object->$method()).lint-strict
lint/style/no-dynamic-method-callableDisallows a first-class callable of a method with a variable name ($object->$method(...)).lint-strict
lint/style/no-dynamic-propertyDisallows accessing a property by a variable name ($object->$property).lint-strict
lint/style/no-dynamic-static-callDisallows calling a static method by a variable name (Foo::$method()).lint-strict
lint/style/no-dynamic-static-callableDisallows a first-class callable of a static method with a variable name (Foo::$method(...)).lint-strict
lint/style/no-dynamic-static-propertyDisallows accessing a static property by a variable name (Foo::$$property).lint-strict
lint/style/no-emptyDetects the use of the empty() construct.lint-strict
lint/style/no-eregReplace deprecated ereg regular expression functions with preg.lint-strictrector/php70
lint/style/no-escaped-quotesPrefer quote that are not inside the stringlint-strictrector/coding-style
lint/style/no-hash-emojiDiscourages usage of the #️⃣ emoji in place of the ASCII #.lint-strict
lint/style/no-ini-setEnforces that ini_set is not used.Opt-in
lint/style/no-inline-htmlDisallows inline content (text outside of PHP tags) in source files.Opt-in
lint/style/no-invalid-phpdocChecks for syntax errors in docblock comments, such as a malformed {@see} or {@link} tag.lint-strict
lint/style/no-is-nullReplaces is_null($var) expression with null === $var.Opt-in
lint/style/no-issetDetects the use of the isset() construct.Opt-in
lint/style/no-multi-assignSplit chained assignments ($a = $b = 1) into one assignment per statement.lint-strictrector/coding-style
lint/style/no-multiple-classes-per-fileEnsures that each file contains at most one class-like definition (class, interface, enum, or trait).Opt-in
lint/style/no-nested-ternaryNested ternary expressions are disallowed to improve code clarity and prevent potential bugs arising from confusion over operator associativity.lint-strict
lint/style/no-parameter-shadowingDetects when a function or method parameter is shadowed by a loop variable,lint-strict
lint/style/no-php4-constructorConvert PHP4-style constructors to __construct.lint-strictrector/php70
lint/style/no-redundant-finalRemoves final from methods where possible.lint-strictrector/php80
lint/style/no-redundant-final-constRemove final from constants in classes defined as finallint-essentiallint-recommendedlint-strictrector/dead-code
lint/style/no-redundant-yield-fromYield from array must be unpacked to series of yields.lint-strict
lint/style/no-short-ternaryDetects the use of the shorthand ternary and elvis operators.lint-strict
lint/style/no-side-effects-with-declarationsEnforces that a PHP file either declares symbols (classes, functions,Opt-in
lint/style/no-sleep-wakeupReplace __sleep()/__wakeup() with __serialize()/__unserialize().lint-strictrector/php85
lint/style/no-sprintf-concatDisallows string concatenation with the result of an sprintf call.Opt-in
lint/style/no-unreachable-loopDetects loops (for, foreach, while, do-while) that unconditionally break or returnlint-strict
lint/style/no-useless-printfThere must be no printf calls with only the first argument.lint-strict
lint/style/no-useless-sprintfRemove sprintf() calls with only the format argument.lint-strictrector/dead-code
lint/style/no-variable-variableDisallows variable variables ($$name).lint-strict
lint/style/prefer-arrow-functionAnonymous functions with return as the only statement must use arrow functions.lint-strict
lint/style/prefer-carbonConvert new DateTime() to Carbon::*()rector/datetime-to-carbon
lint/style/prefer-carbon-dateConvert date() function call to Carbon::now()->format(*)rector/datetime-to-carbon
lint/style/prefer-carbon-timestampConvert time() function call to Carbon::now()->getTimestamp()rector/datetime-to-carbon
lint/style/prefer-cast-over-intvalReplaces intval, floatval, doubleval, strval and boolval function calls with according type casting operator.Opt-in
lint/style/prefer-cast-over-settypeCast shall be used, not settype.lint-strict
lint/style/prefer-catch-name-from-typeType and name of catch exception should matchlint-strictrector/coding-style
lint/style/prefer-class-constantUse Foo::class instead of class-name strings.lint-strictrector/coding-stylerector/php55
lint/style/prefer-class-keyword-on-objectReplace get_class calls on object variables with class keyword syntax.lint-strictrector/php80
lint/style/prefer-compound-assignmentShorthand notation for operators should be used if possible.lint-strictrector/code-quality
lint/style/prefer-create-from-timestampSuggests DateTimeImmutable::createFromTimestamp() when a Unix timestamp is convertedOpt-in
lint/style/prefer-date-time-immutableClass DateTimeImmutable should be used instead of DateTime.Opt-in
lint/style/prefer-dir-constantReplaces dirname(__FILE__) expression with equivalent __DIR__ constant.lint-strictrector/php53
lint/style/prefer-dirname-levelsReplace nested dirname() calls with one call and a $levels argument.lint-strictrector/php70
lint/style/prefer-early-continueContinue early instead of nesting the loop body in an if.lint-strict
lint/style/prefer-early-returnReturn early instead of nesting the rest of the function in an if or else.lint-recommendedlint-strictrector/code-quality
lint/style/prefer-early-return-over-prepared-valueReturn early from each if instead of preparing a variable that is returned at the end.lint-recommendedlint-strictrector/code-quality
lint/style/prefer-empty-string-compareCompare with '' instead of strlen() === 0.lint-strictrector/code-quality
lint/style/prefer-generic-array-phpdocPHPDoc array<T> type must be used instead of T[].Opt-in
lint/style/prefer-instanceof-stringableDetects the legacy pattern is_object($x) && method_exists($x, '__toString') and suggestslint-strict
lint/style/prefer-list-phpdocPHPDoc list type must be used instead of array without a key.Opt-in
lint/style/prefer-php-version-idChanges use of call to version compare function to use of PHP version constantlint-strictrector/coding-style
lint/style/prefer-phpdoc-commentComments with annotation should be docblock when used on structural elements.Opt-in
lint/style/prefer-pow-operatorConverts pow to the ** operator.lint-strictrector/php56
lint/style/prefer-property-over-local-getterPrivatize getter of local property to propertylint-strictrector/privatization
lint/style/prefer-random-intReplaces rand, srand, getrandmax functions calls with their mt_* analogs or random_int.lint-strict
lint/style/prefer-readonly-keywordConverts readonly comment on classes to the readonly keyword.lint-strict
lint/style/prefer-self-referenceInside class or interface element self should be preferred to the class name itself.Opt-in
lint/style/prefer-short-ternaryUse the Elvis operator ?: where possible.rector/php53
lint/style/prefer-spreadReplace call_user_func_array() with variadiclint-strictrector/coding-style
lint/style/prefer-static-private-methodConverts private methods to static where possible.Opt-in
lint/style/prefer-str-containsReplace strpos() and stripos() calls with str_starts_with() or str_contains() if possible.lint-strictrector/php-polyfillsrector/php80
lint/style/prefer-variadic-paramRefactor func_get_args() in to a variadic paramlint-strictrector/coding-style
lint/style/prefer-while-loopSuggests using a while loop instead of a for loop when the for loop does not have anyOpt-in
lint/style/require-assign-set-paddingAdd extra space before new assign setlint-strictrector/coding-style
lint/style/require-create-from-format-bangThe first argument of DateTime::createFromFormat method must start with !.Opt-in
lint/style/require-final-classAll classes must be final, except abstract ones and Doctrine entities.Opt-in
lint/style/require-final-internal-classInternal classes should be final.Opt-in
lint/style/require-final-public-methodAll public methods of abstract classes should be final.Opt-in
lint/style/require-fopen-binary-flagThe flags in fopen calls must omit t, and b must be omitted or included consistently.Opt-in
lint/style/require-fopen-flag-orderOrder the flags in fopen calls, b and t must be last.Opt-in
lint/style/require-implode-separatorFunction implode must be called with 2 arguments in the documented order.lint-strictrector/php74
lint/style/require-namespaceDetects files that contain definitions (classes, interfaces, enums, traits, functions, or constants)Opt-in
lint/style/require-naming-conventionEnforce naming conventions for classes, interfaces, traits, enums, functions, methods, properties, constants and variables (options per kind).Opt-in
lint/style/require-ordered-traitsTrait use statements must be sorted alphabetically.Opt-in
lint/style/require-parent-visibilityMake method visibility same as parent onelint-strictrector/coding-style
lint/style/require-phpdocDetects declarations that are missing a docblock.Opt-in
lint/style/require-sorted-integer-keysDetects array literals with integer keys that are not in ascending order.Opt-in
lint/style/require-statement-paddingAdd empty new line after different-type statements to improve code readabilitylint-strictrector/coding-style
lint/style/require-todo-referenceRequire TODO and FIXME comments to reference a user or issue.Opt-in
lint/tags/no-invalid-open-tagDetects misspelled PHP opening tags like <php? instead of <?php.lint-essentiallint-recommendedlint-strict
lint/types/add-array-return-typeAdd return type from return direct arraylint-strictrector/type-declaration
lint/types/add-arrow-function-return-typeAdd known return type to arrow functionlint-strictrector/type-declaration
lint/types/add-bool-return-typeAdd bool return type based on strict bool returns type operationslint-strictrector/type-declaration
lint/types/add-bool-return-type-from-constAdd return bool, based on direct true/false returnslint-strictrector/type-declaration
lint/types/add-bool-return-type-from-mixed-returnsAdd bool return type when returns mix direct true/false consts with strict bool expressionslint-strictrector/type-declaration
lint/types/add-closure-never-returnAdd "never" return-type for closure that never return anythinglint-strictrector/type-declaration
lint/types/add-closure-return-typeAdd return type to closures based on known return valueslint-strictrector/type-declaration
lint/types/add-closure-void-returnAdd closure return type void if there is no returnlint-strictrector/type-declaration
lint/types/add-datetime-property-typeSet DateTime to DateTimeInterface for DateTime property with DateTimeInterface docblocklint-strictrector/type-declaration
lint/types/add-fluent-return-typeAdd return type from strict return $thislint-strictrector/type-declaration
lint/types/add-function-void-returnAdd function return type void if there is no returnlint-strictrector/type-declaration
lint/types/add-getter-return-phpdocAdd @return array docblock to a getter method based on @var of the propertylint-strictrector/type-declaration-docblocks
lint/types/add-magic-method-return-typeAdd known magic methods parameter and return type declarationslint-strictrector/type-declaration
lint/types/add-method-void-returnAdd return type void to function like without any returnlint-strictrector/type-declaration
lint/types/add-never-return-typeAdd a never return type to functions, methods and closures that never return.lint-strictrector/php81rector/type-declaration
lint/types/add-nullable-return-typeAdd basic ? nullable type to class methods and functions, as of PHP 7.1lint-strictrector/type-declaration
lint/types/add-numeric-return-typeAdd int/float return type based on strict typed returnslint-strictrector/type-declaration
lint/types/add-numeric-return-type-from-scalarAdd int/float return type based on strict scalar returns typelint-strictrector/type-declaration
lint/types/add-param-phpdoc-from-callable-callAdd param array docblock based on callable native function calllint-strictrector/type-declaration-docblocks
lint/types/add-param-phpdoc-from-dim-fetchAdd @param docblock array type, based on array dim fetch accesslint-strictrector/type-declaration-docblocks
lint/types/add-param-phpdoc-from-local-callsAdd @param array docblock to a class method based on local call typeslint-strictrector/type-declaration-docblocks
lint/types/add-param-phpdoc-from-reference-assignAdd @param docblock array type, based on type to assigned parameter referencelint-strictrector/type-declaration-docblocks
lint/types/add-param-type-array-any-allAdd a type to an untyped array_any()/array_all() closure param, based on the array item typelint-strictrector/type-declaration
lint/types/add-param-type-array-dim-fetchAdd array type based on array dim fetch uselint-strictrector/type-declaration
lint/types/add-param-type-array-functionAdd array_filter()/array_map() function closure param type, based on passed iterablelint-strictrector/type-declaration
lint/types/add-param-type-array-mapApplies type hints to array_map closureslint-strictrector/type-declaration
lint/types/add-param-type-array-reduceApplies type hints to array_reduce closureslint-strictrector/type-declaration
lint/types/add-param-type-arrow-dim-fetchAdd closure and arrow function param array type, if dim fetch is used insidelint-strictrector/type-declaration
lint/types/add-param-type-data-providerAdds param type declaration based on PHPUnit provider return type declarationlint-strictrector/type-declaration
lint/types/add-param-type-dim-fetch-keyAdd method param type based on use in array dim fetch of known keyslint-strictrector/type-declaration
lint/types/add-param-type-iterable-method-callApplies type hints to closures on Iterable method calls where key/value types are documentedlint-strictrector/type-declaration
lint/types/add-param-type-method-callChange private method param type to strict type, based on passed strict typeslint-strictrector/type-declaration
lint/types/add-param-type-propertyAdd param type declaration based on property typelint-strictrector/type-declaration
lint/types/add-param-type-spl-fixed-arrayAdd exact fixed array type in known caseslint-strictrector/type-declaration
lint/types/add-param-type-variable-callAdd closure param object type based on the argument the assigned closure variable is called withlint-strictrector/type-declaration
lint/types/add-private-method-array-return-typeAdd strict return array type to private methods based on created empty array and returnedlint-strictrector/type-declaration
lint/types/add-property-type-assignsAdd typed property from assigned typeslint-strictrector/type-declaration
lint/types/add-property-type-constructorAdd typed properties based only on strict constructor typeslint-strictrector/type-declaration
lint/types/add-property-type-get-repositoryAdd strict typed property to a private test case property based on its @var object type, when assigned via entity manager getRepository() fetch in setUp()lint-strictrector/type-declaration
lint/types/add-property-type-setter-getterAdd property type based on strict setter and getter methodlint-strictrector/type-declaration
lint/types/add-refactor-param-phpdocAdd @param node type to refactor() method based on getNodeTypes() of a Rector rule, to avoid instanceof checks and unknown types reported by PHPStanrector/rector-preset
lint/types/add-return-phpdoc-common-objectAdd @return docblock array of objects, that have common denominator interface/parent classlint-strictrector/type-declaration-docblocks
lint/types/add-return-phpdoc-dim-assigned-objectAdd @return docblock array of objects, that are dim assigned to returned variablelint-strictrector/type-declaration-docblocks
lint/types/add-return-phpdoc-direct-arrayAdd simple @return array docblock based on direct single level direct return of []lint-strictrector/type-declaration-docblocks
lint/types/add-return-phpdoc-json-arrayAdd @return docblock for array based on return of json_decode() return arraylint-strictrector/type-declaration-docblocks
lint/types/add-return-phpdoc-scalar-arrayAdd @return docblock for scalar array from strict array assignmentslint-strictrector/type-declaration-docblocks
lint/types/add-return-type-from-castAdd return type to function like with return castlint-strictrector/type-declaration
lint/types/add-return-type-from-constantAdd strict type declaration based on returned constantslint-strictrector/type-declaration
lint/types/add-return-type-from-get-repositoryAdd repository return type declaration based on @return docblock, when a method returns entity manager getRepository() fetchlint-strictrector/type-declaration
lint/types/add-return-type-from-native-callAdd strict return type based native function or native methodlint-strictrector/type-declaration
lint/types/add-return-type-from-newAdd return type to function like with return newlint-strictrector/type-declaration
lint/types/add-return-type-from-new-arrayAdd strict return array type based on created empty array and returnedlint-strictrector/type-declaration
lint/types/add-return-type-from-paramAdd return type based on strict parameter typelint-strictrector/type-declaration
lint/types/add-return-type-from-parentAdd missing return type declaration based on parent class methodlint-strictrector/type-declaration
lint/types/add-return-type-from-propertyAdd return method return type based on strict typed propertylint-strictrector/type-declaration
lint/types/add-return-type-from-ternaryAdd method return type based on strict ternary valueslint-strictrector/type-declaration
lint/types/add-return-type-from-try-catchAdd known type declarations based on first-level try/catch return valueslint-strictrector/type-declaration
lint/types/add-return-type-from-typed-callAdd return type from strict return type of calllint-strictrector/type-declaration
lint/types/add-return-type-from-yieldAdd return type declarations from yieldslint-strictrector/type-declaration
lint/types/add-string-return-typeAdd string return type based on returned strict string valueslint-strictrector/type-declaration
lint/types/add-string-return-type-from-scalarAdd string return type based on returned string scalar valueslint-strictrector/type-declaration
lint/types/add-union-return-typeAdd union return typelint-strictrector/type-declaration
lint/types/add-var-phpdoc-from-constructor-paramAdd @var array docblock to a property based on @param of constructor assignlint-strictrector/type-declaration-docblocks
lint/types/add-var-phpdoc-from-defaultAdd @var array docblock to array property based on iterable default valuelint-strictrector/type-declaration-docblocks
lint/types/add-var-phpdoc-from-dim-fetchAdd @var array property docblock from dim fetches on property fetch assignmentlint-strictrector/type-declaration-docblocks
lint/types/add-var-phpdoc-from-getterAdd @var array property docblock from its getter @returnlint-strictrector/type-declaration-docblocks
lint/types/add-void-return-typeAdd a void return type to functions, methods, closures and tests that never return a value.lint-strict
lint/types/no-loose-comparisonComparisons should be strict.lint-essentiallint-recommendedlint-strict
lint/types/no-nullsafe-on-non-nullCleanup unneeded nullsafe operatorlint-recommendedlint-strictrector/code-quality
lint/types/no-phpstan-phpdoc-tagMerge more precise @phpstan-var/@phpstan-param/@phpstan-return docblock tag into its native @var/@param/@return taglint-strictrector/type-declaration-docblocks
lint/types/prefer-explicit-null-instanceofMake implicit nullable object checks explicit with instanceoflint-strictrector/code-quality
lint/types/prefer-generic-collection-phpdocChange @return "Type[]|ArrayCollection" union docblock to a generic "ArrayCollection<int, Type>"lint-strictrector/type-declaration-docblocks
lint/types/prefer-identical-same-typeUse ===/!== over ==/!=, if values have the same typelint-essentiallint-recommendedlint-strictrector/code-quality
lint/types/prefer-instanceofUse instanceof instead of is_a(), null checks or truthiness checks on nullable objects.lint-strictrector/code-quality
lint/types/prefer-literal-bool-phpdocNarrow @return docblock "bool" to "false" or "true" when the native return type only allows one of themlint-strictrector/type-declaration-docblocks
lint/types/prefer-narrow-param-typeNarrow an already nullable array_any()/array_all()/array_find()/array_find_key() closure param to the non-nullable array item typelint-strictrector/type-declaration
lint/types/prefer-specific-return-typeNarrows return type from generic object or parent class to specific class in final classes/methodslint-strictrector/type-declaration
lint/types/require-strict-paramFunctions should be used with $strict param set to true.lint-essentiallint-recommendedlint-strict
analyse/arrays/invalid-array-keyanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/arrays/invalid-destructuringanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/arrays/read-without-offsetanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/invalidanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/invalid-arrow-function-attributeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/invalid-class-attributeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/invalid-class-constant-attributeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/invalid-closure-attributeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/invalid-constant-attributeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/invalid-enum-case-attributeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/invalid-function-attributeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/invalid-hook-attributeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/invalid-method-attributeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/invalid-parameter-attributeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/invalid-property-attributeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/invalid-trait-attributeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/attributes/trait-as-attributeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/casing/inherited-method-caseanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/casts/unset-not-supportedanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/abstract-method-in-concrete-classanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/abstract-private-methodanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/callable-property-typeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/class-named-constantanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/conflicting-trait-constantanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/constant-in-traitanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/constructor-with-return-typeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/disallowed-subtypeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/duplicate-declarationanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/duplicate-trait-memberanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/dynamic-static-callanalyse-strictanalyse-max
analyse/classes/dynamic-static-callableanalyse-strictanalyse-max
analyse/classes/enum-case-outside-enumanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/final-constant-not-supportedanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/final-private-constantanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/final-private-methodanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/get-hook-without-readanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/inaccessible-class-constantanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/inaccessible-methodanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/inaccessible-propertyanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/incompatible-constant-overrideReports overrides of final constants, reduced constant visibility, and incompatible native or PHPDoc constant types. Native and PHPDoc covariance checks run with the essential preset and stricter presets.analyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/incompatible-overrideanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/incompatible-property-overrideanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/inconsistent-constructoranalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/internal-class-usageanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/internal-constant-accessanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/internal-method-callanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/internal-method-callableanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/internal-property-accessanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/internal-static-method-callanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/internal-static-method-callableanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/internal-static-property-accessanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-dynamic-constant-fetchanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-enumanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-enum-implementsanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-extendsanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-implementsanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-interface-extendsanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-interface-propertyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-method-callableChecks the receiver, method existence and visibility when creating a first-class instance method callable. Callable creation does not pass arguments to the method. The check-function-name-case option also checks method spelling.analyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-newPlannedanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-phpdoc-readonlyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-promoted-propertyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-property-declarationanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-property-hookanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-readonly-propertyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/invalid-static-method-callableChecks class and method existence, visibility, static-call rules and abstract methods when creating a first-class static method callable. Callable creation does not pass arguments. The check-function-name-case option also checks method spelling.analyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/missing-method-implementationanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/missing-parent-constructor-callanalyse-strictanalyse-max
analyse/classes/missing-required-interfaceanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/missing-required-parentanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/missing-serialize-methodsanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/new-as-callableanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/new-static-in-abstractanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/non-public-interface-methodanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/private-consistent-constructoranalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/read-write-only-propertyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/readonly-class-not-supportedanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/set-hook-without-assignanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/typed-constant-not-supportedanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/uninitialized-phpdoc-readonlyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/uninitialized-propertyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/uninitialized-readonlyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/classes/unsafe-new-staticanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/comments/invalid-ignoreanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/control-flow/break-outside-loopanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/control-flow/non-boolean-conditionanalyse-strictanalyse-max
analyse/control-flow/non-boolean-do-whileanalyse-strictanalyse-max
analyse/control-flow/non-boolean-elseifanalyse-strictanalyse-max
analyse/control-flow/non-boolean-ternaryanalyse-strictanalyse-max
analyse/control-flow/non-boolean-whileanalyse-strictanalyse-max
analyse/control-flow/switch-type-mismatchanalyse-strictanalyse-max
analyse/control-flow/unhandled-matchanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/boolean-and-always-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/boolean-not-always-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/boolean-or-always-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/call-condition-always-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/discarded-function-resultanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/discarded-method-resultanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/discarded-static-method-resultanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/do-while-always-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/elseif-always-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/finally-overrides-exitanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/if-always-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/impossible-in-arrayanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/impossible-instanceofanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/impossible-method-type-checkanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/impossible-static-type-checkanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/impossible-type-checkanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/loose-comparison-always-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/number-comparison-always-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/pure-function-result-unusedanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/pure-method-result-unusedanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/pure-new-result-unusedanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/pure-static-method-result-unusedanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/redundant-null-coalesceanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/sort-without-effectanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/strict-comparison-always-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/switch-always-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/ternary-always-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/trait-condition-always-constantanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/unused-argumentanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/unused-function-parameteranalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/unused-function-resultanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/unused-method-parameteranalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/unused-method-resultanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/unused-new-resultanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/unused-private-propertyanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/unused-static-method-resultanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/unused-traitanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/unused-variableanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/useless-return-valueanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/while-always-falseanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/while-always-trueanalyse-recommendedanalyse-strictanalyse-max
analyse/dead-code/xor-always-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/debug/assert-typeReports each assertType(), assertNativeType(), assertSuperType() or assertVariableCertainty() call that does not hold. Ignore comments and baselines cannot suppress these diagnostics.analyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/debug/dump-native-typePlannedanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/debug/dump-phpdoc-typeReports each argument's inferred type as PHPDoc. Ignore comments and baselines cannot suppress these diagnostics.analyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/debug/dump-scopePlannedanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/debug/dump-typeReports each argument's inferred type in PHPStan's precise notation. Ignore comments and baselines cannot suppress these diagnostics.analyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/deprecated/classanalyse-recommendedanalyse-strictanalyse-max
analyse/deprecated/class-constantanalyse-recommendedanalyse-strictanalyse-max
analyse/deprecated/constantanalyse-recommendedanalyse-strictanalyse-max
analyse/deprecated/functionanalyse-recommendedanalyse-strictanalyse-max
analyse/deprecated/ini-optionanalyse-recommendedanalyse-strictanalyse-max
analyse/deprecated/methodanalyse-recommendedanalyse-strictanalyse-max
analyse/deprecated/propertyanalyse-recommendedanalyse-strictanalyse-max
analyse/deprecated/to-stringanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/closure-uses-thisanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/conflicting-filter-var-flagsanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/duplicate-parameteranalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/internal-function-callanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/internal-function-callableanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/invalid-callable-callanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/invalid-closure-useanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/invalid-first-class-callableReports unknown named functions and non-callable expressions used in first-class callable syntax.analyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/invalid-parameter-nameanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/invalid-pureanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/invalid-pure-methodanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/invalid-pure-property-hookanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/invalid-vprintf-argumentsanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/printf-placeholder-countanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/unanalysed-inner-functionanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/functions/variadic-not-lastanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/imports/name-already-in-useanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/laravel/config-collectionanalyse-strictanalyse-max
analyse/laravel/deferrable-provider-missing-providesanalyse-recommendedanalyse-strictanalyse-max
analyse/laravel/missing-translationanalyse-recommendedanalyse-strictanalyse-max
analyse/laravel/no-auth-facade-in-request-scopeanalyse-strictanalyse-max
analyse/laravel/no-auth-helper-in-request-scopeanalyse-strictanalyse-max
analyse/laravel/no-env-outside-configanalyse-recommendedanalyse-strictanalyse-max
analyse/laravel/no-model-makeanalyse-recommendedanalyse-strictanalyse-max
analyse/laravel/octane-compatibilityanalyse-strictanalyse-max
analyse/laravel/redundant-collection-callanalyse-recommendedanalyse-strictanalyse-max
analyse/laravel/redundant-to-array-callanalyse-recommendedanalyse-strictanalyse-max
analyse/laravel/undefined-console-inputanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/laravel/undefined-model-appendanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/laravel/undefined-relationanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/laravel/unexpected-dispatch-argumentsanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/laravel/unused-viewanalyse-recommendedanalyse-strictanalyse-max
analyse/operators/non-boolean-and-operandanalyse-strictanalyse-max
analyse/operators/non-boolean-not-operandanalyse-strictanalyse-max
analyse/operators/non-boolean-or-operandanalyse-strictanalyse-max
analyse/operators/non-numeric-additionanalyse-strictanalyse-max
analyse/operators/non-numeric-divisionanalyse-strictanalyse-max
analyse/operators/non-numeric-exponentiationanalyse-strictanalyse-max
analyse/operators/non-numeric-moduloanalyse-strictanalyse-max
analyse/operators/non-numeric-multiplicationanalyse-strictanalyse-max
analyse/operators/non-numeric-post-decrementanalyse-strictanalyse-max
analyse/operators/non-numeric-post-incrementanalyse-strictanalyse-max
analyse/operators/non-numeric-pre-decrementanalyse-strictanalyse-max
analyse/operators/non-numeric-pre-incrementanalyse-strictanalyse-max
analyse/operators/non-numeric-subtractionanalyse-strictanalyse-max
analyse/operators/non-numeric-unary-minusanalyse-strictanalyse-max
analyse/operators/non-numeric-unary-plusanalyse-strictanalyse-max
analyse/phpdoc/constant-type-mismatchanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/hook-type-mismatchanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalidanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-assert-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-conditional-returnanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-method-assert-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-method-conditional-returnanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-method-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-mixin-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-param-callable-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-phpstan-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-property-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-require-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-sealed-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-trait-method-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-trait-mixin-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-trait-property-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-trait-require-extendsanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-trait-require-implementsanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-trait-type-aliasanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-trait-use-method-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-trait-use-mixin-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-trait-use-property-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-trait-use-type-aliasanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-type-aliasanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-var-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/invalid-var-tag-typeanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/misplaced-require-implementsanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/property-type-mismatchanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/sealed-on-traitanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/type-mismatchanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/phpdoc/var-tag-type-mismatchanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/statements/invalid-declare-strict-typesanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/statements/invalid-emptyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/statements/invalid-issetanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/statements/magic-constant-out-of-contextanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/statements/non-capturing-catch-not-supportedanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/statements/throw-expression-not-supportedanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/strings/invalid-date-intervalanalyse-recommendedanalyse-strictanalyse-max
analyse/strings/invalid-date-timeanalyse-recommendedanalyse-strictanalyse-max
analyse/types/argumentanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/argument-not-numericanalyse-recommendedanalyse-strictanalyse-max
analyse/types/argument-not-stringableanalyse-recommendedanalyse-strictanalyse-max
analyse/types/arrow-function-nullsafe-by-refanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/arrow-function-param-defaultanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/arrow-function-returnanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/assign-to-thisanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/by-ref-foreach-on-expressionanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/call-user-func-argumentanalyse-recommendedanalyse-strictanalyse-max
analyse/types/catch-non-throwableanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/class-constant-valueanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/clone-non-objectanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/closure-param-defaultanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/closure-returnanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/constant-valueanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/dead-catchanalyse-recommendedanalyse-strictanalyse-max
analyse/types/define-valueanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/echo-non-stringanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/enum-template-not-allowedanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/foreach-non-iterableanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/foreach-on-empty-arrayanalyse-recommendedanalyse-strictanalyse-max
analyse/types/function-returnanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/function-varianceanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/generatoranalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/implode-non-stringanalyse-recommendedanalyse-strictanalyse-max
analyse/types/interpolated-non-stringanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-arrow-function-signatureanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-assignment-targetanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-binary-operationanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-castanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-class-genericsanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-class-templateanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-closure-signatureanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-comparisonanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-enum-genericsanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-function-signatureanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-function-templateanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-hook-signatureanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-inc-decanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-interface-genericsanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-interface-templateanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-method-signatureanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-method-tag-templateanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-method-templateanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-offsetanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-pipeReports a pipe callable whose first parameter is passed by reference. A pipe supplies a value, not a reference. The basic preset checks invokable $this receivers; essential and stricter presets check other callable expressions too.analyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-property-assignmentanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-property-typeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-regexanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-self-out-taganalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-throws-tagReports @throws types that are not subtypes of Throwable. Standalone void means no exception is thrown. Both branches of a conditional type must be valid. A union containing void is invalid.analyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-trait-method-tag-templateanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-trait-templateanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-trait-use-genericsanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-unary-operandanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-union-typeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-unsetanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/invalid-void-castanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/method-param-defaultanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/method-varianceanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/missing-constant-typeanalyse-strictanalyse-max
analyse/types/missing-hook-throwsanalyse-max
analyse/types/missing-method-param-typeanalyse-strictanalyse-max
analyse/types/missing-method-return-typeanalyse-strictanalyse-max
analyse/types/missing-method-throwsanalyse-max
analyse/types/missing-param-typeanalyse-strictanalyse-max
analyse/types/missing-preg-quote-delimiteranalyse-recommendedanalyse-strictanalyse-max
analyse/types/missing-property-typeanalyse-strictanalyse-max
analyse/types/missing-returnanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/missing-return-typeanalyse-strictanalyse-max
analyse/types/missing-self-out-typeanalyse-strictanalyse-max
analyse/types/missing-throwsanalyse-max
analyse/types/nullsafe-by-ref-returnanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/offset-assignanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/offset-assign-opanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/offset-assign-valueanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/param-defaultanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/param-outanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/param-out-at-endanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/phpdoc-readonly-by-refanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/phpdoc-readonly-property-writeanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/print-non-stringanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/printf-argumentanalyse-recommendedanalyse-strictanalyse-max
analyse/types/property-assignanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/property-defaultanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/property-varianceanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/random-int-rangeanalyse-recommendedanalyse-strictanalyse-max
analyse/types/readonly-property-by-refanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/readonly-property-writeanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/redundant-array-valuesanalyse-recommendedanalyse-strictanalyse-max
analyse/types/renamed-parameter-in-subtypeanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/returnanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/return-by-ref-finallyPlannedanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/sort-non-stringableanalyse-recommendedanalyse-strictanalyse-max
analyse/types/this-in-globalanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/this-in-staticanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/throw-non-throwableanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/throws-not-covariantanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/throws-void-functionanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/throws-void-hookanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/throws-void-methodanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/too-wide-arrow-function-returnanalyse-recommendedanalyse-strictanalyse-max
analyse/types/too-wide-closure-returnanalyse-recommendedanalyse-strictanalyse-max
analyse/types/too-wide-function-param-outanalyse-recommendedanalyse-strictanalyse-max
analyse/types/too-wide-function-returnanalyse-recommendedanalyse-strictanalyse-max
analyse/types/too-wide-method-param-outanalyse-recommendedanalyse-strictanalyse-max
analyse/types/too-wide-method-returnanalyse-recommendedanalyse-strictanalyse-max
analyse/types/too-wide-propertyanalyse-recommendedanalyse-strictanalyse-max
analyse/types/unpack-non-iterableanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/unpack-string-keyanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/unused-hook-throws-typeanalyse-recommendedanalyse-strictanalyse-max
analyse/types/unused-method-throws-typeanalyse-recommendedanalyse-strictanalyse-max
analyse/types/unused-throws-typeanalyse-recommendedanalyse-strictanalyse-max
analyse/types/useless-array-filteranalyse-recommendedanalyse-strictanalyse-max
analyse/types/void-match-usedanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/write-to-readonly-propertyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/yield-from-non-iterableanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/types/yield-outside-functionanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/assigned-propertyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/assigned-static-propertyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/class-constantanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/compact-variablePlannedanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/constantanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/functionanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/goto-labelanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/group-importanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/importanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/include-fileanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/instanceof-classanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/methodanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/offsetanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/propertyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/static-methodanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/static-propertyanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/traitanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max
analyse/undefined/variablePlannedanalyse-basicanalyse-essentialanalyse-recommendedanalyse-strictanalyse-max

Last updated on

Was this page helpful?