| 1 | <?php |
||
| 14 | class LikePost extends AbstractObjectType |
||
| 15 | { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param null $value |
||
| 19 | * @param array $args |
||
| 20 | * @param PostType $type |
||
| 21 | * @return mixed |
||
| 22 | */ |
||
| 23 | public function resolve($value = null, $args = [], $type = null) |
||
| 27 | |||
| 28 | public function getType() |
||
| 32 | |||
| 33 | public function build(TypeConfigInterface $config) |
||
| 37 | |||
| 38 | } |
||
| 39 |
If a variable is not always an object, we recommend to add an additional type check to ensure your method call is safe: