Last active
January 20, 2019 20:36
-
-
Save amacgregor/8275062 to your computer and use it in GitHub Desktop.
Example Stock Item class without dependency injection
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 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