/**
  * @group definingExpr
  */
 public function testDefiningExprIsCheckedForVariables()
 {
     $this->registry->registerFunction($function = new GlobalFunction('is_array'));
     $function->setReturnType($this->registry->getNativeType('boolean'));
     $ast = $this->analyzeAst('TypeInference/defining_expr_for_variable.php');
     $this->assertTypedAst($ast, 'defining_expr_for_variable');
 }
 private function createFunction($name, $returnType = 'all')
 {
     $func = new GlobalFunction($name);
     $func->setReturnType($this->registry->resolveType($returnType));
     return $func;
 }