@PSR12_whitespaces.test-in.php 712 B

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