@@ -12,7 +12,7 @@ |
||
| 12 | 12 | private $v2 = '/v2'; |
| 13 | 13 | |
| 14 | 14 | protected $headers = [ |
| 15 | - 'content-type' => 'application/json' |
|
| 15 | + 'content-type' => 'application/json' |
|
| 16 | 16 | ]; |
| 17 | 17 | |
| 18 | 18 | /** |
@@ -3,5 +3,5 @@ |
||
| 3 | 3 | namespace Ijeffro\Laralocker\LearningLocker\Downloads; |
| 4 | 4 | |
| 5 | 5 | interface DownloadInterface { |
| 6 | - function get(); |
|
| 6 | + function get(); |
|
| 7 | 7 | } |
@@ -3,5 +3,5 @@ |
||
| 3 | 3 | namespace Ijeffro\Laralocker\LearningLocker\Users; |
| 4 | 4 | |
| 5 | 5 | interface UserInterface { |
| 6 | - function get(); |
|
| 6 | + function get(); |
|
| 7 | 7 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | private $v2 = '/v2'; |
| 13 | 13 | |
| 14 | 14 | protected $headers = [ |
| 15 | - 'content-type' => 'application/json' |
|
| 15 | + 'content-type' => 'application/json' |
|
| 16 | 16 | ]; |
| 17 | 17 | |
| 18 | 18 | function __construct($id = null) { |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | private $v2 = '/v2'; |
| 13 | 13 | |
| 14 | 14 | protected $headers = [ |
| 15 | - 'content-type' => 'application/json' |
|
| 15 | + 'content-type' => 'application/json' |
|
| 16 | 16 | ]; |
| 17 | 17 | |
| 18 | 18 | function __construct($id = null) { |
@@ -3,5 +3,5 @@ |
||
| 3 | 3 | namespace Ijeffro\Laralocker\LearningLocker\Roles; |
| 4 | 4 | |
| 5 | 5 | interface RoleInterface { |
| 6 | - function get(); |
|
| 6 | + function get(); |
|
| 7 | 7 | } |
@@ -5,68 +5,68 @@ |
||
| 5 | 5 | |
| 6 | 6 | class Organisation extends Connection { |
| 7 | 7 | |
| 8 | - private $organisation = '/organisation'; |
|
| 9 | - private $api = '/api'; |
|
| 10 | - private $v2 = '/v2'; |
|
| 8 | + private $organisation = '/organisation'; |
|
| 9 | + private $api = '/api'; |
|
| 10 | + private $v2 = '/v2'; |
|
| 11 | 11 | |
| 12 | - private $headers = [ |
|
| 12 | + private $headers = [ |
|
| 13 | 13 | 'content-type' => 'application/json' |
| 14 | - ]; |
|
| 14 | + ]; |
|
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * Get the Learning Locker Statement Forward by ID. |
|
| 18 | - * |
|
| 19 | - * @param $id |
|
| 20 | - * @return $response |
|
| 21 | - */ |
|
| 22 | - public function get() { |
|
| 16 | + /** |
|
| 17 | + * Get the Learning Locker Statement Forward by ID. |
|
| 18 | + * |
|
| 19 | + * @param $id |
|
| 20 | + * @return $response |
|
| 21 | + */ |
|
| 22 | + public function get() { |
|
| 23 | 23 | try { |
| 24 | - $url = $this->endpoint . $this->api . $this->v2 . $this->organisation; |
|
| 25 | - $request = $this->getClient()->get($url, [ |
|
| 24 | + $url = $this->endpoint . $this->api . $this->v2 . $this->organisation; |
|
| 25 | + $request = $this->getClient()->get($url, [ |
|
| 26 | 26 | 'auth' => $this->getAuth(), |
| 27 | 27 | 'headers' => [ |
| 28 | - 'content-type' => 'application/json' |
|
| 28 | + 'content-type' => 'application/json' |
|
| 29 | 29 | ], |
| 30 | - ]); |
|
| 31 | - $response = $request->json(); |
|
| 32 | - return $response; |
|
| 30 | + ]); |
|
| 31 | + $response = $request->json(); |
|
| 32 | + return $response; |
|
| 33 | 33 | } catch (Exception $e) { |
| 34 | - return false; |
|
| 34 | + return false; |
|
| 35 | + } |
|
| 35 | 36 | } |
| 36 | - } |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * Get the Learning Locker Organisation Name. |
|
| 40 | - * |
|
| 41 | - * @param $org |
|
| 42 | - * @return $response, false |
|
| 43 | - */ |
|
| 44 | - public function id() { |
|
| 38 | + /** |
|
| 39 | + * Get the Learning Locker Organisation Name. |
|
| 40 | + * |
|
| 41 | + * @param $org |
|
| 42 | + * @return $response, false |
|
| 43 | + */ |
|
| 44 | + public function id() { |
|
| 45 | 45 | $response = $this->get(); |
| 46 | 46 | if($response) { |
| 47 | - $id = $response[0]['_id']; |
|
| 48 | - $setSetting = LLService::create($this->org, LLService::LL_ID)->setSetting(LLService::ORGANISATION_ID, $id); |
|
| 49 | - return $id; |
|
| 47 | + $id = $response[0]['_id']; |
|
| 48 | + $setSetting = LLService::create($this->org, LLService::LL_ID)->setSetting(LLService::ORGANISATION_ID, $id); |
|
| 49 | + return $id; |
|
| 50 | 50 | } |
| 51 | 51 | return false; |
| 52 | - } |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * Get the Learning Locker Organisation Name. |
|
| 56 | - * |
|
| 57 | - * @param $org |
|
| 58 | - * @return $response, false |
|
| 59 | - */ |
|
| 60 | - public function name() |
|
| 61 | - { |
|
| 54 | + /** |
|
| 55 | + * Get the Learning Locker Organisation Name. |
|
| 56 | + * |
|
| 57 | + * @param $org |
|
| 58 | + * @return $response, false |
|
| 59 | + */ |
|
| 60 | + public function name() |
|
| 61 | + { |
|
| 62 | 62 | $response = $this->get(); |
| 63 | 63 | if($response) { |
| 64 | - $name = $response[0]['name']; |
|
| 65 | - $setSetting = LLService::create($this->org, LLService::LL_ID)->setSetting(LLService::ORGANISATION, $name); |
|
| 66 | - return $name; |
|
| 64 | + $name = $response[0]['name']; |
|
| 65 | + $setSetting = LLService::create($this->org, LLService::LL_ID)->setSetting(LLService::ORGANISATION, $name); |
|
| 66 | + return $name; |
|
| 67 | 67 | } |
| 68 | 68 | return false; |
| 69 | 69 | |
| 70 | - } |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | 72 | } |
@@ -3,5 +3,5 @@ |
||
| 3 | 3 | namespace Ijeffro\Laralocker\LearningLocker\Organisation; |
| 4 | 4 | |
| 5 | 5 | interface OrganisationInterface { |
| 6 | - function get(); |
|
| 6 | + function get(); |
|
| 7 | 7 | } |
@@ -3,5 +3,5 @@ |
||
| 3 | 3 | namespace Ijeffro\Laralocker\LearningLocker\Journeys; |
| 4 | 4 | |
| 5 | 5 | interface JourneyInterface { |
| 6 | - function get(); |
|
| 6 | + function get(); |
|
| 7 | 7 | } |