Skip to content

Instantly share code, notes, and snippets.

@karakanb
Created December 24, 2020 14:41
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 karakanb/820137ff398845b21c12d7b32f9046c6 to your computer and use it in GitHub Desktop.
Save karakanb/820137ff398845b21c12d7b32f9046c6 to your computer and use it in GitHub Desktop.
<?
if (is_null($repository)) {
$result = null;
} else {
$user = $repository->getUser(5);
if (is_null($user)) {
$result = null;
} else {
$result = $user->name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment