use_arrow_functions,function_declaration.test 392 B

123456789101112131415
  1. --TEST--
  2. Integration of fixers: use_arrow_functions,function_declaration.
  3. --RULESET--
  4. {"use_arrow_functions": true, "function_declaration": {"closure_fn_spacing": "none"}}
  5. --EXPECT--
  6. <?php
  7. $fn = static fn(string $class): bool => is_subclass_of($class, Exception::class);
  8. --INPUT--
  9. <?php
  10. $fn = static function (string $class): bool {
  11. return is_subclass_of($class, Exception::class);
  12. };