anonymous_class_with_phpdoc.test 529 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --TEST--
  2. Integration of fixers: Anonymous class /w PHPDoc and attributes on separate line.
  3. --RULESET--
  4. {"@PhpCsFixer": true}
  5. --EXPECT--
  6. <?php
  7. $a = new
  8. /** @property string $x */
  9. class {};
  10. $b = new
  11. #[X]
  12. class {};
  13. $c = new
  14. /** @property string $x */
  15. #[X] #[Y\Z]
  16. class {};
  17. class Z {}
  18. $d = new
  19. #[X] // comment
  20. class {};
  21. --INPUT--
  22. <?php
  23. $a = new
  24. /** @property string $x */
  25. class() {};
  26. $b = new
  27. #[X]
  28. class() {};
  29. $c = new
  30. /** @property string $x */
  31. #[X] #[Y\Z]
  32. class() {};
  33. class Z {}
  34. $d = new
  35. #[X] // comment
  36. class() {};