superlint/test/linters/php_phpcs/php_good_2.php

26 lines
382 B
PHP
Raw Permalink Normal View History

2020-07-27 15:36:31 -04:00
<?php
/**
* @return array<string>
*/
function helloName(string $name): array
{
return ["hello", $name];
}
function helloSuperLinter(): void
{
$hello = helloName("Super-Linter");
echo implode(" ", $hello) . PHP_EOL;
}
function helloOrWorld(): void
{
$random = rand(0, 10);
if ($random >= 5) {
echo "Hello";
} else {
echo "World";
}
}