ExampleClass.php 902 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php declare(strict_types=1);
  2. namespace SebastianBergmann\Complexity\TestFixture;
  3. final class ExampleClass
  4. {
  5. public function method(): void
  6. {
  7. if (true || false) {
  8. if (true && false) {
  9. for ($i = 0; $i <= 1; $i++) {
  10. $a = true ? 'foo' : 'bar';
  11. }
  12. foreach (range(0, 1) as $i) {
  13. switch ($i) {
  14. case 0:
  15. break;
  16. case 1:
  17. break;
  18. default:
  19. }
  20. }
  21. }
  22. } elseif (null) {
  23. try {
  24. // ...
  25. } catch (Throwable $t) {
  26. /* ... */
  27. }
  28. }
  29. /*
  30. * ...
  31. */
  32. while (true) {
  33. }
  34. do {
  35. } while (false);
  36. }
  37. }