Skip to content

Instantly share code, notes, and snippets.

@lesstif
Last active June 4, 2020 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lesstif/adf4b48387fde1f022c73b3d12aa993c to your computer and use it in GitHub Desktop.
Save lesstif/adf4b48387fde1f022c73b3d12aa993c to your computer and use it in GitHub Desktop.
phpstan test class
<?php declare(strict_types = 1);
/**
* phpstan sample
*
* Class HelloWorld
* @package App
*/
class HelloWorld
{
public function sayHello(DateTimeImutable $date): void
{
echo 'Hello, ' . $date->format('j. n. Y');
}
/**
* @param int $name
*/
public function sayWorld(string $name): array
{
return 'Hello, ' . $name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment