@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function show($id) |
| 27 | 27 | { |
| 28 | - $select = ["_id"]; |
|
| 28 | + $select = [ "_id" ]; |
|
| 29 | 29 | return LearningLocker::client($id)->get($select); |
| 30 | 30 | } |
| 31 | 31 | |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function show($id) |
| 27 | 27 | { |
| 28 | - $selectables = ["_id"]; |
|
| 28 | + $selectables = [ "_id" ]; |
|
| 29 | 29 | return LearningLocker::store($id)->get($selectables); |
| 30 | 30 | } |
| 31 | 31 | |
@@ -133,7 +133,7 @@ |
||
| 133 | 133 | */ |
| 134 | 134 | public function store() |
| 135 | 135 | { |
| 136 | - $this->send = $this->send( |
|
| 136 | + $this->send = $this->send( |
|
| 137 | 137 | $this->actor, |
| 138 | 138 | $this->verb, |
| 139 | 139 | $this->object, |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | * @param $homepage = Account Homepage |
| 29 | 29 | * |
| 30 | 30 | */ |
| 31 | - public function actor($actor = [], $ref = null, $homepage = null) |
|
| 31 | + public function actor($actor = [ ], $ref = null, $homepage = null) |
|
| 32 | 32 | { |
| 33 | 33 | if (!$actor) return error('Please supply an actor'); |
| 34 | 34 | |
@@ -37,9 +37,9 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | if ($actor_type === xAPIConstants::MBOX) { |
| 39 | 39 | |
| 40 | - if ($actor['name'] && $actor['email']) { |
|
| 41 | - $authority = StatementGenerator::createAuthority($actor['name'], $actor['email']); |
|
| 42 | - $actor = StatementGenerator::createMboxActor($actor['name'], $actor['email']); |
|
| 40 | + if ($actor[ 'name' ] && $actor[ 'email' ]) { |
|
| 41 | + $authority = StatementGenerator::createAuthority($actor[ 'name' ], $actor[ 'email' ]); |
|
| 42 | + $actor = StatementGenerator::createMboxActor($actor[ 'name' ], $actor[ 'email' ]); |
|
| 43 | 43 | // dd($authority); |
| 44 | 44 | } else { |
| 45 | 45 | return error('Please supply the actor\'s name and email in the form of an array.'); |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | |
| 49 | 49 | // $this->agent->setAuthority($authority); |
| 50 | - $this->agent->setName($actor['name']); |
|
| 51 | - $this->agent->setMbox($actor['mbox']); |
|
| 50 | + $this->agent->setName($actor[ 'name' ]); |
|
| 51 | + $this->agent->setMbox($actor[ 'mbox' ]); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | // if ($actor_type === xAPIConstants::ACCOUNT && $actor) { |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | isset($this->result) ? $this->result : null |
| 119 | 119 | ); |
| 120 | 120 | |
| 121 | - $this->make = []; |
|
| 121 | + $this->make = [ ]; |
|
| 122 | 122 | $this->make = $this->statement; |
| 123 | 123 | return $this->make; |
| 124 | 124 | } |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | ); |
| 144 | 144 | |
| 145 | 145 | // $this->send = []; |
| 146 | - $this->send =$this->send; |
|
| 146 | + $this->send = $this->send; |
|
| 147 | 147 | return $this->send; |
| 148 | 148 | |
| 149 | 149 | } |
@@ -30,7 +30,9 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function actor($actor = [], $ref = null, $homepage = null) |
| 32 | 32 | { |
| 33 | - if (!$actor) return error('Please supply an actor'); |
|
| 33 | + if (!$actor) { |
|
| 34 | + return error('Please supply an actor'); |
|
| 35 | + } |
|
| 34 | 36 | |
| 35 | 37 | $this->agent = new Agent; |
| 36 | 38 | $actor_type = Config::get('laralocker.learning_locker.xapi_statements.actor_type'); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('xapi_verbs', function (Blueprint $table) { |
|
| 16 | + Schema::create('xapi_verbs', function(Blueprint $table) { |
|
| 17 | 17 | $table->bigIncrements('id'); |
| 18 | 18 | $table->json('verbs'); |
| 19 | 19 | $table->timestamps(); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('xapi_recipes', function (Blueprint $table) { |
|
| 16 | + Schema::create('xapi_recipes', function(Blueprint $table) { |
|
| 17 | 17 | $table->bigIncrements('id'); |
| 18 | 18 | $table->json('statement'); |
| 19 | 19 | $table->enum('status', Statement::$statuses)->default(Statement::STATUS_INACTIVE); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('xapi_statements', function (Blueprint $table) { |
|
| 16 | + Schema::create('xapi_statements', function(Blueprint $table) { |
|
| 17 | 17 | $table->bigIncrements('id'); |
| 18 | 18 | $table->json('statement'); |
| 19 | 19 | $table->enum('status', Statement::$statuses)->default(Statement::STATUS_INACTIVE); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('learning_locker', function (Blueprint $table) { |
|
| 16 | + Schema::create('learning_locker', function(Blueprint $table) { |
|
| 17 | 17 | $table->bigIncrements('id'); |
| 18 | 18 | $table->unsignedInteger('org_id'); |
| 19 | 19 | $table->string('url'); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | |
| 14 | -Route::group(['prefix' => 'laralocker'], function () { |
|
| 14 | +Route::group([ 'prefix' => 'laralocker' ], function() { |
|
| 15 | 15 | |
| 16 | 16 | $controller_namespace = "\Ijeffro\Laralocker\Http\Controllers\\"; |
| 17 | 17 | |
@@ -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) { |