| Total Complexity | 3 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | class Product extends Core\Model |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * @return |null |
||
|
|
|||
| 28 | */ |
||
| 29 | public static function getInstance() |
||
| 30 | { |
||
| 31 | $Rec = new Product(); |
||
| 32 | return null; |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param int $start |
||
| 37 | * @return Product |
||
| 38 | */ |
||
| 39 | public function listProducts($start = 0) |
||
| 40 | { |
||
| 41 | return($this->query("select p.*,u.user_name from posts p join users u on p.user_id=u.id order by p.post_date_created desc")); |
||
| 42 | } |
||
| 43 | |||
| 44 | |||
| 45 | /** |
||
| 46 | * @param $productName |
||
| 47 | * @param $productCategory |
||
| 48 | * @param $productSummary |
||
| 49 | * @param $productPrice |
||
| 50 | * @return Product |
||
| 51 | */ |
||
| 52 | public function addProduct($productName, $productCategory, $productSummary, $productPrice) |
||
| 56 | } |
||
| 57 | |||
| 58 | } |