example_function.php 917 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. function example_function(): void
  12. {
  13. if (true or false) {
  14. if (true and false) {
  15. for ($i = 0; $i <= 1; $i++) {
  16. $a = true ? 'foo' : 'bar';
  17. }
  18. foreach (range(0, 1) as $i) {
  19. switch ($i) {
  20. case 0:
  21. break;
  22. case 1:
  23. break;
  24. default:
  25. }
  26. }
  27. }
  28. } elseif (null) {
  29. try {
  30. } catch (Throwable $t) {
  31. }
  32. }
  33. while (true) {
  34. }
  35. do {
  36. } while (false);
  37. }