| 1 | <?php |
||
| 14 | class NonNullType extends AbstractType implements CompositeTypeInterface |
||
| 15 | { |
||
| 16 | private $_typeOf; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * NonNullType constructor. |
||
| 20 | * @param AbstractType|string $fieldType |
||
| 21 | */ |
||
| 22 | 4 | public function __construct($fieldType) |
|
| 29 | |||
| 30 | public function build($config) {} |
||
| 31 | |||
| 32 | |||
| 33 | 3 | public function getName() |
|
| 37 | |||
| 38 | 4 | public function getKind() |
|
| 42 | |||
| 43 | public function resolve($value) |
||
| 47 | |||
| 48 | 1 | public function isValidValue($value) |
|
| 52 | |||
| 53 | public function isCompositeType() |
||
| 57 | |||
| 58 | public function getNamedType() |
||
| 62 | |||
| 63 | 4 | public function getNullableType() |
|
| 67 | |||
| 68 | 4 | public function getTypeOf() |
|
| 72 | |||
| 73 | |||
| 74 | } |
||
| 75 |
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.