Psalm
Get started
Documentation
Paid support
Plugins
Blog
GitHub
<?php class HelloWorld { public function getDescription(DateTimeImmutable|null $start, stringable|null $someObject): string { if ($start === null && $someObject === null) { return ''; } $description = ''; if ($start !== null) { $description = (string)$start->getTimestamp(); } else { $description = $someObject->__toString(); } return $description; } }
Snippet created on March 22 2021 at 12:04 UTC
Settings
Get link