Skip to content

Instantly share code, notes, and snippets.

@amacgregor
Last active January 20, 2019 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amacgregor/8275062 to your computer and use it in GitHub Desktop.
Save amacgregor/8275062 to your computer and use it in GitHub Desktop.
Example Stock Item class without dependency injection
<?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