Skip to content

Commit

Permalink
refactor: if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
fredbradley committed Feb 25, 2021
1 parent 903d5d7 commit cd4b554
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ function test(string $string): string
{
return $string;
}

function testAgain(int $int): int
{
return $int;
}

function isInt($var):bool
function isInt($var): bool
{
return true;
if ($var instanceof int) {
return true;
}
return false;
}

0 comments on commit cd4b554

Please # to comment.