Making PHPStan happy
This commit is contained in:
parent
df99a32846
commit
773bc1b5d9
|
@ -128,7 +128,7 @@ function bhl_handle_error_result(array $ret_out, $err_file, $exit = true)
|
|||
{
|
||||
if(!is_file($err_file))
|
||||
{
|
||||
stderr("Something went wrong: " . (is_array($ret_out) ? implode("\n", $ret_out) : "????"));
|
||||
stderr("Something went wrong: " . implode("\n", $ret_out));
|
||||
if($exit)
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
namespace metagen_php;
|
||||
use Exception;
|
||||
|
||||
function flt_bhl_ref($val, $name, $struct, $args)
|
||||
function flt_bhl_ref($val, $name, $struct, $str_args)
|
||||
{
|
||||
if(!$val)
|
||||
return $val;
|
||||
|
@ -17,11 +17,9 @@ function flt_bhl_ref($val, $name, $struct, $args)
|
|||
if(!isset($val['fn']))
|
||||
throw new Exception("Missing 'fn'");
|
||||
|
||||
$signature = explode(",", $args);
|
||||
if(!$signature)
|
||||
throw new Exception("Invalid signature: $args");
|
||||
$args = explode(",", $str_args);
|
||||
|
||||
\taskman\bhl_validate_func_ref($module_file, $val['fn'], $signature);
|
||||
\taskman\bhl_validate_func_ref($module_file, $val['fn'], $args);
|
||||
|
||||
return $val;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue