@@ -38,9 +38,8 @@ |
||
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * @param $agentId |
| 41 | - * @param null $platform |
|
| 42 | - * @param null $device |
|
| 43 | - * @param bool|false $login |
|
| 41 | + * @param string $platform |
|
| 42 | + * @param string $device |
|
| 44 | 43 | * |
| 45 | 44 | * @return mixed |
| 46 | 45 | */ |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | { |
| 49 | 49 | $user = $this->findUserService->byAgentId($agentId); |
| 50 | 50 | |
| 51 | - if(!$user){ |
|
| 51 | + if (!$user) { |
|
| 52 | 52 | $user = $this->createUserService->byAgent($agentId, $device, $platform); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -3,6 +3,6 @@ |
||
| 3 | 3 | // Default root route |
| 4 | 4 | use Illuminate\Support\Facades\Config; |
| 5 | 5 | |
| 6 | -$router->any('/', function () { |
|
| 6 | +$router->any('/', function() { |
|
| 7 | 7 | return response()->json(['Welcome to ' . Config::get('api.name') . '.']); |
| 8 | 8 | }); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | $middleware = App::make(VisitorsAuthentication::class); |
| 27 | 27 | |
| 28 | - $middleware->handle($request, function ($r) {}); |
|
| 28 | + $middleware->handle($request, function($r) {}); |
|
| 29 | 29 | |
| 30 | 30 | // assert a visitor was created in the DB |
| 31 | 31 | $this->seeInDatabase('users', ['visitor_id' => $visitorId]); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | $middleware = App::make(VisitorsAuthentication::class); |
| 42 | 42 | |
| 43 | - $middleware->handle($request, function ($r) {}); |
|
| 43 | + $middleware->handle($request, function($r) {}); |
|
| 44 | 44 | |
| 45 | 45 | // assert a visitor was created in the DB |
| 46 | 46 | $usersTotal = User::all()->count(); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | { |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | - * @param \App\Containers\Email\UI\API\Requests\SetEmailRequest $setEmailRequest |
|
| 20 | + * @param SetUserEmailRequest $setEmailRequest |
|
| 21 | 21 | * @param \App\Containers\Email\Actions\SetUserEmailAction $setUserEmailAction |
| 22 | 22 | * |
| 23 | 23 | * @return \Dingo\Api\Http\Response |
@@ -32,8 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * @param \App\Containers\Email\UI\API\Requests\SetEmailRequest $setEmailRequest |
|
| 36 | - * @param \App\Containers\Email\Actions\SetUserEmailAction $setUserEmailAction |
|
| 35 | + * @param SetVisitorEmailRequest $setEmailRequest |
|
| 37 | 36 | * |
| 38 | 37 | * @return \Dingo\Api\Http\Response |
| 39 | 38 | */ |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | public function up() |
| 13 | 13 | { |
| 14 | - Schema::create('settings', function (Blueprint $table) { |
|
| 14 | + Schema::create('settings', function(Blueprint $table) { |
|
| 15 | 15 | $table->increments('id'); |
| 16 | 16 | $table->string('key')->unique(); |
| 17 | 17 | $table->string('value'); |
@@ -37,6 +37,6 @@ |
||
| 37 | 37 | */ |
| 38 | 38 | public function apply($model, PrettusRepositoryInterface $repository) |
| 39 | 39 | { |
| 40 | - return DB::table($model->getModel()->getTable())->select('*', DB::raw('count('.$this->field.') as total_count'))->groupBy($this->field); |
|
| 40 | + return DB::table($model->getModel()->getTable())->select('*', DB::raw('count(' . $this->field . ') as total_count'))->groupBy($this->field); |
|
| 41 | 41 | } |
| 42 | 42 | } |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | public function run($order = true) |
| 40 | 40 | { |
| 41 | - if($order){ |
|
| 41 | + if ($order) { |
|
| 42 | 42 | $this->userRepository->pushCriteria(new OrderByCreationDateDescendingCriteria()); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function up() |
| 18 | 18 | { |
| 19 | - Schema::create('time_tracker', function (Blueprint $table) { |
|
| 19 | + Schema::create('time_tracker', function(Blueprint $table) { |
|
| 20 | 20 | $table->increments('id'); |
| 21 | 21 | |
| 22 | 22 | $table->timestamp('open_at')->nullable(); |