Created
October 5, 2018 00:10
-
-
Save joaorobertopb/52f7ef5b8dec3357f8e5fde7b167d26b to your computer and use it in GitHub Desktop.
Utilize booleanos de forma implícita!
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 | |
//Ruim | |
if (in_array(self::GRUPO_ADMINISTRADOR, $gruposAcesso)) { | |
return true; | |
} | |
return false; | |
//Bom | |
return in_array(self::GRUPO_ADMINISTRADOR, $gruposAcesso)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment