Last active
March 16, 2021 06:33
-
-
Save alexsoyes/0baa5d30668cf533fb84e554d861d3ba to your computer and use it in GitHub Desktop.
Single Responsibility Principle in PHP (not working)
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 | |
/** | |
*** Single Responsibility Principle in PHP (not working) | |
**/ | |
class UserService | |
{ | |
public function updateFromAPI( User $user): User | |
{ | |
// ... | |
} | |
public function removeSession( User $user ): void | |
{ | |
// ... | |
} | |
public function isUserAllowedToAccessAdmin( User $user ): bool | |
{ | |
// ... | |
} | |
public function serialize( User $user ): string | |
{ | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment