File tree Expand file tree Collapse file tree 1 file changed +2
-35
lines changed Expand file tree Collapse file tree 1 file changed +2
-35
lines changed Original file line number Diff line number Diff line change 99
1010## Description
1111
12- The main scope of this extension is to help phpstan to detect the type of object after the ` Assert\Assertion ` validation.
12+ The main scope of this extension is to help PHPStan to detect the type of object after the ` Assert\Assertion ` validation.
1313
1414``` php
1515<?php declare(strict_types = 1);
@@ -19,45 +19,12 @@ function demo(?int $a) {
1919 // ...
2020
2121 Assertion::integer($a);
22- // phpstan is now aware that $a can no longer be `null` at this point
22+ // PHPStan is now aware that $a can no longer be `null` at this point
2323
2424 return ($a === 10);
2525}
2626```
2727
28- This extension specifies types of values passed to:
29-
30- * ` Assertion::integer `
31- * ` Assertion::integerish `
32- * ` Assertion::string `
33- * ` Assertion::float `
34- * ` Assertion::numeric `
35- * ` Assertion::boolean `
36- * ` Assertion::scalar `
37- * ` Assertion::objectOrClass `
38- * ` Assertion::isResource `
39- * ` Assertion::isCallable `
40- * ` Assertion::isArray `
41- * ` Assertion::isInstanceOf `
42- * ` Assertion::notIsInstanceOf `
43- * ` Assertion::subclassOf `
44- * ` Assertion::true `
45- * ` Assertion::false `
46- * ` Assertion::null `
47- * ` Assertion::notNull `
48- * ` Assertion::same `
49- * ` Assertion::notSame `
50- * ` Assertion::isJsonString `
51- * ` Assertion::keyExists `
52- * ` Assertion::keyNotExists `
53- * ` Assertion::notBlank `
54- * ` nullOr* ` and ` all* ` variants of the above methods
55-
56- ` Assert::that ` , ` Assert::thatNullOr ` and ` Assert::thatAll ` chaining methods are also supported.
57-
58- ` Assert\that ` , ` Assert\thatNullOr ` and ` Assert\thatAll ` functions are supported too.
59-
60-
6128## Installation
6229
6330To use this extension, require it in [ Composer] ( https://getcomposer.org/ ) :
You can’t perform that action at this time.
0 commit comments