Last active
February 23, 2017 16:50
-
-
Save icambridge/1f894e6e1bd7c1054c83998a20f3d768 to your computer and use it in GitHub Desktop.
Code Review: Sanity Checks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$logger = getLogger(); | |
if (($logger instanceof Logger) == false) { | |
exit(-1); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$people = getNumberOfPeople(); | |
if ($people === null) { | |
exit(-1); | |
} | |
// do numeric logic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$logger = getLogger(); | |
if ($logger == null) { | |
exit(-1); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$people = getNumberOfPeople(); | |
if (is_numeric($people) == false) { | |
exit(-1); | |
} | |
// do numeric logic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment