Releases: php-standard-library/psalm-plugin
Releases · php-standard-library/psalm-plugin
1.1.2
Full Changelog: 1.1.1...1.1.2
1.1.1
1.1.0
new return type providers:
Regex\capture_groups
returnType\TypeInterface<array{0: string, T1: string, T2: string, ...}>
when argument type isarray{0: T1, 1: T2, ...}
and all properties (Tn
) are literal. ( thanks to @veewee )Iter\count
returnpositive-int
when$iterable
is anon-empty-list<_>
.Iter\count
returnpositive-int
when$iterable
is anon-empty-array<_, _>
.Iter\count
returnint(0)
when$iterable
isempty&array<_, _>
Iter\count
returnint(x)
when$iterable
is anon-empty-list<_>
with a known count, wherex
is the size of$iterable
.Iter\count
returnint(x)
when$iterable
is anon-empty-array<_, _>
with a known count, wherex
is the size of$iterable
.Iter\last
returnTv
when$iterable
is anon-empty-list<Tv>
.Iter\last
returnTv
when$iterable
is anon-empty-array<_, Tv>
.Iter\last
returnnull
when$iterable
isempty&array<_, _>
Iter\last
returnTv
when$iterable
isarray{...}
with at least 1 property.Iter\first
returnTv
when$iterable
is anon-empty-list<Tv>
.Iter\first
returnTv
when$iterable
is anon-empty-array<_, Tv>
.Iter\first
returnnull
when$iterable
isempty&array<_, _>
Iter\first
returnTv
when$iterable
isarray{...}
with at least 1 property.Str\after
returnnull|lowercase-string
when the first argument islowercase-string
.Str\after_last
returnnull|lowercase-string
when the first argument islowercase-string
.Str\after_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\after_last_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\before
returnnull|lowercase-string
when the first argument islowercase-string
.Str\before_last
returnnull|lowercase-string
when the first argument islowercase-string
.Str\before_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\before_last_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\after
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\after_last
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\after_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\after_last_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\before
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\before_last
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\before_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Byte\before_last_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\after
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\after_last
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\after_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\after_last_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\before
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\before_last
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\before_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\Grapheme\before_last_ci
returnnull|lowercase-string
when the first argument islowercase-string
.Str\chunk
returnsnon-empty-list<non-empty-string>
if$string
isnon-empty-string
Str\chunk
returnsnon-empty-list<non-empty-lowercase-string>
if$string
isnon-empty-lowercase-string
Str\Byte\chunk
returnsnon-empty-list<non-empty-string>
if$string
isnon-empty-string
Str\Byte\chunk
returnsnon-empty-list<non-empty-lowercase-string>
if$string
isnon-empty-lowercase-string
Str\lowercase
returnsnon-empty-lowercase-string
if$string
isnon-empty-string
ornon-falsy-string
Str\Byte\lowercase
returnsnon-empty-lowercase-string
if$string
isnon-empty-string
ornon-falsy-string
Str\repeat
returnsnon-empty-lowercase-string
if$string
isnon-empty-lowercase-string
Str\repeat
returnsnon-empty-string
if$string
isnon-empty-string
Str\repeat
returnslowercase-string
if$string
islowercase-string
Str\repeat
returnsstring(x)
if$string
is a literal, and$multiplier
is literal, wherex
is the result.Str\slice
returnslowercase-string
if$string
islowercase-string
Str\Byte\slice
returnslowercase-string
if$string
islowercase-string
Str\Grapheme\slice
returnslowercase-string
if$string
islowercase-string
Str\splice
returnslowercase-string
if$string
islowercase-string
and$replacement
islowercase-string
Str\Byte\splice
returnslowercase-string
if$string
islowercase-string
and$replacement
islowercase-string
Str\split
returnsnon-empty-list<non-empty-string>
if$string
isnon-empty-string
Str\split
returnsnon-empty-list<non-empty-lowercase-string>
if$string
isnon-empty-lowercase-string
Str\Byte\split
returnsnon-empty-list<non-empty-string>
if$string
isnon-empty-string
Str\Byte\split
returnsnon-empty-list<non-empty-lowercase-string>
if$string
isnon-empty-lowercase-string
Str\uppercase
returnsnon-empty-string
if$string
isnon-empty-string
Str\Byte\uppercase
returnsnon-empty-string
if$string
isnon-empty-string