Ecosyste.ms: OpenCollective
An open API service for software projects hosted on Open Collective.
github.com/PHPCSStandards/PHPCSUtils
A suite of utility functions for use with PHP_CodeSniffer
https://github.com/PHPCSStandards/PHPCSUtils
* Add support for arrow functions to the `BCFile::findEndOfStatement()` method as per upstream ...
23c5d8984d921ad5e17858ff73781e0c0e8a2aba authored almost 5 years ago by jrfnl <[email protected]>The `fn` for a potential arrow function will be tokenized as `T_FN`, even when there are no pare...
ce476a40b7ec02705a76e5c4123f9dae70113d2b authored almost 5 years ago by jrfnl <[email protected]>... for backwards compatibility.
As per upstream commit squizlabs/PHP_CodeSniffer@37dda44ed3bf3...
5d50b94a5336b3ce209aa1f52fe59044bffc7b7c authored almost 5 years ago by jrfnl <[email protected]>087409092b64325fcb5f3d6b52ee2e8621ec3142 authored almost 5 years ago by jrfnl <[email protected]>
Add support for arrow functions to the `BCFile::getMethodProperties()` and the sister-method `Fu...
10f0daeb5a6d289ada0216519635c4ca6dbf37cf authored almost 5 years ago by jrfnl <[email protected]>* Use the `FunctionDeclarations::getArrowFunctionOpenClose()` utility to determine whether a tok...
a4abd344a396c18c15186463b93e2a1289a723dc authored almost 5 years ago by jrfnl <[email protected]>* Use the `FunctionDeclarations::isArrowFunction()` utility to determine whether a token is an a...
2cd5342eff2c7623f13ab8c2dfc2e2b2b3715b74 authored almost 5 years ago by jrfnl <[email protected]>d6ddf4e728cd919f3b34d4726a171c0a3d9f7b29 authored almost 5 years ago by jrfnl <[email protected]>
Add support for arrow functions to the `BCFile::getMethodParameters()` and the sister-method `Fu...
defe04f3c122ad051dc6451646730cca43ae2c07 authored almost 5 years ago by jrfnl <[email protected]>... for backwards compatibility to the `BCFile::isReference()` and the sister-method `Operators:...
f2ebedb5f5277542bfac85f443a5c5bf750fdc76 authored almost 5 years ago by jrfnl <[email protected]>
This introduces two new utilities to allow for detecting and analyzing PHP 7.4 arrow functions.
...
PHPCS does not adjust the return type token for arrow functions to `T_STRING` until PHPCS 3.5.3/...
05464c7beb790089b07c483e742ea3573698229a authored almost 5 years ago by jrfnl <[email protected]>Documentation: update `@copyright` year
024e95789b3ea8f09810d51de5f5e9cd540fc2ea authored almost 5 years ago by Juliette <[email protected]>531c5b423140ab311e355ce8f08cedd66b512eac authored almost 5 years ago by jrfnl <[email protected]>
Build/PHPCS: remove temporary exclusion
ea0d3314194ababbdced9e043f03a22c09c535c6 authored almost 5 years ago by Juliette <[email protected]>b4443d902e4764477772392cd2f0ca72d156e497 authored almost 5 years ago by jrfnl <[email protected]>
Travis: run sniff stage of PHP 7.4
1bd121969b2cff7caad30f4d73ae1e5850b83588 authored almost 5 years ago by Juliette <[email protected]>4ed622d143d48bb252b7e13793eb34f157026c97 authored almost 5 years ago by jrfnl <[email protected]>
BCFile::getCondition()/Conditions::getCondition(): sync with PHPCS 3.5.4 / new $first parameter
c67b2fb23ab927fe49d6386847c7ab9ebc72ea51 authored almost 5 years ago by Juliette <[email protected]>PHPCS 3.5.4 introduces a new `$first` parameter to the `File::getCondition()` function.
The PHP...
0392f8f2b3e682f40cec4b16e38ad7c30e6c8a5b authored almost 5 years ago by jrfnl <[email protected]>New Utils\ControlStructures class
8d9cf7b8fa6049bb7d9fda8faa61932277a19bbe authored almost 5 years ago by Juliette <[email protected]>
This adds three new utility methods:
* `hasBody()` - to check whether a control structure has a ...
Tokens\Collections::$alternativeControlStructureSyntaxCloserTokens: add missing T_ENDDECLARE
fa998697d20c44bf208e8b32a355b951de5a39aa authored almost 5 years ago by Juliette <[email protected]>4961a93785668e7c129df547bc45b7039be8658f authored almost 5 years ago by jrfnl <[email protected]>
Tokens\Collections: add new `$alternativeControlStructureSyntaxCloserTokens` property
f337ce93d986f7f43482bb7439d4f755e35f9c9a authored almost 5 years ago by Juliette <[email protected]>e76b615734f9536af0d7af2f77d5063f05e5b0ca authored almost 5 years ago by jrfnl <[email protected]>
Travis: remove redundant condition
e0d203504f94df0f2a6794c09667afadb360cdc0 authored almost 5 years ago by Juliette <[email protected]>As the tests for this repo do not use the PHPCS native test classes, there is no need for toggli...
d8d1d3d3c34fd2b4d69f847783d2665a4648289a authored almost 5 years ago by jrfnl <[email protected]>1.0.0-alpha1
17c369202671ed42cfb9e653c3a865a68595fac6 authored almost 5 years ago by Juliette <[email protected]>New Fixers\SpacesFixer class
0d57749c4c32dd45eea4f39d65034e0f126aebbd authored almost 5 years ago by Juliette <[email protected]>New `Abstracts\AbstractArrayDeclarationSniff`
02db423fb3ce0ab456bc775da2dab897e31d703e authored almost 5 years ago by Juliette <[email protected]>Operators::isUnaryPlusMinus(): add tests with PHP 7.4 numeric literals using underscores
01238ebb16a09779b12ea4ceb56c309fbb384b56 authored almost 5 years ago by Juliette <[email protected]>... to safeguard that the function will handle these correctly.
184febe009adc214eaed941ddb1054623794d07b authored almost 5 years ago by jrfnl <[email protected]>This new class offers one versatile utility function `checkAndFix()` to - as the name implies - ...
aa30b057645907727c5ad710eeedc1def0f64345 authored almost 5 years ago by jrfnl <[email protected]>This is a helper method which can optionally be used from the `processKey()` method to retrieve ...
c54af67e318c7e81f516b05c14763dfc5946334d authored almost 5 years ago by jrfnl <[email protected]>New abstract sniff to examine array declarations.
This abstract sets up a number of helpful pro...
8dcca5ee56ed9e87f13ff7db6e934ec8b4294961 authored almost 5 years ago by jrfnl <[email protected]>New Utils\Numbers class
d5ae80057f35805951294c36ebf5444ecd9254ca authored almost 5 years ago by Juliette <[email protected]>Variables::isSuperglobal(): implement use of TextStrings::stripQuotes()
3879272fed784b44d052abbfa523e65ae594f4cf authored almost 5 years ago by Juliette <[email protected]>PHP 7.4 introduced numeric literal separators which break number tokenization in older PHP versi...
695d330fc08e8e39ce58d9e72b2e305964c97680 authored almost 5 years ago by jrfnl <[email protected]>bb245d175eeaeab0a148d148b40d6daf6f77ae9d authored almost 5 years ago by jrfnl <[email protected]>
New Utils\TextStrings class
e72a83a5588ffb73b8db5f123acf6cf8a0e9bcbc authored almost 5 years ago by Juliette <[email protected]>New Utils\Orthography class
e951d5454403682b51b8a69a5b5e250b7b608901 authored almost 5 years ago by Juliette <[email protected]>Utils\Arrays: add new getDoubleArrowPtr() utility method
179baafcb6408c55e5d982f9cebb2bd19c9d00ec authored almost 5 years ago by Juliette <[email protected]>
This introduces two new methods:
* `getCompleteTextString()` - to retrieve the complete text str...
The default charset for the PHP iconv extension changed in PHP 5.6 from ISO-8859-1 to UTF-8.
The...
This class adds three new utility methods for dealing with the contents of arbitrary text string...
844f2199cc36d116df2cf44cdd8477f18c2c21d2 authored almost 5 years ago by jrfnl <[email protected]>
This adds a new utility method:
* `getDoubleArrowPtr()` - to find the position of a double arrow...
Utils\Arrays: add new getOpenClose() utility method
e438508d6258d00394e5c5f13bc0db938143600a authored almost 5 years ago by Juliette <[email protected]>Utils\PassedParameters: fix PHPC cross-version compatibility for short arrays
01bc6e0c820368f736af9378b090e90e3254930f authored almost 5 years ago by Juliette <[email protected]>
This adds a new utility method:
* `getOpenClose()` - to retrieve the open and close brackets for...
... by implementing support for passing a `T_OPEN_SQUARE_BRACKET` token, as well as making sure ...
8cf8ee385222dff2eccda40a6f588d9d81fc0c81 authored almost 5 years ago by jrfnl <[email protected]>Variables::getMemberProperties(): minor documentation update
f65bd09e23fb204b224e21e4803daef098843d1a authored almost 5 years ago by Juliette <[email protected]>Arrays::isShortArray(): fix compatibility with older PHPCS versions
139d8a09d794183dacf269089a95246dd96d5a1b authored almost 5 years ago by Juliette <[email protected]>7ac877d1afd3e0dfbdaa1d91a9fa48d662002bff authored almost 5 years ago by jrfnl <[email protected]>
Work around a bug in the tokenizer of PHPCS < 2.8.0 where a `[` would be tokenized as T_OPEN_SQU...
5ebc2024faa42bb0e261778b5b60bdcb982e81ec authored almost 5 years ago by jrfnl <[email protected]>Work around a bug in the tokenizer of PHPCS 2.8.0 and 2.8.1 where array dereferencing of a varia...
cd2fd3ee0b70ea68210d6d7cd7ea5facfecccc71 authored almost 5 years ago by jrfnl <[email protected]>Work around a bug in the tokenizer of PHPCS < 2.9.0 where array dereferencing of short arrays an...
7ac307b5df267d1b22c37a7f8cfd36d9b14f62ae authored almost 5 years ago by jrfnl <[email protected]>The PHPCS tokenizer has had a number of issues over the years where the brackets for short array...
16aadca3b358c459b2ef499de68a29a6c104ab95 authored almost 5 years ago by jrfnl <[email protected]>PHPCS 2.8.0 - 3.2.3 contained a bug where a square open bracket `[` as the first code content af...
a1af576d48021a4c9514a0ebd72b7e2c5d4ba475 authored almost 5 years ago by jrfnl <[email protected]>New Utils\Arrays class
64b31cc785f4c377c10c4d87ab5e9c718ff196fc authored almost 5 years ago by Juliette <[email protected]>
This adds a new utility method:
* `isShortArray()` - to check whether a short array is in actual...
Utils\Lists: add new getAssignments() utility method
a6f4fae6f8557861885aa7919a6405958848ea53 authored almost 5 years ago by Juliette <[email protected]>
This adds a new utility method:
* `getAssignments()` - to retrieve information on the assignment...
Utils\Lists: add new getOpenClose() utility method
ed74c0739c03265b48ebfde3cfbab1f76f79c207 authored almost 5 years ago by Juliette <[email protected]>
This adds a new utility method:
* `getOpenClose()` - to retrieve the open and close brackets for...
Tokens\Collections: minor documentation tweak
7e292c3ff0f01763e0222159f403ad61f3db09d0 authored almost 5 years ago by Juliette <[email protected]>cec4d243aa4988bb3938ea4b9e4b4ae383a54754 authored almost 5 years ago by jrfnl <[email protected]>
New Utils\Lists class
d8d28a1cc55e047597684c0dd422abf6e92d4300 authored almost 5 years ago by Juliette <[email protected]>New Utils\PassedParameters class
01aa0d13efc202aa62c2023b46bfee750d224f87 authored almost 5 years ago by Juliette <[email protected]>Utils\Operators: add new isShortTernary() utility method
1bb684a157e5c56754e86c408d6ca1fd1b2f2ac8 authored almost 5 years ago by Juliette <[email protected]>PHPCS < 2.8.0 contained a bug where a square open bracket `[` directly following a closing curly...
9e895f718587bb55fe04b2ab5d8ef385f9aa80cb authored almost 5 years ago by jrfnl <[email protected]>Add unit tests safeguarding that the method handles upstream tokenizer bug 1381 correctly.
Ref:...
e892a7dd13484e40b5c0fc302ca65f9f64912366 authored almost 5 years ago by jrfnl <[email protected]>PHPCS 2.8.0 - 3.2.3 contained a bug where a square open bracket `[` as the first code content af...
ae786c1cd9747c4d53842067fd5ec110f601f130 authored almost 5 years ago by jrfnl <[email protected]>
This adds a new utility method:
* `isShortList()` - to check whether a short array is in actual ...
This introduces four new methods to PHPCSUtils.
These methods are intended for use with:
* `T_S...
This adds a new utility method:
* `isShortTernary()` - to check whether a ternary then/else oper...
Utils\Operators: add new isUnaryPlusMinus() utility method
72a6c3cb7521e8444f25ee2111b92e497343b78f authored almost 5 years ago by Juliette <[email protected]>The PHP 5.5 `T_YIELD` token was not backfilled in PHPCS until version 3.1.0.
This commit adds w...
a35f5edb1f71c7af8529348b4d68ed9597bf4397 authored almost 5 years ago by jrfnl <[email protected]>
This adds a new utility method:
* `isUnaryPlusMinus()` - to check whether a plus/minus sign is a...
Operators::isReference(): various improvements
42829256819e523decc48f1ebd9a7e7903f79b75 authored almost 5 years ago by Juliette <[email protected]>PHPCS 2.8.0 - 3.2.3 contained a bug where a square open bracket `[` as the first code content af...
95fc47e5c1ce9e78921cae4d137df70bbb2d9b40 authored almost 5 years ago by jrfnl <[email protected]>8e2079ed90b1e4f40a7af99612ccec4e397ef317 authored almost 5 years ago by jrfnl <[email protected]>
Includes unit test.
b2b68ef82e751c5cde2dfdd71431ae3dce4208e0 authored almost 5 years ago by jrfnl <[email protected]>...and remove redundant code from the "is this a function parameter passed by reference" check.
e964ee7558fa99ba8aa38c7954a8883039dc9a21 authored almost 5 years ago by jrfnl <[email protected]>New Utils\Operators class
760b438d2b925cf7d563f2149a6573d6e4d4c97b authored almost 5 years ago by Juliette <[email protected]>New Utils\Namespaces class
1005985e13687a0244bfd82f4cf333085150909f authored almost 5 years ago by Juliette <[email protected]>FunctionDeclarations::getParameters(): implement use of UseStatements::isClosureUse()
8f4303fbb6d25d84f112fac9fabcd69933033da2 authored almost 5 years ago by Juliette <[email protected]>40201e785dfcae6c5c89df39a0960417da99662d authored almost 5 years ago by jrfnl <[email protected]>
New `PHPCSUtils\Utils\Operators` class which will initially hold an improved version of the `Fil...
e25c326f10c11889412203a4ca46498a80d988ce authored almost 5 years ago by jrfnl <[email protected]>This method runs into a bug in PHPCS where curlies for variable variables received an incorrect ...
0f9f99958ae45fe7562d0d2bc503150417028e1e authored almost 5 years ago by jrfnl <[email protected]>This introduces six new methods to PHPCSUtils.
Methods:
* `getType()` - to determine what a T_N...
... and improve the exception message thrown when a non-closure `T_USE` token was passed.
ef04c0bc37810986cc78a239a799c7142ede0b7d authored almost 5 years ago by jrfnl <[email protected]>New Utils\UseStatements class
590189a266b26ec9e38067482202d3fb450ff2dc authored almost 5 years ago by Juliette <[email protected]>
For this class to be compatible with PHPCS 2.6.0 - `master`, two work-arounds need to be added:
...
This introduces five new utility methods to PHPCSUtils.
Methods:
* `getType()` - to determine t...
Utils\Variables: add new reserved name related utility methods
cc7cf360992ca83d176140906eac080b5e78325c authored almost 5 years ago by Juliette <[email protected]>
Add a new property related to PHP reserved variables names:
* `$phpReservedVars`
Also adds thre...
ac4219bab8fa1afbee99768fff8c7a0890d30cd6 authored almost 5 years ago by jrfnl <[email protected]>Variables::getMemberProperties(): various improvements
ff2cbd5dbf642af01bb48c5be1249197c91022cc authored almost 5 years ago by Juliette <[email protected]>* Move the modifier keywords token array to a class property in the `PHPCSUtils\Tokens\Collectio...
7b05d705c60e2d4ea56f1c211c07c462ad05c73a authored almost 5 years ago by jrfnl <[email protected]>Includes unit test.
4b9d20d28227d0a71ff7d9349a4445afabaeb306 authored almost 5 years ago by jrfnl <[email protected]>