-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Universal.DeclareStatements.DeclareStatementsStyle
sniff
#129
base: develop
Are you sure you want to change the base?
New Universal.DeclareStatements.DeclareStatementsStyle
sniff
#129
Commits on Dec 9, 2022
-
Configuration menu - View commit details
-
Copy full SHA for a70635c - Browse repository at this point
Copy the full SHA a70635cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e27d1b - Browse repository at this point
Copy the full SHA 7e27d1bView commit details -
Rewrite the sniff according to the PR suggestions
To do: add fixers and metric
Configuration menu - View commit details
-
Copy full SHA for 98925a9 - Browse repository at this point
Copy the full SHA 98925a9View commit details -
Will probably need some fixup.
Configuration menu - View commit details
-
Copy full SHA for 74ee334 - Browse repository at this point
Copy the full SHA 74ee334View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0acf7a2 - Browse repository at this point
Copy the full SHA 0acf7a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for bfcf2b4 - Browse repository at this point
Copy the full SHA bfcf2b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for dede6f8 - Browse repository at this point
Copy the full SHA dede6f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for a8d53eb - Browse repository at this point
Copy the full SHA a8d53ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5834c64 - Browse repository at this point
Copy the full SHA 5834c64View commit details
Commits on May 28, 2023
-
✨ New
Universal.CodeAnalysis.StaticInFinalClass
sniffNew sniff to detect using `static` instead of `self` in OO constructs which are `final`. Includes fixer. Includes unit tests. Includes documentation.
Configuration menu - View commit details
-
Copy full SHA for 9a6284e - Browse repository at this point
Copy the full SHA 9a6284eView commit details -
✨ New
Universal.Operators.TypeSeparatorSpacing
sniffNew sniff to enforce no spaces around union type and intersection type separator operators. Includes fixer. Includes unit tests. Includes documentation. Includes metrics. Co-authored-by: Denis Žoljom <denis.zoljom@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e573d36 - Browse repository at this point
Copy the full SHA e573d36View commit details -
NormalizedArrays/ArrayBraceSpacing: allow for trailing comments after…
… array opener ... when a new line is required after the opener of a multi-line array. This sniff should not have an opinion on whether or not trailing comments are allowed. There are other sniffs around to forbid those, if so desired. Includes extra unit tests to safeguard this change and to safeguard handling of comments after the array opener regardless of this change.
Configuration menu - View commit details
-
Copy full SHA for c1f8436 - Browse repository at this point
Copy the full SHA c1f8436View commit details -
✨ New
Universal.WhiteSpace.PrecisionAlignment
sniffNew sniff to enforce indentation to always be a multiple of a tabstop, i.e. disallow precision alignment. For space-based standards, the `Generic.WhiteSpace.DisallowTabIndent` sniff (unintentionally/incorrectly) already removes precision alignment. For tab-based standards, the `Generic.WhiteSpace.DisallowSpaceIndent` sniff, however, does not remove precision alignment. With that in mind, this sniff is mostly intended for standards which demand tabs for indentation. In rare cases, spaces for precision alignment can be intentional and acceptable, but more often than not, precision alignment is a typo. Notes: * This sniff does not concern itself with tabs versus spaces. Use the PHPCS native `Generic.WhiteSpace.DisallowTabIndent` or the `Generic.WhiteSpace.DisallowSpaceIndent` sniffs for that. * When using this sniff with tab-based standards, please ensure that the `tab-width` is set and either don't set the `$indent` property or set it to the tab-width (or a multiple thereof). * Precision alignment *within* text strings (multi-line text strings, heredocs, nowdocs) will NOT be flagged by this sniff. * Precision alignment in (trailing) whitespace on otherwise blank lines will not be flagged by default. Most standards will automatically remove trailing whitespace anyway using the `Squiz.WhiteSpace.SuperfluousWhitespace` sniff. If the Squiz sniff is not used, set the `ignoreBlankLines` property to `false` to enable reporting for this. * The sniff also supports an option to ignore precision alignment in specific situations, like for multi-line chained method calls. **Note**: the fixer works based on "best guess" and may not always result in the desired indentation. Combine this sniff with the `Generic.WhiteSpace.ScopeIndent` sniff for more precise indentation fixes. If so desired, the fixer can be turned off by including the rule in a standard like so: `<rule phpcs-only="true" ref="Universal.WhiteSpace.PrecisionAlignment"/>` As it is, the sniff supports both PHP, as well as JS and CSS, though the support for JS and CSS should be considered incidental and will be removed once PHPCS 4.0 will be released. Includes fixer. Includes unit tests. Includes documentation.
Configuration menu - View commit details
-
Copy full SHA for 772e7d8 - Browse repository at this point
Copy the full SHA 772e7d8View commit details -
✨ New
Universal.WhiteSpace.AnonClassKeywordSpacing
sniffChecks the amount of spacing between the `class` keyword and the open parenthesis (if any) for anonymous class declarations. The expected amount of spacing is configurable and defaults to `0`. The default value of `0` has been decided upon based on scanning a not insignificant number of codebases and determining the prevailing style used for anonymous classes. It is also in line with the previously proposed [errata for PSR12](php-fig/fig-standards#1206). Includes fixer. Includes unit tests. Includes documentation. Includes metrics.
Configuration menu - View commit details
-
Copy full SHA for 1e78d8e - Browse repository at this point
Copy the full SHA 1e78d8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for dacf3d8 - Browse repository at this point
Copy the full SHA dacf3d8View commit details -
Universal/PrecisionAlignment: rename a local variable
... to be more descriptive.
Configuration menu - View commit details
-
Copy full SHA for 6a3690c - Browse repository at this point
Copy the full SHA 6a3690cView commit details -
Universal/PrecisionAlignment: remove superfluous fixed file
This file is not supposed to yield errors/warnings, so the `.fixed` file is redundant.
Configuration menu - View commit details
-
Copy full SHA for 053fa6a - Browse repository at this point
Copy the full SHA 053fa6aView commit details -
WhiteSpace/PrecisionAlignment: best guess tabs vs spaces when fixing
Enhancement to minimize fixer conflicts/speed up fixer runs. With this change, the fixer will check whether tab replacement has been done on the indent in the original token content and if so, the fixer will use tabs for the indent replacement instead of spaces. Includes updated unit tests. Includes minor test adjustment to ensure that tabs used for inline alignment (vs indent) are disregarded when determining whether tabs or spaces should be used by the fixer.
Configuration menu - View commit details
-
Copy full SHA for d6ce6ef - Browse repository at this point
Copy the full SHA d6ce6efView commit details -
WhiteSpace/PrecisionAlignment: bug fix - improved handling of heredoc…
…/nowdoc closers This commit fixes two bugs: 1. When a heredoc/nowdoc closer (PHP 7.3+ flexible syntax) is indented with tabs, PHPCS does not replace tabs with spaces in the token. This means the token `'length'` key will also be tab-based, which leads to incorrrect calculations and false positives with incorrect fixes. Fixed now by handling tab replacement in heredoc/nowdoc closer tokens in the sniff itself. 2. A heredoc/nowdoc closer using flexible syntax is not allowed to have a larger indent than any of the content of the heredoc/nowdoc. Doing so results in a parse error. With the "best guess" rounding of the indent, the sniff had a risk of introducing these kind of parse errors. Fixed now by always rounding the expected indent down to the nearest tabstop for these tokens. Includes additional unit tests to cover the changes.
Configuration menu - View commit details
-
Copy full SHA for 58fe9e5 - Browse repository at this point
Copy the full SHA 58fe9e5View commit details -
Add "static analysis" Composer keyword
As per https://getcomposer.org/doc/04-schema.md#keywords by including "static analysis" as a keyword in the `composer.json` file, Composer 2.4.0-RC1 and later will prompt users if the package is installed with `composer require` instead of `composer require --dev`. See composer/composer#10960 for more info.
Configuration menu - View commit details
-
Copy full SHA for 40140a7 - Browse repository at this point
Copy the full SHA 40140a7View commit details -
Composer/GH Actions: start using PHPCSDevTools 1.2.0
PHPCSDevTools 1.2.0 introduces an XSD for the XML docs which can accompany sniffs. This commit: * Updates the PHPCSDevTools to version 1.2.0. * Adds a new check against the XSD for all sniff XML Docs files. Ref: https://github.com/PHPCSStandards/PHPCSDevTools/releases/tag/1.2.0
Configuration menu - View commit details
-
Copy full SHA for 72e5868 - Browse repository at this point
Copy the full SHA 72e5868View commit details -
Sniff XML docs: add schema to docs
Includes adding the `<?xml..?>` header if it didn't exist in the file.
Configuration menu - View commit details
-
Copy full SHA for 7cd20f1 - Browse repository at this point
Copy the full SHA 7cd20f1View commit details -
Composer: up the minimum PHPCS version to 3.7.1
Raise the minimum supported PHPCS version to PHPCS 3.7.1, in line with PHPCSUtils. Includes updating the GH Actions matrixes for this change. Refs: https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.7.1
Configuration menu - View commit details
-
Copy full SHA for 3e9f284 - Browse repository at this point
Copy the full SHA 3e9f284View commit details -
Changelog: improve maintainability and source readability
... by moving links to link lists under each release.
Configuration menu - View commit details
-
Copy full SHA for ac0b761 - Browse repository at this point
Copy the full SHA ac0b761View commit details -
GH Actions: fix use of deprecated
set-output
GitHub has deprecated the use of `set-output` (and `set-state`) in favour of new environment files. This commit updates workflows to use the new methodology. Refs: * https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ * https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files
Configuration menu - View commit details
-
Copy full SHA for da74f92 - Browse repository at this point
Copy the full SHA da74f92View commit details -
GH Actions: update the xmllint-problem-matcher
The `xmllint-problem-matcher` action runner has released a new version which updates it to use node 16. This gets rid of a warning which was shown in the action logs. Refs: * https://github.com/korelstar/xmllint-problem-matcher/releases/tag/v1.1
Configuration menu - View commit details
-
Copy full SHA for d901f9b - Browse repository at this point
Copy the full SHA d901f9bView commit details -
GH Actions/basics: revert to xmllint-problem-matcher v1
As the `korelstar/xmllint-problem-matcher` repo now has a long-running `v1` branch, this update which was included in PR 132 is no longer needed (and would necessitate more frequent updates if it would remain). Ref: * korelstar/xmllint-problem-matcher 7
Configuration menu - View commit details
-
Copy full SHA for 9fb1b07 - Browse repository at this point
Copy the full SHA 9fb1b07View commit details -
GH Actions: harden the workflow against PHPCS ruleset errors
If there is a ruleset error, the `cs2pr` action doesn't receive an `xml` report and exits with a `0` error code, even though the PHPCS run failed (though not on CS errors, but on a ruleset error). This changes the GH Actions workflow to allow for that situation and still fail the build in that case.
Configuration menu - View commit details
-
Copy full SHA for ed39208 - Browse repository at this point
Copy the full SHA ed39208View commit details -
Upgrade to PHPCSUtils 1.0.0-alpha4
Take advantage of new features in PHPCSUtils 1.0.0-alpha4. Ref: https://github.com/PHPCSStandards/PHPCSUtils/releases/tag/1.0.0-alpha4
Configuration menu - View commit details
-
Copy full SHA for b1620ea - Browse repository at this point
Copy the full SHA b1620eaView commit details -
✨ New
Universal.Files.SeparateFunctionsFromOO
sniffThis sniff will enforce that a file should either declare (global/namespaced) functions or declare OO structures, but not both. Nested function declarations, i.e. functions declared within a function/method will be disregarded for the purposes of this sniff. The same goes for anonymous classes, closures and arrow functions. Other notes: - This sniff has no opinion on side effects. If you want to sniff for those, use the PHPCS native `PSR1.Files.SideEffects` sniff. - This sniff has no opinion on multiple OO structures being declared in one file. If you want to sniff for that, use the PHPCS native `Generic.Files.OneObjectStructurePerFile` sniff. Includes unit tests. Includes documentation. Includes metrics.
Configuration menu - View commit details
-
Copy full SHA for e20b0a6 - Browse repository at this point
Copy the full SHA e20b0a6View commit details -
NormalizedArrays/ArrayBraceSpacing: safeguard upstream bugfix
The `SpacesFixer` in PHPCSUtils contains a bugfix for a specific situation which affected this sniff. This adds an extra unit test for the sniff to safeguard that bugfix. Ref: PHPCSStandards/PHPCSUtils 229
Configuration menu - View commit details
-
Copy full SHA for a7c61fc - Browse repository at this point
Copy the full SHA a7c61fcView commit details -
DisallowStandalonePostIncrementDecrement: prevent looking for nullsaf…
…e object operator The PHPCSUtils `Collections::$objectOperators` property has been deprecated in favour of a `Collections::objectOperators()` method to allow for the PHP 8.0 `T_NULLSAFE_OBJECT_OPERATOR` token which may not be available. As the `T_NULLSAFE_OBJECT_OPERATOR` is not allowed in write-context and in/decrement is write-context, remove the token for this sniff.
Configuration menu - View commit details
-
Copy full SHA for ec8166e - Browse repository at this point
Copy the full SHA ec8166eView commit details -
✨ New
Universal.CodeAnalysis.ConstructorDestructorReturn
sniffNew sniff to verify that class constructor/destructors: * [error] Do not have a return type declaration. This would result in a fatal error in PHP. * [warning] Do not return a value via a return statement. Includes unit tests. Includes documentation. Inspired by: * https://wiki.php.net/rfc/make_ctor_ret_void * https://twitter.com/derickr/status/1280996420305276934
Configuration menu - View commit details
-
Copy full SHA for 542d969 - Browse repository at this point
Copy the full SHA 542d969View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b5d591 - Browse repository at this point
Copy the full SHA 8b5d591View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28326cd - Browse repository at this point
Copy the full SHA 28326cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 39bc8e4 - Browse repository at this point
Copy the full SHA 39bc8e4View commit details -
DisallowInlineTabsUnitTest: skip on PHP 5.5
For some weird and unknown reason, the tests for this sniff have started to fail intermittently in CI on PHP 5.5 (and only on PHP 5.5). * The tests pass on PHP 5.4 and PHP 5.6-8.2. * The tests regularly pass on PHP 5.5 after restarting the build (?!). * The tests pass locally on PHP 5.5 when running with the exact same PHP version and PHPUnit versions. In other words, this is one of those mystery bugs. For now, I'm just going to skip running these tests on PHP 5.5 as the build failures are blocking PRs for unrelated features.
Configuration menu - View commit details
-
Copy full SHA for c81abd2 - Browse repository at this point
Copy the full SHA c81abd2View commit details -
Universal/ConstructorDestructorReturn: add auto-fixer for return type
The "returns a value" warning cannot be auto-fixed as it should be looked at by a developer. However, the "return type found" error _can_ be auto-fixed, so let's do so.
Configuration menu - View commit details
-
Copy full SHA for d0dfd66 - Browse repository at this point
Copy the full SHA d0dfd66View commit details -
✨ New
Universal.Classes.ModifierKeywordOrder
sniffSniff to standardize the modifier keyword order for class declarations, what with the `readonly` keyword being introduced in PHP 8.2. The sniff contains a `public` `$order` property which allows for configuring the preferred order. Allowed values: * `'extendability readonly'` (= default) * `'readonly extendability'` Includes fixer. Includes unit tests. Includes documentation. Includes metrics. Ref: https://wiki.php.net/rfc/readonly_classes
Configuration menu - View commit details
-
Copy full SHA for 00d0150 - Browse repository at this point
Copy the full SHA 00d0150View commit details -
✨ New
Universal.Constants.ModifierKeywordOrder
sniffSniff to standardize the modifier keyword order for OO constant declarations. The sniff contains a `public` `$order` property which allows for configuring the preferred order. Allowed values: * `'final visibility'` (= default) * `'visibility final'` Includes fixer. Includes unit tests. Includes documentation. Includes metrics. Refs: * PHP 8.1: https://wiki.php.net/rfc/final_class_const * PHP 7.1: https://wiki.php.net/rfc/class_const_visibility
Configuration menu - View commit details
-
Copy full SHA for 50383a9 - Browse repository at this point
Copy the full SHA 50383a9View commit details -
NormalizedArrays/CommaAfterLast: improve fixer for flexible heredoc/n…
…owdoc When comma's are enforced after the last entry of a (multi-line) array, the fixer would previously always add a new line between the heredoc/nowdoc closer and the comma to prevent parse errors in PHP < 7.3. However, the "closer" token for a flexible heredoc/nowdoc will include the indentation whitespace. This allows us to distinguish between "old-style" heredoc/nowdocs and PHP 7.3+ heredoc/nowdocs. This commit updates the fixer to check for this indentation whitespace and if found, will no longer add the new line. Includes tests in a separate file as these tests can only run on PHP 7.3+ (as the token stream of a file containing flexible heredoc/nowdocs in PHP < 7.3 will be garbage after the first heredoc/nowdoc).
Configuration menu - View commit details
-
Copy full SHA for 7bdb46b - Browse repository at this point
Copy the full SHA 7bdb46bView commit details -
QA: always declare metric names as class constants
.. to reduce the risk of metrics not recording correctly due to typos in one of the instances recording the metrics. Note: the metrics in the "Disallow short/long list" sniffs will be addressed separately.
Configuration menu - View commit details
-
Copy full SHA for ee9225d - Browse repository at this point
Copy the full SHA ee9225dView commit details -
Universal/ConstructorDestructorReturn: improve return type fixer
... to prevent it from removing comments. Includes adjusting a pre-existing test to cover the change.
Configuration menu - View commit details
-
Copy full SHA for 334c8dc - Browse repository at this point
Copy the full SHA 334c8dcView commit details -
Universal/OneStatementInShortEchoTag: improve error code
As the name of the sniff is `OneStatementInShortEchoTag`, "Found" would imply that one statement was found, while in actual fact the sniff throws an error when _multiple_ statements are found.
Configuration menu - View commit details
-
Copy full SHA for bffb7c3 - Browse repository at this point
Copy the full SHA bffb7c3View commit details -
Universal/[Require/Disallow]FinalClass: rename metric
What with PHP 8.2 introducing `readonly` classes, the metric name `Class declaration type` would become ambiguous as `readonly` is not taken into account for the metric (and doesn't need to be as it doesn't have a direct relationship to `abstract`/`final`). To prevent confusion about what the metric records, the metric name has been updated.
Configuration menu - View commit details
-
Copy full SHA for 253c637 - Browse repository at this point
Copy the full SHA 253c637View commit details -
Universal/[Require/Disallow]FinalClass: add tests with readonly classes
... to ensure the fixer continues to work correctly when the class is also `readonly`.
Configuration menu - View commit details
-
Copy full SHA for 545f531 - Browse repository at this point
Copy the full SHA 545f531View commit details -
Universal/DisallowUseClass: "docs" update for enums
This updates the phrasing referencing the different OO structures to include enums in: * The error message. * The metric names. * Documentation.
Configuration menu - View commit details
-
Copy full SHA for f14adb5 - Browse repository at this point
Copy the full SHA f14adb5View commit details -
Universal/AlphabeticExtendsImplements: docs/test update for enums
This commit adds tests confirming that `enum ... implements ...` statements are handled correctly by the sniff. Additionally, it updates the documentation to include `enum`s and makes a minor grammar fix to one of the metric names.
Configuration menu - View commit details
-
Copy full SHA for 58ec58a - Browse repository at this point
Copy the full SHA 58ec58aView commit details -
Universal/DisallowShortListSyntax: allow for tokenizer issue in PHPCS…
… 3.7.1 ... which was fixed in 3.7.2. The utility methods used from PHPCSUtils 1.0.0-alpha4 already take this into account, so this should be handled without problems. Includes test. Ref: * squizlabs/PHP_CodeSniffer 3632 * PHPCSStandards/PHPCSUtils 392
Configuration menu - View commit details
-
Copy full SHA for ed4cfc6 - Browse repository at this point
Copy the full SHA ed4cfc6View commit details -
Universal/DisallowShortListSyntax: bug fix - don't skip over nested b…
…rackets ... as short arrays can contain short lists and those still need to be examined. Includes test to safeguard this.
Configuration menu - View commit details
-
Copy full SHA for 685996f - Browse repository at this point
Copy the full SHA 685996fView commit details -
Universal/DisallowShortArraySyntax: don't skip over short lists
... as for some unfanthomable reason (short) arrays can be used as keys for short lists and if so, those should still be found and fixed. Includes test to safeguard this.
Configuration menu - View commit details
-
Copy full SHA for 33f2e6e - Browse repository at this point
Copy the full SHA 33f2e6eView commit details -
Universal/DisallowShortArraySyntax: record metrics
It's quite straight forward to record informative metrics for this sniff, so let's.
Configuration menu - View commit details
-
Copy full SHA for f1646d9 - Browse repository at this point
Copy the full SHA f1646d9View commit details -
Universal/DisallowLongListSyntax: don't record metrics
... as recording just and only the `no` is not a useful metric and adding the logic to also record the `yes` would severely impact the performance of the sniff.
Configuration menu - View commit details
-
Copy full SHA for 2d06343 - Browse repository at this point
Copy the full SHA 2d06343View commit details -
Universal/DisallowShortListSyntax: improve metric recording
Record both the `yes` as well as the `no`, which makes the metric feature complete.
Configuration menu - View commit details
-
Copy full SHA for 731f000 - Browse repository at this point
Copy the full SHA 731f000View commit details -
GH Actions: bust the cache semi-regularly
Caches used in GH Actions do not get updated, they can only be replaced by a different cache with a different cache key. Now the predefined Composer install action this repo is using already creates a pretty comprehensive cache key: > `ramsey/composer-install` will auto-generate a cache key which is composed of the following elements: > * The OS image name, like `ubuntu-latest`. > * The exact PHP version, like `8.1.11`. > * The options passed via `composer-options`. > * The dependency version setting as per `dependency-versions`. > * The working directory as per `working-directory`. > * A hash of the `composer.json` and/or `composer.lock` files. This means that aside from other factors, the cache will always be busted when changes are made to the (committed) `composer.json` or the `composer.lock` file (if the latter exists in the repo). For packages running on recent versions of PHP, it also means that the cache will automatically be busted once a month when a new PHP version comes out. ### The problem For runs on older PHP versions which don't receive updates anymore, the cache will not be busted via new PHP version releases, so effectively, the cache will only be busted when a change is made to the `composer.json`/`composer.lock` file - which may not happen that frequently on low-traffic repos. But... packages _in use_ on those older PHP versions - especially dependencies of declared dependencies - may still release new versions and those new versions will not exist in the cache and will need to be downloaded each time the action is run and over time the cache gets less and less relevant as more and more packages will need to be downloaded for each run. ### The solution To combat this issue, a new `custom-cache-suffix` option has been added to the Composer install action in version 2.2.0. This new option allows for providing some extra information to add to the cache key, which allows for busting the cache based on your own additional criteria. This commit implements the use of this `custom-cache-suffix` option for all relevant workflows in this repo. Refs: * https://github.com/ramsey/composer-install/#custom-cache-suffix * https://github.com/ramsey/composer-install/releases/tag/2.2.0 Includes removing an accidental double install.
Configuration menu - View commit details
-
Copy full SHA for d3b8a6e - Browse repository at this point
Copy the full SHA d3b8a6eView commit details -
Universal/DisallowAlternativeSyntax: improve test code
While empty "leafs" of control structures is allowed, it is less common, so make the code used for the tests more realistic. Includes improvements to the inline documentation in the test code file to make it clearer what is being tested.
Configuration menu - View commit details
-
Copy full SHA for 011eaae - Browse repository at this point
Copy the full SHA 011eaaeView commit details -
Universal/DisallowAlternativeSyntax: add additional tests with empty …
…control structure bodies When a control structure condition is directly followed by a PHP close tag, a semicolon is silently inserted by PHP and the control structure will turn into a control structure without body. This commit adds additional tests to safeguard that the sniff handles this correctly.
Configuration menu - View commit details
-
Copy full SHA for 8288e14 - Browse repository at this point
Copy the full SHA 8288e14View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8af66a6 - Browse repository at this point
Copy the full SHA 8af66a6View commit details -
Universal/DisallowAlternativeSyntax: improve metrics
* Minor tweak to the metric name. * Also record metric for single line/no body control structures.
Configuration menu - View commit details
-
Copy full SHA for 0100cbe - Browse repository at this point
Copy the full SHA 0100cbeView commit details -
Universal/DisallowAlternativeSyntax: improve the error message [1]
When the `$allowWithInlineHTML` property is set to `true`, the error message could be regarded as confusing and lead to (unfounded) bug reports as the error message doesn't indicate that alternative control structures, in that case, are still allowed in combination with inline HTML. This commit adjusts the error message based on the `$allowWithInlineHTML` property to be more descriptive.
Configuration menu - View commit details
-
Copy full SHA for fb697d3 - Browse repository at this point
Copy the full SHA fb697d3View commit details -
Universal/DisallowAlternativeSyntax: improve the error message [2]
Improve the readability of the error message by moving the variable part to the end of the message.
Configuration menu - View commit details
-
Copy full SHA for a161fc2 - Browse repository at this point
Copy the full SHA a161fc2View commit details -
Universal/DisallowAlternativeSyntax: minor tweak
Group the setting of the `$code` and `$data` variables for the error message with the conditions which may adjust their value.
Configuration menu - View commit details
-
Copy full SHA for 954294a - Browse repository at this point
Copy the full SHA 954294aView commit details -
Universal/DisallowAlternativeSyntax: bug fix - ignore inline HTML in …
…nested closed scopes ... as the HTML in that case is not necessarily echo-ed out when the control structure is executed, but rather is executed when the function in the nested closed scope is called and executed, so the inline HTML does not "belong" with the control structure. This should also potentially improve performance of the sniff when large chunks of code without inline HTML are wrapped within a control structure. Includes tests.
Configuration menu - View commit details
-
Copy full SHA for 2c30b2c - Browse repository at this point
Copy the full SHA 2c30b2cView commit details -
Universal/DisallowAlternativeSyntax: bug fix - handle if/elseif state…
…ments in one go As things were, the sniff would examine - and potentially fix - each control structure keyword which could be used with alternative syntax individually. For potentially multi-part control structures, like `if` - `elseif` - `else`, this could lead to parse errors in the fixed code as mixing curly braces with alternative syntax within the same control structure "chain" is not allowed. This only comes into play when the `$allowWithInlineHTML` property has been set to `true` as that's the only time when an `if` would potentially be treated differently from the associated `else` (one containing inline HTML being left alone, the other not containing inline HTML being "fixed"). While `try` - `catch` and `do` - `while` are also potentially multi-part control structures, these do not allow for using the alternative control structure syntax, so for the purposes of this sniff, `if` - `elseif` - `else` chains are the only ones we need to take into account. Also take note of the fact that `else if` (with a space between) is not allowed when using alternative syntax, so we don't need to take the keyword potentially being split into account. This commit adjusts the sniff to handle these chains in one go and to prevent the potential parse error, by: * No longer sniffing for `T_ELSEIF` or `T_ELSE` tokens. Note: this does affect how the metrics are recorded. Previously a metric would be recorded for each keyword. Now a metric will be recorded only for the _first_ keyword in a chain. This doesn't make a difference for non-chained control structures, but it does make a difference for chained `if/else` sets. Also note: the metric will only be recorded for control structure keywords which support alternative syntax, not for _all_ control structures. This remains the same as before. * When examining the control structure for inline HTML, the sniff will now loop from the first matching control structure keyword till the `end*` and remembering each control structure keyword (opener/closer) encountered along the way in case of a chain. For multi-part chains, once an inline HTML token has been encountered, subsequent "leafs" will no longer be examined for inline HTML. This should yield a small performance improvement. * The error messages will now be thrown via a loop based on the remembered information about each keyword encountered in a chain. * Along the same lines, the fixer will now make all fixes for a "chain" in one go based on the remembered information about each keyword encountered in the chain. This should also help prevent potential fixer conflicts between sniffs. Includes a range of additional unit tests for this issue. Also includes additional unit tests to safeguard that the behaviour of PHPCS regarding parse errors in chained control structures will not change, as the sniff has a build-in presumption about the PHPCS behaviour with control structures using alternative syntax, so if at any point in the future, the PHPCS token stream for this would change, the sniff will need adjusting.
Configuration menu - View commit details
-
Copy full SHA for dc6c987 - Browse repository at this point
Copy the full SHA dc6c987View commit details -
Universal/DisallowAnonClassParentheses: remove redundant condition
... and annotate why the condition has been removed, as well as annotating a second likely redundant condition. Includes a minor tweak to improve the descriptiveness of the "with parameter" metric.
Configuration menu - View commit details
-
Copy full SHA for 8c187c0 - Browse repository at this point
Copy the full SHA 8c187c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3eaadf4 - Browse repository at this point
Copy the full SHA 3eaadf4View commit details -
Universal/DisallowFinalClass: minor code tweak
When a class is declared as `abstract`, it would attempt to record both for the `abstract`, as well as the `not abstract, not final` metric. As a metric can only be recorded once per token, this didn't actually cause any issues, but it still made the code confusing. Fixed now.
Configuration menu - View commit details
-
Copy full SHA for d718bae - Browse repository at this point
Copy the full SHA d718baeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 615b28b - Browse repository at this point
Copy the full SHA 615b28bView commit details -
Universal/DisallowFinalClass: always record the metric
As things were, the sniff would bow out if the opening brace for the class could not be found (yet) and would also not record the `final` metric in that case, even though for similar code using `abstract`, the metric _would_ be recorded. This commit ensures the `final` metric will now be recorded either way.
Configuration menu - View commit details
-
Copy full SHA for c303f58 - Browse repository at this point
Copy the full SHA c303f58View commit details -
Universal/DisallowFinalClass: act on more cases
As things were, the sniff would bow out if the opening brace for the class could not be found (yet). This commit changes the sniff to act in more cases, i.e. it does require for a (non-empty) token after the `class` keyword, but once that token is found, the sniff will act. Includes minor changes to how the message text is build up to prevent weird code snippets being show in the message. Includes additional test.
Configuration menu - View commit details
-
Copy full SHA for 407f592 - Browse repository at this point
Copy the full SHA 407f592View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2e465b - Browse repository at this point
Copy the full SHA f2e465bView commit details -
Universal/RequireFinalClass: always record the metric
As things were, the sniff would bow out if the opening brace for the class could not be found (yet) and would also not record the `not abstract, not final` metric in that case, even though for similar code using `abstract` or `final`, the metric _would_ be recorded. This commit ensures the `not abstract, not final` metric will now be recorded either way.
Configuration menu - View commit details
-
Copy full SHA for 97d836c - Browse repository at this point
Copy the full SHA 97d836cView commit details -
Universal/RequireFinalClass: act on more cases
As things were, the sniff would bow out if the opening brace for the class could not be found (yet). This commit changes the sniff to act in more cases, i.e. it does require for a (non-empty) token after the `class` keyword, but once that token is found, the sniff will act. Includes minor changes to how the message text is build up to prevent weird code snippets being show in the message. Includes additional test.
Configuration menu - View commit details
-
Copy full SHA for 7635da1 - Browse repository at this point
Copy the full SHA 7635da1View commit details -
Universal/OneStatementInShortEchoTag: prevent false positive
In convoluted code, which I hope to never encounter in real life, it _could_ be possible to encounter a semi-colon, which is not the end of the statement, in the statement being executed for the `echo`. This commit hardens the sniff to improve the handling of these. Includes additional tests.
Configuration menu - View commit details
-
Copy full SHA for d9f0cf1 - Browse repository at this point
Copy the full SHA d9f0cf1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 50b4bde - Browse repository at this point
Copy the full SHA 50b4bdeView commit details -
Universal/NoLeadingBackslash: examine imports within a group use stat…
…ement Previously the sniff would only examine the start of a complete import statement, now it will also examine the partial imports within a group `use` statement. A partial import statement within a group use starting with a leading backslash is actually a parse error, which normally gets ignored by PHPCS, but this is a very specific one, which is also auto-fixable, so may as well report it. This new error for leading backslashes for partial import statements within a group use statement will be reported using a separate error code `LeadingBackslashFoundInGroup`. Includes updated and extra unit tests.
Configuration menu - View commit details
-
Copy full SHA for 56cf767 - Browse repository at this point
Copy the full SHA 56cf767View commit details -
Universal/DisallowLonelyIf: add extra test
.. to cover an edge case which is already handled correctly.
Configuration menu - View commit details
-
Copy full SHA for 4dca87c - Browse repository at this point
Copy the full SHA 4dca87cView commit details -
Universal/DisallowLonelyIf: bow out early for a specific situation (P…
…HP close tag) If an inner "if/else" chain using alternative syntax has a PHP close tag after the `endif` instead of a semi-colon, we **know** there will need to be a PHP open tag before the closer for the "outer" `else` can be reached, so this means there will always be additional content within the outer `else` which doesn't belong with the inner `if`, i.e. it's not a lonely `if`. This commit implements bowing out early for that situation. Includes unit test. Includes minor tweaks to the inline documentation to make it clearer that the `do-while` code is part of the "Find the end of an if - else chain." block.
Configuration menu - View commit details
-
Copy full SHA for 6044232 - Browse repository at this point
Copy the full SHA 6044232View commit details -
Universal/SeparateFunctionsFromOO: update tests for enums
As the sniff uses predefined token collections from PHPCSUtils, it automatically takes PHP 8.1 `enum`s into account since Utils-1.0.0-alpha4. This commit adjusts pre-existing tests and adds an extra test to safeguard this.
Configuration menu - View commit details
-
Copy full SHA for a4c3e45 - Browse repository at this point
Copy the full SHA a4c3e45View commit details -
Universal/SeparateFunctionsFromOO: update tests for arrow functions
As the sniff uses predefined token collections from PHPCSUtils, it automatically takes PHP 7.4 arrow functions into account since Utils-1.0.0-alpha4. This commit adjusts pre-existing tests to safeguard this. Includes minor test documentation updates.
Configuration menu - View commit details
-
Copy full SHA for a73b66b - Browse repository at this point
Copy the full SHA a73b66bView commit details -
Introduce new
Modernize
standardIncludes updating CI and other dev related files to take the new standard into account.
Configuration menu - View commit details
-
Copy full SHA for 9e785bf - Browse repository at this point
Copy the full SHA 9e785bfView commit details -
✨ New
Modernize.FunctionCalls.Dirname
sniffThis new sniff will detect and, when possible, auto-fix two typical code modernizations which can be made related to the `dirname()` function: 1. Since PHP 5.3, calls to `dirname(__FILE__)` can be replaced by `__DIR__`. Errorcode: `Modernize.FunctionCalls.Dirname.FileConstant`. 2. Since PHP 7.0, nested function calls to `dirname()` can be changed to use the new `$levels` parameter. Errorcode: `Modernize.FunctionCalls.Dirname.Nested`. Depending on supported PHP versions of an application, the complete sniff can be enabled and/or just one of the error codes could be enabled. **Regarding the fixers:** The sniff - and more importantly, the fixer - take fully qualified function calls, named parameters, as well as trailing comma's in function calls into account. * If a comment is found in any of the code which would be removed by the fixer, the issues will still be flagged, but not be marked as fixable. * If the value of a pre-existing `$levels` parameter cannot be determined, the issues will still be flagged, but not be marked as fixable. Also take note that the fixer does not make any presumptions about the code style of the project. It is recommended to run the code style fixers together with or after this fixer, so those can adjust the code style to the style applicable in the project. Includes fixer. Includes unit tests. Includes documentation. Notes/Future scope: * The sniff is not yet compatible with PHPCS 4.x. * When PHPCSUtils releases its own abstract for sniffing function calls, this sniff should switch to it. Refs: * https://www.php.net/manual/en/function.dirname.php * PHP 5.3: https://php-legacy-docs.zend.com/manual/php5/en/migration53.global-constants * PHp 7.0: https://www.php.net/manual/en/migration70.changed-functions.php#migration70.changed-functions.core Note: the parameter was originally called `$depth`, but has since been renamed to `$levels`.
Configuration menu - View commit details
-
Copy full SHA for 4473589 - Browse repository at this point
Copy the full SHA 4473589View commit details -
Universal/NoReservedKeywordParameterNames: minor code simplification
... which can be made now support for PHPCS < 3.7.1 has been dropped. The sniff now only listens to tokens which are accepted by the `FunctionDeclarations::getParameters()` method, so checking for an exception should be unnecessary. Includes removing a stray `$paramNames` variable setting, which is never used.
Configuration menu - View commit details
-
Copy full SHA for 63d67fe - Browse repository at this point
Copy the full SHA 63d67feView commit details -
Configuration menu - View commit details
-
Copy full SHA for df7e718 - Browse repository at this point
Copy the full SHA df7e718View commit details -
Universal/NoReservedKeywordParameterNames: add extra tests
... to safeguard bowing out for function declarations without parameters and that the sniff stays silent for unfinished function declarations.
Configuration menu - View commit details
-
Copy full SHA for d9e60ce - Browse repository at this point
Copy the full SHA d9e60ceView commit details -
Universal/NoReservedKeywordParameterNames: make the check case-insens…
…itive While parameters (variables) are case-sensitive in PHP, keywords are not. This commit improves the sniff to check for the keyword used in parameter names in a case-insensitive manner to make this sniff independent of code style rules regarding the case for parameter names. Includes additional tests.
Configuration menu - View commit details
-
Copy full SHA for 9dd2e18 - Browse repository at this point
Copy the full SHA 9dd2e18View commit details -
Universal/NoReservedKeywordParameterNames: add tests with PHP 8.0 con…
…structor property promotion ... to confirm that properties set via the constructor are also checked. Properties set via the constructor can be _passed_ to the constructor using named parameters, so this check should also apply to those properties.
Configuration menu - View commit details
-
Copy full SHA for 0627b70 - Browse repository at this point
Copy the full SHA 0627b70View commit details -
Universal/DisallowUse[Class|Const|Function]: minor code coverage tweak
Ignore a statement which should never be reachable (defense in depth code).
Configuration menu - View commit details
-
Copy full SHA for 765e4b3 - Browse repository at this point
Copy the full SHA 765e4b3View commit details -
Universal/ForeachUniqueAssignment: fix some tests
These tests weren't testing the sniff well enough.
Configuration menu - View commit details
-
Copy full SHA for bd76b7c - Browse repository at this point
Copy the full SHA bd76b7cView commit details -
Universal/ForeachUniqueAssignment: improve analysis for foreach list …
…assignments This commit: * Prevents "accidentally correct" handling of code like `foreach ($data as [$id => $id])`, where the first `$id` is not the key for the foreach assignment, so is not the concern of this sniff. * Improves analysis for key vs value when the value is a list assignment. Previously, the key and the value would just be compared as found. Now, each individual assignment in the list will be compared against the key. Notes: nested list assignment are not (yet) taken into account. Includes improved and additional tests.
Configuration menu - View commit details
-
Copy full SHA for 1559d36 - Browse repository at this point
Copy the full SHA 1559d36View commit details -
Universal/DisallowStandalonePostIncrementDecrement: allow for stateme…
…nt ending with close tag A stand-alone statement doesn't necessarily have to end with a semi-colon. It can also end on a PHP close tag. This commit adjusts the sniff to take this into account. Includes adjusting some pre-existing tests to safeguard the change.
Configuration menu - View commit details
-
Copy full SHA for c9143c0 - Browse repository at this point
Copy the full SHA c9143c0View commit details -
Universal/DuplicateArrayKey: add support for detecting duplicate key …
…PHP cross-version How array keys for array items without keys are being determined, has changed in PHP 8.0. Previously, the key would be the highest previously seen numeric key + 1, providing the highest previously seen numeric key was 0 or higher. Otherwise, it would be 0. As of PHP 8.0, the key will be the highest previously seen numeric key + 1, independently of whether the previously seen numeric key was negative. The sniff will now calculate and track the keys for unkeyed array items using both the PHP < 8.0 logic as well as the PHP >= 8.0 logic. If a duplicate key would yield the same error in both PHP < 8.0 as well as PHP >= 8.0, the `Found` error code will be used. If a duplicate key would only be a duplicate on PHP < 8.0, the `FoundForPHPlt80` error code will be used and the error message will indicate the error only applies to PHP < 8.0. If a duplicate key would only be a duplicate on PHP > 8.0, the `FoundForPHPgte80` and the error message will indicate the error only applies to PHP >= 8.0. If the end-user has set the `php_version` configuration option, the sniff will respect that and only report duplicate keys for the PHP version indicated. Includes additional unit tests. P.S.: the code could possible be made smarter, but for now, this is fine as the goal of accounting for this change in PHP has been achieved. Refs: * https://3v4l.org/liBXD * https://wiki.php.net/rfc/negative_array_index * https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options#setting-the-php-version
Configuration menu - View commit details
-
Copy full SHA for 3342beb - Browse repository at this point
Copy the full SHA 3342bebView commit details -
Universal/DuplicateArrayKey: code simplification
No functional changes.
Configuration menu - View commit details
-
Copy full SHA for 012f9fe - Browse repository at this point
Copy the full SHA 012f9feView commit details -
Configuration menu - View commit details
-
Copy full SHA for d830ed3 - Browse repository at this point
Copy the full SHA d830ed3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4bd1a76 - Browse repository at this point
Copy the full SHA 4bd1a76View commit details -
Configuration menu - View commit details
-
Copy full SHA for c44b775 - Browse repository at this point
Copy the full SHA c44b775View commit details -
Universal/PrecisionAlignment: update comment
... now upstream PR 3639 has been merged. Ref: * squizlabs/PHP_CodeSniffer 3639
Configuration menu - View commit details
-
Copy full SHA for 7d2f692 - Browse repository at this point
Copy the full SHA 7d2f692View commit details -
Configuration menu - View commit details
-
Copy full SHA for 082a661 - Browse repository at this point
Copy the full SHA 082a661View commit details -
Universal/StaticInFinalClass: handle
static
when used in arrow func……tion ... as long as the arrow function is within an OO construct which can be `final`. Includes tests. Includes enhancing the closure test a little as well.
Configuration menu - View commit details
-
Copy full SHA for f6595e4 - Browse repository at this point
Copy the full SHA f6595e4View commit details -
Composer: add PHPCSDevCS to the dependencies
PHPCSDevCS was previously not added to the `require-dev` dependencies as the minimum supported PHPCS version conflicted with the minimum supported PHPCS version of this package. Now this is no longer the case, the package can be safely added to `require-dev` and work-arounds can be removed.
Configuration menu - View commit details
-
Copy full SHA for 45f09c9 - Browse repository at this point
Copy the full SHA 45f09c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1081b3 - Browse repository at this point
Copy the full SHA c1081b3View commit details -
GH Actions/test: remove unused steps related to PHPCS 4.x
These steps/directives all relate to testing against PHPCS 4.x, but this package is not being tested against PHPCS 4.x at this time and when this will be enabled again, these work-arounds may well no longer be needed anymore anyway, so let's remove it for now and re-evaluate what is needed when testing against PHPCS 4.x is re-enabled.
Configuration menu - View commit details
-
Copy full SHA for bb3597a - Browse repository at this point
Copy the full SHA bb3597aView commit details -
GH Actions: no longer allow builds to fail against PHP 8.2
* Update the PHP version on which the CS run for this package is run to PHP `latest`. * Remove the `continue-on-error` for PHP 8.2 in the `test` workflow (and remove the `experimental` key, which is now no longer used. * Update the "Tested against" badge in the README.
Configuration menu - View commit details
-
Copy full SHA for 6d828cb - Browse repository at this point
Copy the full SHA 6d828cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2584ccf - Browse repository at this point
Copy the full SHA 2584ccfView commit details -
* Update links to workflows. * Use re-usable links for links which are used repeatedly.
Configuration menu - View commit details
-
Copy full SHA for 25efbd5 - Browse repository at this point
Copy the full SHA 25efbd5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f603c9 - Browse repository at this point
Copy the full SHA 4f603c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f8e8c2 - Browse repository at this point
Copy the full SHA 6f8e8c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for c6c4cfe - Browse repository at this point
Copy the full SHA c6c4cfeView commit details -
GH Actions/basics: move composer validate up
... to be before the adjustments made to the composer.json file.
Configuration menu - View commit details
-
Copy full SHA for b38a526 - Browse repository at this point
Copy the full SHA b38a526View commit details -
GH Actions: add new check with additional QA for markdown files
_Based on a similar workflow previously added to PHPCSUtils._ Remark offers a number of "rules" which are useful, such as checking that links and link definitions match up, verifying all used links work and some formatting checks. The rule configuration is contained in the .remarkrc file. Files/directories to be ignored can be listed in the .remarkignore file which supports glob syntax, like .gitignore. Note: .-prefixed files and directories are excluded by default. To include those in the scan, they have to be passed explicitly on the command-line. To run locally, follow the same steps as per the GitHub actions workflow. Note: the workflow contains a double-run of remark-lint to allow viewing the results both in a human readable way in the actions transscripts, as well as getting annotations for found issue in PRs. Refs: * https://github.com/remarkjs/remark/tree/main/packages/remark-cli * https://github.com/remarkjs/remark-lint * https://github.com/remarkjs/remark-gfm * https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-consistent * https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-recommended * https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-markdown-style-guide Additional (external) plugins included: * https://github.com/vhf/remark-lint-heading-whitespace * https://github.com/wemake-services/remark-lint-list-item-punctuation * https://github.com/laysent/remark-lint-plugins/tree/HEAD/packages/remark-lint-match-punctuation * https://github.com/olizilla/remark-lint-no-hr-after-heading * https://github.com/wemake-services/remark-lint-are-links-valid * https://github.com/remarkjs/remark-validate-links
Configuration menu - View commit details
-
Copy full SHA for 88a5985 - Browse repository at this point
Copy the full SHA 88a5985View commit details -
GH Actions: add Yamllint to QA basics
... to loosely safeguard valid and consistent yaml files. Includes adding a configuration file which loosens up the default ruleset to a degree I'm comfortable with. Ref: https://yamllint.readthedocs.io/
Configuration menu - View commit details
-
Copy full SHA for bb8c884 - Browse repository at this point
Copy the full SHA bb8c884View commit details -
Modernize/Dirname: magic constants are case-insensitive
Includes a few updated unit tests to safeguard the fix.
Configuration menu - View commit details
-
Copy full SHA for 86293d0 - Browse repository at this point
Copy the full SHA 86293d0View commit details -
GH Actions: minor simplification
... of the bash `date` command in the earlier pulled cache busting.
Configuration menu - View commit details
-
Copy full SHA for 12ef67f - Browse repository at this point
Copy the full SHA 12ef67fView commit details -
GH Actions: update PHP versions in workflows
PHP 8.2 has been released today 🎉 and the `setup-php` action has announced support for PHP 8.3, so adding PHP 8.3 to the matrix and no longer allowing PHP 8.2 to fail the build. Note: PHPCS does not (yet) have full syntax support for PHP 8.2, but it does have runtime support (for the most part, see squizlabs/PHP_CodeSniffer 3629). Builds against PHP 8.3 are still allowed to fail for now.
Configuration menu - View commit details
-
Copy full SHA for 050ae07 - Browse repository at this point
Copy the full SHA 050ae07View commit details -
.gitattributes: update export-ignores
Follow up on 186 which added some new configuration files, but didn't export ignore them. Includes aligning the values for better readability.
Configuration menu - View commit details
-
Copy full SHA for d6ca9a0 - Browse repository at this point
Copy the full SHA d6ca9a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9dc1bc5 - Browse repository at this point
Copy the full SHA 9dc1bc5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f8e6bb - Browse repository at this point
Copy the full SHA 1f8e6bbView commit details -
Rewrite the sniff according to the PR suggestions
To do: add fixers and metric
Configuration menu - View commit details
-
Copy full SHA for b89ae7e - Browse repository at this point
Copy the full SHA b89ae7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a689164 - Browse repository at this point
Copy the full SHA a689164View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ddfaa6 - Browse repository at this point
Copy the full SHA 1ddfaa6View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc79476 - Browse repository at this point
Copy the full SHA fc79476View commit details -
Configuration menu - View commit details
-
Copy full SHA for 71b2116 - Browse repository at this point
Copy the full SHA 71b2116View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8562dce - Browse repository at this point
Copy the full SHA 8562dceView commit details -
Configuration menu - View commit details
-
Copy full SHA for fd64ff1 - Browse repository at this point
Copy the full SHA fd64ff1View commit details -
Merge remote-tracking branch 'origin/declare-statements-curly-bracket…
…s' into declare-statements-curly-brackets
Configuration menu - View commit details
-
Copy full SHA for b5e85cb - Browse repository at this point
Copy the full SHA b5e85cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d759b3 - Browse repository at this point
Copy the full SHA 2d759b3View commit details