@PER-CS1.0.test-out.php 775 B

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