Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example Stock Item class without dependency injection
class StockItem {
private $quantity;
private $status;
public function __construct($quantity, $status){
$this->quantity = $quantity;
$this->status = $status;
public function getQuantity(){
return $this->quantity;
public function getStatus(){
return $this->status;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment