ExampleClass.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php declare(strict_types=1);
  2. /*
  3. * This file is part of sebastian/complexity.
  4. *
  5. * (c) Sebastian Bergmann <sebastian@phpunit.de>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace SebastianBergmann\Complexity\TestFixture;
  11. final class ExampleClass
  12. {
  13. public function method(): void
  14. {
  15. if (true || false) {
  16. if (true && false) {
  17. for ($i = 0; $i <= 1; $i++) {
  18. $a = true ? 'foo' : 'bar';
  19. }
  20. foreach (range(0, 1) as $i) {
  21. switch ($i) {
  22. case 0:
  23. break;
  24. case 1:
  25. break;
  26. default:
  27. }
  28. }
  29. }
  30. } elseif (null) {
  31. try {
  32. } catch (Throwable $t) {
  33. }
  34. }
  35. while (true) {
  36. }
  37. do {
  38. } while (false);
  39. }
  40. }