| Total Complexity | 7 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class JourneyProgressHandler extends APIHandler { |
||
| 8 | |||
| 9 | private $journey_progress = '/journeyProgress'; |
||
| 10 | private $api = '/api'; |
||
| 11 | private $v1 = '/v1'; |
||
|
|
|||
| 12 | private $v2 = '/v2'; |
||
| 13 | |||
| 14 | protected $headers = [ |
||
| 15 | 'Content-Type' => 'application/json' |
||
| 16 | ]; |
||
| 17 | |||
| 18 | function __construct($id = null) { |
||
| 19 | parent::__construct(); |
||
| 20 | $this->id = $id; |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Learning Locker: Request Organisation Details |
||
| 25 | * |
||
| 26 | * @return $response |
||
| 27 | */ |
||
| 28 | public function get() { |
||
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Learning Locker: Request Organisation Details |
||
| 40 | * |
||
| 41 | * @return $response |
||
| 42 | */ |
||
| 43 | public function update($data) { |
||
| 44 | try { |
||
| 45 | $url = $this->url . $this->api . $this->v2 . $this->journey_progress . '/' . $this->id ?? $this->id; |
||
| 46 | $response = $this->save($url, $data); |
||
| 47 | return $response; |
||
| 48 | } catch (Exception $e) { |
||
| 49 | return $e; |
||
| 50 | } |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Learning Locker: Request Organisation Details |
||
| 55 | * |
||
| 56 | * @return $response |
||
| 57 | */ |
||
| 58 | public function create($data = null) { |
||
| 65 | } |
||
| 66 | } |
||
| 68 |