| Conditions | 1 |
| Paths | 1 |
| Total Lines | 48 |
| Code Lines | 35 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 36 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 5 | public function __construct(Request $request) |
|
| 34 | { |
||
| 35 | 5 | parent::__construct($request); |
|
| 36 | |||
| 37 | 5 | $this->actions->add( |
|
| 38 | 5 | 'create', |
|
| 39 | 5 | new Action( |
|
| 40 | 5 | Request::METHOD_POST, |
|
| 41 | 5 | 'price_rules.json', |
|
| 42 | 5 | 'price_rule', |
|
| 43 | 5 | 'price_rule' |
|
| 44 | ) |
||
| 45 | ); |
||
| 46 | 5 | $this->actions->add( |
|
| 47 | 5 | 'get', |
|
| 48 | 5 | new Action( |
|
| 49 | 5 | Request::METHOD_GET, |
|
| 50 | 5 | 'price_rules/%s.json', |
|
| 51 | 5 | 'price_rule', |
|
| 52 | 5 | 'price_rule' |
|
| 53 | ) |
||
| 54 | ); |
||
| 55 | 5 | $this->actions->add( |
|
| 56 | 5 | 'all', |
|
| 57 | 5 | new Action( |
|
| 58 | 5 | Request::METHOD_GET, |
|
| 59 | 5 | 'price_rules.json', |
|
| 60 | 5 | 'price_rules', |
|
| 61 | 5 | 'price_rules' |
|
| 62 | ) |
||
| 63 | ); |
||
| 64 | 5 | $this->actions->add( |
|
| 65 | 5 | 'update', |
|
| 66 | 5 | new Action( |
|
| 67 | 5 | Request::METHOD_PUT, |
|
| 68 | 5 | 'price_rules/%s.json', |
|
| 69 | 5 | 'price_rule', |
|
| 70 | 5 | 'price_rule' |
|
| 71 | ) |
||
| 72 | ); |
||
| 73 | 5 | $this->actions->add( |
|
| 74 | 5 | 'delete', |
|
| 75 | 5 | new Action( |
|
| 76 | 5 | Request::METHOD_DELETE, |
|
| 77 | 5 | 'price_rules/%s.json' |
|
| 78 | ) |
||
| 79 | ); |
||
| 80 | 5 | } |
|
| 81 | } |
||
| 82 |