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
The parse error warning is the purpose of this method, so doesn't belong here.
As an "interface...
5f4b1d652777b41bc8908d3408807befce965c84 authored almost 5 years ago by jrfnl <[email protected]>New Utils\Variables class
ab45a9b2bb92a461d999097cd86c8587a694676d authored almost 5 years ago by Juliette <[email protected]>New `PHPCSUtils\Utils\Variables` class which will hold an improved version of the `File::getMemb...
ee1100660cfa88b32ba553dce58805c95001d3b1 authored almost 5 years ago by jrfnl <[email protected]>Util\FunctionDeclarations: add new reserved name related utility methods
c8c37be01b414cfa7924ee994eb6dd63d5b7abc7 authored almost 5 years ago by Juliette <[email protected]>BCFile:GetMethodParametersTest: minor documentation fix
aa0ebd0d58119aa394bb1248fe40c5a27eb19463 authored almost 5 years ago by Juliette <[email protected]>
Add three new properties related to PHP reserved function names:
* `$magicFunctions`
* `$magicMe...
Tokens\Collections: New `$parameterTypeTokens` token array
e4686d20e1d18b0a9a2b3caa04c1382d5a520192 authored almost 5 years ago by Juliette <[email protected]>FunctionDeclarations::getParameters(): various improvements
1f6d1aeffe8a4b9e677394a1506766ad513b2e85 authored almost 5 years ago by Juliette <[email protected]>6ffc65d88ce2986f872667e5651f864ab445bfe2 authored almost 5 years ago by jrfnl <[email protected]>
d387025a797040a6a37e78f6c346ec8431977267 authored almost 5 years ago by jrfnl <[email protected]>
Once the equal sign has been found, we know that everything else until the end of the parameter ...
d3823774afe15e3cbe1d2fbd6b3c45bc90a50606 authored almost 5 years ago by jrfnl <[email protected]>Prevent the method from walking far, far ahead if it would have been passed an import `use` or a...
8bda08b5563e853536e31cf1b4e8c5d8d15d48b7 authored almost 5 years ago by jrfnl <[email protected]>No change in behaviour (yet).
c84294b34e53f055274ba289b4292389e2a344d5 authored almost 5 years ago by jrfnl <[email protected]>Includes unit test.
bf7a9d32a75199d32255b1720cfcb5a65ba9f566 authored almost 5 years ago by jrfnl <[email protected]>e233aff81671aba33f23868998d3cc1a9d2583cc authored almost 5 years ago by jrfnl <[email protected]>
FunctionDeclarations::getProperties(): various improvements
60e120edb015ea3aee91a6bf2bc9107604143f2b authored almost 5 years ago by Juliette <[email protected]>The `getParameters()` method already returns stack pointers to both the "start" and "end" of a p...
766bfe1c3b3b8a39aff8b609636eea268253de5e authored almost 5 years ago by jrfnl <[email protected]>
No need to walk the same set of tokens twice to determine whether a function has a body.
We alre...
* Move the return type tokens array to a class property in the `PHPCSUtils\Tokens\Collections` c...
e47ed7d3a098bdfb09f7b785563bba98b8427cf4 authored almost 5 years ago by jrfnl <[email protected]>Includes unit test.
37e7788265b7edf64d68526162ae3693f52e230a authored almost 5 years ago by jrfnl <[email protected]>While probably unlikely to come across in the wild, the utility should handle this type of code ...
648bd4143d5fff7bf834d4f59387e2aeaae95f10 authored almost 5 years ago by jrfnl <[email protected]>New Utils\FunctionDeclarations class
39b8a3d93ef59c5dfcd39d459c18efb81daa5aa8 authored almost 5 years ago by Juliette <[email protected]>New `PHPCSUtils\Utils\FunctionDeclarations` class which will hold improved versions of the `File...
dcf10fbd1762e8d80343810adf9b277974858541 authored almost 5 years ago by jrfnl <[email protected]>Util\ObjectDeclarations: add findExtendedInterfaceNames() method
bcd926217bc69f38b20fb08bd2c1d17e2e261bcc authored almost 5 years ago by Juliette <[email protected]>Interfaces can extend more than one interface (in contrast to classes) and both the PHPCS native...
ed7eb7f2a1dff8ea94128a4dc67a731480b45745 authored almost 5 years ago by jrfnl <[email protected]>ObjectDeclarations::findExtendedClassName/findImplementedInterfaceNames(): various improvements
2c32de9d7052d50ba2b3588276042474ec688502 authored almost 5 years ago by Juliette <[email protected]>ObjectDeclarations::getClassProperties(): various improvements
b595be0230f9db5441df1852d47da89e27e644f9 authored almost 5 years ago by Juliette <[email protected]>Previously, the method would use the `GetTokensAsString::normal()` method to retrieve the name o...
02ed27073cc924acfe150ac00fad7939cd82b765 authored almost 5 years ago by jrfnl <[email protected]>As the logic needed for these two methods, as well as for the (upcoming) `findImplementedInterfa...
cdfc07171d6bfe365020b03734cc1d55d34881b1 authored almost 5 years ago by jrfnl <[email protected]>... as well as handling of comments within the class declaration.
While probably unlikely to co...
5173e87d1ef6e699b18e32444f75f8c1193cfdcd authored almost 5 years ago by jrfnl <[email protected]>... as well as handling of comments within the class declaration.
While probably unlikely to co...
210c89d359a5e41de928234a4b33f66a96f3877c authored almost 5 years ago by jrfnl <[email protected]>* Move the class modifier keywords array to a class property in the `PHPCSUtils\Tokens\Collectio...
e2c7927e7ee7018d7166977ccba2705d5bae08ae authored almost 5 years ago by jrfnl <[email protected]>A class cannot both be `abstract` as well as `final`, so the utility method should not have to a...
5f2a81107d3a94de3c044f8d0067674420b7b1ec authored almost 5 years ago by jrfnl <[email protected]>Includes unit test.
d55367f345389cf4aff620eb7ad0560d532a04df authored almost 5 years ago by jrfnl <[email protected]>... as well as handling of unorthodox placement of DocBlocks.
While probably unlikely to come a...
751c0541a445870f8296326ca813633f3395e398 authored almost 5 years ago by jrfnl <[email protected]>Objectdeclarations::getName(): various improvements
d4c4dbfcddc20dee66be5dbaaf1a5939b7f72d06 authored almost 5 years ago by Juliette <[email protected]>Includes unit test.
b169c3778c5976b9fd7f9f8391ffead9216c0b7f authored almost 5 years ago by jrfnl <[email protected]>While certain names may be invalid, such as construct names starting with a number, for the purp...
a5fddd60da7a33a848161f4eddfe31879e3efd8a authored almost 5 years ago by jrfnl <[email protected]>New Utils\ObjectDeclarations class
bf351ded7952cdea9c8ee89221d36e8fe7b50560 authored almost 5 years ago by Juliette <[email protected]>New `PHPCSUtils\Utils\ObjectDeclarations` class which will hold improved versions of the `File::...
ff505923dc8056f36d931426a4d8d02563f120ff authored almost 5 years ago by jrfnl <[email protected]>BCFile::getClassProperties(): add unit tests
58543a291955aa7e396f93902946677439925a3c authored almost 5 years ago by Juliette <[email protected]>BCFile::getDeclarationName(): add unit tests and fix compatibility with older PHPCS versions
f274b7b7b9c6be2642041372f7c2cc0fbef1e8dd authored almost 5 years ago by Juliette <[email protected]>e9748a946b13225bb124769617907d6b3f9b40d1 authored almost 5 years ago by jrfnl <[email protected]>
In PHPCS 2.6.0, when live coding, the last token in a file can be tokenized as `T_STRING`, but w...
579dc061bc62e2dc63124be922d065edebaa018e authored almost 5 years ago by jrfnl <[email protected]>In PHPCS 2.x, for JS files, ES6 method were not tokenized as `T_FUNCTION`.
As the `class` condi...
bec84c41db4dd40aac6db6dafef838b8a9365a31 authored almost 5 years ago by jrfnl <[email protected]>In PHPCS 2.x, for JS files, ES6 classes were not tokenized as `T_CLASS`.
This commit adds work-...
15b4fe1b816a4a32effd5a0f8910883035626815 authored almost 5 years ago by jrfnl <[email protected]>a4a2b46f3237aa5f977e9c99495750b3ed3fe593 authored almost 5 years ago by jrfnl <[email protected]>
New Utils\Scopes class
bf94e1a94a26353392ac8850f5f0b5e1b2622727 authored almost 5 years ago by Juliette <[email protected]>
New `PHPCSUtils\Utils\Scopes` class which will hold methods related to the scoping of tokens.
Th...
TestUtils\UtilityMethodTestCase: allow for overruling the default tab width
2b9e36ab575aea8f26267bf0d4c4ce4dcc5ef429 authored almost 5 years ago by Juliette <[email protected]>This allows for concrete child classes to set a custom tab width to use for a particular test.
2583a68db93132f3868346e21fcb299569d9104e authored almost 5 years ago by jrfnl <[email protected]>BCFile::getMemberProperties(): sync tests with PHPCS
94485b4fed3341be9f0cc45a54310d1253519d66 authored almost 5 years ago by Juliette <[email protected]>BCFile: minor documentation update
a44fe790b24d719fbcf19001990e52d925a6be24 authored almost 5 years ago by Juliette <[email protected]>Minor CS clean up
be164ca0b11f2f2729eaa98d9aa50eca894bd10a authored almost 5 years ago by Juliette <[email protected]>New Tokens\Collections class
a15eb28ac971761a901bfbe3875a9814058db118 authored almost 5 years ago by Juliette <[email protected]>Update for changed made in upstream PR 2804.
cf4e6dc594c6c74e093054ee1765cbaa6e2da5e4 authored almost 5 years ago by jrfnl <[email protected]>See squizlabs/PHP_CodeSniffer 2809
Co-authored-by: Klaus Purer <[email protected]>
6159a05a50296d3c2aa1401415f477beee588240 authored almost 5 years ago by jrfnl <[email protected]>059988bcc37763d0d0d7209f88ec35a03e14482b authored almost 5 years ago by jrfnl <[email protected]>
New `PHPCSUtils\Tokens\Collections` class which will hold "collections" of related tokens in sta...
e5fe3aa16665d148e49e42e20b9996379aca535b authored almost 5 years ago by jrfnl <[email protected]>Composer: update PHPCS Composer plugin dependency
35f20c39ae51846ca4c5f019d5a1c08e5a2dd92e authored almost 5 years ago by Juliette <[email protected]>
The DealerDirect Composer plugin has just released version `0.6.0`.
As Composer treats minors < ...
New Utils\GetTokensAsString class
4766e1979f3feddcfb2f4c9ca99d51d2e5517df7 authored about 5 years ago by Juliette <[email protected]>This adds five new utility/convenience methods which are closely related to the PHPCS native `Fi...
fcc043523721ee22f0612c1a6fb9d7f91e0265ba authored about 5 years ago by jrfnl <[email protected]>BCFile::getTokensAsString(): add unit tests
373f00772191aabbecbe2db057c1e38640b694dd authored about 5 years ago by Juliette <[email protected]>9621499e331bff339628324d17d50c20e78e78a6 authored about 5 years ago by jrfnl <[email protected]>
New Utils\Parentheses class
06f2b4abea6ce18590beb894d2072cd63c2f39de authored about 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 adds eleven new utility/convenience methods.
The first two are targeted at open/close pare...
27519dad9d4226baa857f75599f04a8dfc28ad8c authored about 5 years ago by jrfnl <[email protected]>New Utils\Conditions class
6eb546693851a7dd37acecb15638faa5d47e8c15 authored about 5 years ago by Juliette <[email protected]>
This adds two additional utility methods:
* `getFirstCondition()` - to retrieve the first condit...
This refactors the `PHPCSUtils\Utils\Conditions::getCondition()` method to be more versatile wit...
90870599ee59f30001a0636193bcc2c893d00274 authored about 5 years ago by jrfnl <[email protected]>New `PHPCSUtils\Utils\Conditions` class which will hold improved versions of the `File::hasCondi...
cd5b135a309550a2b3f170d181bc7cdae95c4bf0 authored about 5 years ago by jrfnl <[email protected]>BCFile::get/hasCondition(): add unit tests
633e487e475caa42887382f089c0978be1a884f2 authored about 5 years ago by Juliette <[email protected]>As the unit tests which have now been added, confirm that there are no cross-version compatibili...
7e60cbc993353e6fad6ee2f304f400f6333001e4 authored about 5 years ago by jrfnl <[email protected]>80f9bd069067796f169a7b0a5855e0fe7266aa26 authored about 5 years ago by jrfnl <[email protected]>
New BackCompat\BCFile class - import of utilities from phpcs itself
76c9b2d7bd9e80185268429c7bf62f18473b1e66 authored about 5 years ago by Juliette <[email protected]>Add documentation about which Tokenizer changes are being accounted for in the utility methods i...
6930cec09b654e36a815a5d8d07a910d858b955a authored about 5 years ago by jrfnl <[email protected]>
* Test support of anonymous classes.
* Test handling of the PHPCS 3.2.0+ ignore annotations.
* T...
... between PHPCS 2.6.0 and now.
4dc4d79710dc38ee039e7d8243fd09f6cdd41173 authored about 5 years ago by jrfnl <[email protected]>59f690ccdf7d8d9d2aae901bba47e6bfd59d7136 authored about 5 years ago by jrfnl <[email protected]>
* Test support of anonymous classes.
* Test the situations in which the method returns `false`.
...
... between PHPCS 2.6.0 and now.
a407191ed52bc7195dda6748a0eaaab9a13da88a authored about 5 years ago by jrfnl <[email protected]>1f4397bb236bc25195afe858590def299905a645 authored about 5 years ago by jrfnl <[email protected]>
... between PHPCS 2.6.0 and now.
b67c38b47ba90d4bbdfb50881e59f71236709670 authored about 5 years ago by jrfnl <[email protected]>1f18fbfbeb2e19a25cb52287787f295e72c1c81a authored about 5 years ago by jrfnl <[email protected]>
... between PHPCS 2.6.0 and now.
27adfe83cf536b1fb7792bd588d14f6d096ef41a authored about 5 years ago by jrfnl <[email protected]>... between PHPCS 2.6.0 and now.
40b2cc0b084ab118f745ef81c0ba9aa23bd860c7 authored about 5 years ago by jrfnl <[email protected]>... between PHPCS 2.6.0 and now.
f47ebfa63a382b33972b771155efb5af24d4db20 authored about 5 years ago by jrfnl <[email protected]>... between PHPCS 2.6.0 and now.
73f32e9160229cd1270401466368b7219dda4fcb authored about 5 years ago by jrfnl <[email protected]>edd78b5ef6a697b5790849e2226f5e34a3274d3b authored about 5 years ago by jrfnl <[email protected]>
d1b7138855f5ad392aa1df10ec0eee54bc633cab authored about 5 years ago by jrfnl <[email protected]>
... as while the `T_COALESCE_EQUAL` was introduced in PHPCS 2.8.1, it wasn't added to the `Token...
8face2629be90a9bc34a82f09d107800f692a96e authored about 5 years ago by jrfnl <[email protected]>3b5253edb1bffbdbe18c59cada194385fbeb6a5a authored about 5 years ago by jrfnl <[email protected]>
* Test passing an unexpected token.
* Test assignment using null coalesce equals.
04dccfb8096f621f605e143f4ba2dd00ccc935cc authored about 5 years ago by jrfnl <[email protected]>
f9274ab2a0a7ed96ff9334a64eaaf598eab28ccf authored about 5 years ago by jrfnl <[email protected]>
... between PHPCS 2.6.0 and now.
1d1ba73461619846a32173ca664235b61ba4ce32 authored about 5 years ago by jrfnl <[email protected]>a96afda999afa64dd7698874efb004706e253617 authored about 5 years ago by jrfnl <[email protected]>
... between PHPCS 2.6.0 and now.
a038371f844452082e973fc74953539c1d7c45cf authored about 5 years ago by jrfnl <[email protected]>e544dca1d84b27b0365fd661de76d3964cfa06bf authored about 5 years ago by jrfnl <[email protected]>