lint/.automation/test/php_psalm/php_good_2.php
Marco Ferrari fcce194d34 Merge TestCodebase and LintCodebase
Change-Id: I9a044fefe96e400b8e3320842b53fe97af2a7b40
2020-10-17 16:12:55 +02:00

25 lines
382 B
PHP

<?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";
}
}