| Conditions | 1 |
| Paths | 1 |
| Total Lines | 48 |
| Code Lines | 35 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 36 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 5 | public function __construct(Request $request) |
|
| 24 | { |
||
| 25 | 5 | parent::__construct($request); |
|
| 26 | |||
| 27 | 5 | $this->actions->add( |
|
| 28 | 5 | 'create', |
|
| 29 | 5 | new Action( |
|
| 30 | 5 | Request::METHOD_POST, |
|
| 31 | 5 | 'customers/%s/addresses.json', |
|
| 32 | 5 | 'customer_address', |
|
| 33 | 5 | 'address' |
|
| 34 | ) |
||
| 35 | ); |
||
| 36 | 5 | $this->actions->add( |
|
| 37 | 5 | 'get', |
|
| 38 | 5 | new Action( |
|
| 39 | 5 | Request::METHOD_GET, |
|
| 40 | 5 | 'customers/%s/addresses/%s.json', |
|
| 41 | 5 | 'customer_address', |
|
| 42 | 5 | 'customer_address' |
|
| 43 | ) |
||
| 44 | ); |
||
| 45 | 5 | $this->actions->add( |
|
| 46 | 5 | 'all', |
|
| 47 | 5 | new Action( |
|
| 48 | 5 | Request::METHOD_GET, |
|
| 49 | 5 | 'customers/%s/addresses.json', |
|
| 50 | 5 | 'addresses', |
|
| 51 | 5 | 'addresses' |
|
| 52 | ) |
||
| 53 | ); |
||
| 54 | 5 | $this->actions->add( |
|
| 55 | 5 | 'update', |
|
| 56 | 5 | new Action( |
|
| 57 | 5 | Request::METHOD_PUT, |
|
| 58 | 5 | 'customers/%s/addresses/%s.json', |
|
| 59 | 5 | 'customer_address', |
|
| 60 | 5 | 'address' |
|
| 61 | ) |
||
| 62 | ); |
||
| 63 | 5 | $this->actions->add( |
|
| 64 | 5 | 'delete', |
|
| 65 | 5 | new Action( |
|
| 66 | 5 | Request::METHOD_DELETE, |
|
| 67 | 5 | 'customers/%s/addresses/%s.json' |
|
| 68 | ) |
||
| 69 | ); |
||
| 70 | 5 | } |
|
| 71 | } |
||
| 72 |