rhertogh
c362dd5af7
Ensure comment lines are terminated with a new line character (\n).
2023-07-15 19:00:28 +02:00
rhertogh
f378ef1cab
Allow comments in types (e.g. array shape)
2023-07-15 18:43:47 +02:00
rhertogh
9935b2c71e
Merge branch 'master' into inline_comments_in_types
...
# Conflicts:
# tests/CommentAnalyzerTest.php
2023-07-15 15:46:01 +02:00
rhertogh
2285c9d4bd
Fixed codestyle for CommentAnalyzer and use plain instead of multibite string functions
2023-07-06 23:54:50 +02:00
rhertogh
356e6d7bbd
First setup to allow comments in types (e.g. array shape)
2023-07-06 23:40:13 +02:00
rhertogh
242a38c184
Allow space before array shape opening brace and added unit tests for \Psalm\Internal\Analyzer\CommentAnalyzer::splitDocLine()
2023-07-06 00:01:00 +02:00
kkmuffme
16aaa3ae2b
regex cleanup
2023-06-13 22:07:51 +02:00
Bruce Weirdan
3f2ecaec7e
Allow @var
annotations on global vars
...
The actual code was extracted from `StaticAnalyzer`
Fixes vimeo/psalm#1111
2023-02-15 01:20:03 -04:00
40a05d574a
Improve error messages
2023-01-25 12:26:59 +01:00
Jack Worman
1c19260cdd
Require trailing commas
2022-12-18 13:20:31 -06:00
Jack Worman
69658e8315
SlevomatCodingStandard.Commenting.DocCommentSpacing
2022-12-14 13:34:41 -06:00
0155ad7472
Immutable readonly 3
2022-10-03 15:13:47 +02:00
AndrolGenhald
b671117417
Improve @psalm-internal and prevent usage of IssueBuffer::add().
2022-06-25 02:09:40 -05:00
sji
a90456ed8b
trim whitespaces in namespaces specified at @psalm-internal
2021-12-27 02:31:11 +02:00
rarila
97e6511fab
Set number of lines before and after namespace.
2021-12-15 04:58:32 +01:00
rarila
1c298c4605
Conversion of Psalm\Type
2021-12-14 02:31:22 +01:00
AndrolGenhald
51d9652b70
Class property issue suppression fixes.
...
Fix @psalm-suppress and @psalm-allow-private-mutation being ignored if nothing else is in the docblock.
Fix @psalm-suppress not allowing extra text after the issue name.
Fix PossiblyUnusedProperty and UnusedProperty suppression not working at the property level.
Fix MissingPropertyType suppression not working at the property level.
2021-12-11 11:45:06 -06:00
rarila
39402c233d
Return type hints ( #7065 )
...
Co-authored-by: ralila <>
2021-12-05 19:51:26 +02:00
orklah
f8628ef68c
fix errors
2021-10-02 10:01:05 +02:00
orklah
2253667bd5
fix CS, remove redundant vars
2021-08-07 00:22:47 +02:00
orklah
b194291bb3
try to fix offsets
2021-08-07 00:08:19 +02:00
Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
orklah
c69cf9a849
Allow empty-string in first position of an type ( #5814 )
2021-05-22 12:36:02 -04:00
Matt Brown
4f9067f5c8
Fix unused properties in Psalm’s own codebase
2021-05-21 09:15:23 -04:00
Matt Brown
a96645d2e3
Fix many uses of offsets
2021-03-23 01:30:51 -04:00
Joe Hoyle
e59670ef68
Add documentation to LSP ( #5267 )
...
* Add documention to LSP
Add descriptions for all Classes, Functions, Methods, Class Constants for LSP methods for Hover, SignatureInformation and Completions
* Descriptions for class name completions
* PHPCS
* Fix docblock being overriden
* Remove trailing comma in args
* Add description to function param before early `continue`
* Update php-language-server-protocol to 1.5
* Break up long array docblocks
* Break up docblock onto newline
Co-authored-by: Matthew Brown <github@muglug.com>
2021-02-24 10:14:04 -05:00
Barney Laurance
0cd5442c47
Enforce property type invariance ( #5131 )
...
* Implement NonInvariantChildProperty detection
See https://github.com/vimeo/psalm/issues/4184
* Delete test cases with 'parentSetsWiderTypeInConstructor'
As I understand it these are not valid test cases. They
emit NonInvariantPropertyType issues which seems correct - the property
type variation is I think a latent bug in the sample code.
* Reduce shortcode for NonInvariantPropertyType to 1+max used shortcode on master
2021-01-31 11:32:24 -05:00
Matt Brown
5f065d3d74
Turn template bound tuples into object
...
Ref #4714
2020-11-27 11:43:30 -05:00
Matt Brown
3bde327f1b
Break up CommentAnalyzer
2020-11-04 23:25:08 -05:00
Matt Brown
938cebc9f8
Use better inference for getAttributes return type
...
Fixes #4367
2020-10-30 17:37:16 -04:00
Matt Brown
67554dd017
Fix #4453 - sanitise @extends types before attempting to parse
2020-10-30 15:08:23 -04:00
Matt Brown
7afd817a3b
Add back use
2020-10-19 15:10:35 -04:00
Niclas van Eyk
0261024aa6
Initial proposal for psalm-require-{extends, implements} ( #4361 )
...
* initial implementation of psalm-require-extends
* Added @psalm-require-implements
* Added shortcode for ExtensionRequirementViolation
* Docs & cofig entries for @pasalm-require-{implements,extends}
* Added requirement violations to issues.md
2020-10-19 15:08:18 -04:00
orklah
ceaaa39ec3
improve phpdoc ( #4352 )
2020-10-17 12:36:44 -04:00
orklah
10f2966dcb
return types ( #4311 )
...
* return types
* remove willReturn for void methods
2020-10-12 15:02:52 -04:00
orklah
1a1b88bb5e
add visibilities to constants ( #4219 )
2020-09-20 12:54:46 -04:00
orklah
cb7065ae07
replace deprecated methods with their equivalent ( #4217 )
2020-09-20 08:56:49 -04:00
Bruce Weirdan
689027c92d
Support multiple issue types in @psalm-suppress
( #4179 )
...
* Accept multiple issue names in `@psalm-suppress`
Fixes vimeo/psalm#1575
* Accept multiple issue types on statement docblocks as well
* Proper highlighting of individual issues in compound suppressions
2020-09-13 16:41:14 -04:00
Bruce Weirdan
cd110c7e2f
Added @psalm-stub-override
for classlikes and methods ( #4177 )
...
Fixes vimeo/psalm#1252
2020-09-13 16:40:31 -04:00
orklah
ead107fa9e
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2020-09-12 11:24:05 -04:00
orklah
8c7423505a
add native param types ( #4137 )
...
* add native param types
* redundant phpdoc
* add more param types and adds "?" to nullable types
* remove redundant phpdoc
* add more param types and remove redundant phpdoc
* add more param types and remove redundant phpdoc
2020-09-06 19:36:47 -04:00
orklah
f66d57f19d
add native return types ( #4116 )
...
* add native return types
* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
Brown
92239add4d
Add some backwards-incompatible changes for 4.x
2020-08-30 11:44:14 -04:00
Brown
cf5aa5c5cd
Fix #4083 - namespace docblock method classes the proper way
2020-08-29 11:46:24 -04:00
Matthew Brown
ef0486ce35
Add some pure annotations
2020-08-23 13:52:31 -04:00
Bruce Weirdan
7adc25c421
Improve import errors ( #3997 )
...
* Better errors for invalid type imports
Fixes vimeo/psalm#3885
* Finishing touches
Docs, schema, CS
* Drop unused import
* Drop more unused imports
2020-08-16 22:53:53 -04:00
Matthew Brown
72ecb57def
Improve names of things
2020-08-14 00:27:33 -04:00
Matthew Brown
6085e42fc1
Detect mismatching param names effectively
2020-08-10 09:58:43 -04:00
Matthew Brown
73321339a3
Bump nikic/php-parser
2020-08-09 16:23:43 -04:00
Brown
c0b0036109
Fix #3934 - prevent unsafe use of new static
2020-08-05 19:39:27 -04:00