Created
December 31, 2018 01:32
-
-
Save joaorobertopb/3b448a527de40934a842306a92b49169 to your computer and use it in GitHub Desktop.
Violação do princípio de responsabilidade única - SOLID
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 | |
class Order | |
{ | |
public function calculateTotalSum(){/*...*/} | |
public function getItems(){/*...*/} | |
public function getItemCount(){/*...*/} | |
public function addItem($item){/*...*/} | |
public function deleteItem($item){/*...*/} | |
public function printOrder(){/*...*/} | |
public function showOrder(){/*...*/} | |
public function load(){/*...*/} | |
public function save(){/*...*/} | |
public function update(){/*...*/} | |
public function delete(){/*...*/} | |
} | |
// Reference: https://www.apphp.com/tutorials/index.php?page=solid-principles-in-php-examples |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment