| 1 | <?php |
||
| 12 | class NonNullType extends AbstractType implements CompositeTypeInterface |
||
| 13 | { |
||
| 14 | private $_typeOf; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * NonNullType constructor. |
||
| 18 | * @param AbstractType|string $fieldType |
||
| 19 | */ |
||
| 20 | 4 | public function __construct($fieldType) |
|
| 27 | |||
| 28 | public function checkBuild() |
||
| 31 | |||
| 32 | 3 | public function getName() |
|
| 36 | |||
| 37 | 4 | public function getKind() |
|
| 41 | |||
| 42 | public function resolve($value) |
||
| 46 | |||
| 47 | 1 | public function isValidValue($value) |
|
| 51 | |||
| 52 | public function isCompositeType() |
||
| 56 | |||
| 57 | public function getNamedType() |
||
| 61 | |||
| 62 | 4 | public function getNullableType() |
|
| 66 | |||
| 67 | 4 | public function getTypeOf() |
|
| 71 | |||
| 72 | |||
| 73 | } |
||
| 74 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.