@PSR12_whitespaces.test-out.php 676 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace Vendor\Package;
  3. use FooInterfaceA;
  4. use FooInterfaceB;
  5. use BarClass as Bar;
  6. use OtherVendor\OtherPackage\BazClass;
  7. class Foo extends Bar implements FooInterfaceA
  8. {
  9. use FooTrait;
  10. use BarTrait;
  11. public $aaa = 1;
  12. public $bbb = 2;
  13. public function sampleFunction($a, $arg1, $arg2, $arg3, $foo, $b = null)
  14. {
  15. if ($a === $b) {
  16. bar();
  17. } elseif ($a > $b) {
  18. $foo->bar($arg1);
  19. } else {
  20. BazClass::bar($arg2, $arg3);
  21. }
  22. static::baz();
  23. }
  24. final public static function bar()
  25. {
  26. // method body
  27. }
  28. }
  29. class Aaa implements
  30. Bbb,
  31. Ccc,
  32. Ddd
  33. {
  34. }
  35. $a = new Foo();
  36. $b = (bool) 1;
  37. $c = true ? 1 : 2;