Last active
March 5, 2019 01:00
-
-
Save omarkdev/7930d11485a6d34a4e67dbc5020629b2 to your computer and use it in GitHub Desktop.
Object Calisthenics - Primeira Regra - Exemplo
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 | |
function premiumUsers($users) | |
{ | |
$premiumUsers = []; | |
foreach ($users as $user) { | |
if ($user->type === USER_TYPE_PREMIUM) { | |
$premiumUsers[] = $user; | |
} | |
} | |
return $premiumUsers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment