@@ -38,7 +38,7 @@ |
||
38 | 38 | $locale = $request->header('Content-Language'); |
39 | 39 | |
40 | 40 | // if the header is missed |
41 | - if(!$locale){ |
|
41 | + if (!$locale) { |
|
42 | 42 | // take the default local language |
43 | 43 | $locale = $this->app->config->get('app.locale'); |
44 | 44 | } |
@@ -41,7 +41,7 @@ |
||
41 | 41 | throw (new MissingVisitorIdException()); |
42 | 42 | } |
43 | 43 | |
44 | - if($skipCriterias){ |
|
44 | + if ($skipCriterias) { |
|
45 | 45 | $this->userRepository = $this->userRepository->skipCriteria(); |
46 | 46 | } |
47 | 47 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function register() |
20 | 20 | { |
21 | - $this->app->bind('PortButler', function () { |
|
21 | + $this->app->bind('PortButler', function() { |
|
22 | 22 | return $this->app->make(PortButler::class); |
23 | 23 | }); |
24 | 24 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | public function up() |
13 | 13 | { |
14 | 14 | // Create table for storing roles |
15 | - Schema::create('roles', function (Blueprint $table) { |
|
15 | + Schema::create('roles', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->string('name')->unique(); |
18 | 18 | $table->string('display_name')->nullable(); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | }); |
22 | 22 | |
23 | 23 | // Create table for associating roles to users (Many-to-Many) |
24 | - Schema::create('role_user', function (Blueprint $table) { |
|
24 | + Schema::create('role_user', function(Blueprint $table) { |
|
25 | 25 | $table->integer('user_id')->unsigned(); |
26 | 26 | $table->integer('role_id')->unsigned(); |
27 | 27 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | }); |
35 | 35 | |
36 | 36 | // Create table for storing permissions |
37 | - Schema::create('permissions', function (Blueprint $table) { |
|
37 | + Schema::create('permissions', function(Blueprint $table) { |
|
38 | 38 | $table->increments('id'); |
39 | 39 | $table->string('name')->unique(); |
40 | 40 | $table->string('display_name')->nullable(); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | }); |
44 | 44 | |
45 | 45 | // Create table for associating permissions to roles (Many-to-Many) |
46 | - Schema::create('permission_role', function (Blueprint $table) { |
|
46 | + Schema::create('permission_role', function(Blueprint $table) { |
|
47 | 47 | $table->integer('permission_id')->unsigned(); |
48 | 48 | $table->integer('role_id')->unsigned(); |
49 | 49 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | public function debugDatabaseQueries($log = true, $terminal = false) |
29 | 29 | { |
30 | 30 | if (Config::get('database.query_debugging')) { |
31 | - DB::listen(function ($event) use ($terminal, $log) { |
|
31 | + DB::listen(function($event) use ($terminal, $log) { |
|
32 | 32 | $fullQuery = vsprintf(str_replace(['%', '?'], ['%%', '%s'], $event->sql), $event->bindings); |
33 | 33 | |
34 | 34 | $text = $event->connectionName . ' (' . $event->time . '): ' . $fullQuery; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function changeTheDefaultDatabaseModelsFactoriesPath($customPath) |
53 | 53 | { |
54 | - App::singleton(\Illuminate\Database\Eloquent\Factory::class, function ($app) use ($customPath) { |
|
54 | + App::singleton(\Illuminate\Database\Eloquent\Factory::class, function($app) use ($customPath) { |
|
55 | 55 | $faker = $app->make(\Faker\Generator::class); |
56 | 56 | |
57 | 57 | return \Illuminate\Database\Eloquent\Factory::construct($faker, base_path() . $customPath); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $allServiceProviders[] = PortButler::buildMainServiceProvider($containersNamespace, $containerName); |
73 | 73 | } |
74 | 74 | |
75 | - return array_unique($allServiceProviders) ? : []; |
|
75 | + return array_unique($allServiceProviders) ?: []; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | if (File::isDirectory($containerMigrationDirectory)) { |
103 | 103 | |
104 | - App::afterResolving('migrator', function ($migrator) use ($containerMigrationDirectory) { |
|
104 | + App::afterResolving('migrator', function($migrator) use ($containerMigrationDirectory) { |
|
105 | 105 | foreach ((array)$containerMigrationDirectory as $path) { |
106 | 106 | $migrator->path($path); |
107 | 107 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | // if DataArray `\League\Fractal\Serializer\DataArraySerializer` do noting since it's set by default by the Dingo API |
130 | 130 | if ($serializerName !== 'DataArray') { |
131 | - app('Dingo\Api\Transformer\Factory')->setAdapter(function () use ($serializerName) { |
|
131 | + app('Dingo\Api\Transformer\Factory')->setAdapter(function() use ($serializerName) { |
|
132 | 132 | switch ($serializerName) { |
133 | 133 | case 'JsonApi': |
134 | 134 | $serializer = new \League\Fractal\Serializer\JsonApiSerializer(Config::get('api.domain')); |
@@ -48,6 +48,7 @@ discard block |
||
48 | 48 | * By default Laravel takes (server/database/factories) as the |
49 | 49 | * path to the factories, this function changes the path to load |
50 | 50 | * the factories from the infrastructure directory. |
51 | + * @param string $customPath |
|
51 | 52 | */ |
52 | 53 | public function changeTheDefaultDatabaseModelsFactoriesPath($customPath) |
53 | 54 | { |
@@ -138,7 +139,7 @@ discard block |
||
138 | 139 | } |
139 | 140 | |
140 | 141 | /** |
141 | - * @param $directory |
|
142 | + * @param string $directory |
|
142 | 143 | */ |
143 | 144 | private function loadConfigs($directory) |
144 | 145 | { |
@@ -21,7 +21,7 @@ |
||
21 | 21 | { |
22 | 22 | |
23 | 23 | /** |
24 | - * @param \App\Containers\SocialAuthentication\UI\API\Requests\AuthenticateOneRequest $request |
|
24 | + * @param ApiAuthenticateRequest $request |
|
25 | 25 | * @param \App\Containers\SocialAuthentication\Actions\SocialLoginAction $action |
26 | 26 | * |
27 | 27 | * @return \Dingo\Api\Http\Response |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use App\Containers\SocialAuthentication\Actions\SocialLoginAction; |
6 | 6 | use App\Containers\SocialAuthentication\UI\API\Requests\ApiAuthenticateRequest; |
7 | -use App\Containers\SocialAuthentication\UI\API\Requests\AuthenticateCallbackRequest; |
|
8 | 7 | use App\Containers\SocialAuthentication\UI\API\Requests\AuthenticateOneRequest; |
9 | 8 | use App\Containers\User\UI\API\Transformers\UserTransformer; |
10 | 9 | use App\Port\Controller\Abstracts\PortApiController; |
@@ -78,10 +78,10 @@ |
||
78 | 78 | // find if that user exist in our database |
79 | 79 | $user = $this->findSocialUserTask->run($provider, $socialUserProfile->id); |
80 | 80 | |
81 | - $tokenSecret = isset($socialUserProfile->tokenSecret) ? : null; |
|
82 | - $expiresIn = isset($socialUserProfile->expiresIn) ? : null; |
|
83 | - $refreshToken = isset($socialUserProfile->refreshToken) ? : null; |
|
84 | - $avatar_original = isset($socialUserProfile->avatar_original) ? : null; |
|
81 | + $tokenSecret = isset($socialUserProfile->tokenSecret) ?: null; |
|
82 | + $expiresIn = isset($socialUserProfile->expiresIn) ?: null; |
|
83 | + $refreshToken = isset($socialUserProfile->refreshToken) ?: null; |
|
84 | + $avatar_original = isset($socialUserProfile->avatar_original) ?: null; |
|
85 | 85 | |
86 | 86 | // if user not found then create new one |
87 | 87 | if (!$user) { |
@@ -1,40 +1,40 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | return array( |
4 | - # Account credentials from developer portal |
|
5 | - 'Account' => array( |
|
6 | - 'ClientId' => env('PAYPAL_ID'), |
|
7 | - 'ClientSecret' => env('PAYPAL_SECRET'), |
|
8 | - ), |
|
4 | + # Account credentials from developer portal |
|
5 | + 'Account' => array( |
|
6 | + 'ClientId' => env('PAYPAL_ID'), |
|
7 | + 'ClientSecret' => env('PAYPAL_SECRET'), |
|
8 | + ), |
|
9 | 9 | |
10 | - # Connection Information |
|
11 | - 'Http' => array( |
|
10 | + # Connection Information |
|
11 | + 'Http' => array( |
|
12 | 12 | 'ConnectionTimeOut' => 30, |
13 | - 'Retry' => 1, |
|
14 | - //'Proxy' => 'http://[username:password]@hostname[:port][/path]', |
|
15 | - ), |
|
13 | + 'Retry' => 1, |
|
14 | + //'Proxy' => 'http://[username:password]@hostname[:port][/path]', |
|
15 | + ), |
|
16 | 16 | |
17 | - # Service Configuration |
|
18 | - 'Service' => array( |
|
19 | - # For integrating with the live endpoint, |
|
20 | - # change the URL to https://api.paypal.com! |
|
21 | - 'EndPoint' => 'https://api.sandbox.paypal.com', |
|
22 | - ), |
|
17 | + # Service Configuration |
|
18 | + 'Service' => array( |
|
19 | + # For integrating with the live endpoint, |
|
20 | + # change the URL to https://api.paypal.com! |
|
21 | + 'EndPoint' => 'https://api.sandbox.paypal.com', |
|
22 | + ), |
|
23 | 23 | |
24 | 24 | |
25 | - # Logging Information |
|
26 | - 'Log' => array( |
|
27 | - //'LogEnabled' => true, |
|
25 | + # Logging Information |
|
26 | + 'Log' => array( |
|
27 | + //'LogEnabled' => true, |
|
28 | 28 | |
29 | - # When using a relative path, the log file is created |
|
30 | - # relative to the .php file that is the entry point |
|
31 | - # for this request. You can also provide an absolute |
|
32 | - # path here |
|
33 | - //'FileName' => '../PayPal.log', |
|
29 | + # When using a relative path, the log file is created |
|
30 | + # relative to the .php file that is the entry point |
|
31 | + # for this request. You can also provide an absolute |
|
32 | + # path here |
|
33 | + //'FileName' => '../PayPal.log', |
|
34 | 34 | |
35 | - # Logging level can be one of FINE, INFO, WARN or ERROR |
|
36 | - # Logging is most verbose in the 'FINE' level and |
|
37 | - # decreases as you proceed towards ERROR |
|
38 | - //'LogLevel' => 'FINE', |
|
39 | - ), |
|
35 | + # Logging level can be one of FINE, INFO, WARN or ERROR |
|
36 | + # Logging is most verbose in the 'FINE' level and |
|
37 | + # decreases as you proceed towards ERROR |
|
38 | + //'LogLevel' => 'FINE', |
|
39 | + ), |
|
40 | 40 | ); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | | |
65 | 65 | */ |
66 | 66 | |
67 | - 'user' => env('USER_NAMESPACE').'User', |
|
67 | + 'user' => env('USER_NAMESPACE') . 'User', |
|
68 | 68 | |
69 | 69 | /* |
70 | 70 | |-------------------------------------------------------------------------- |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | | |
147 | 147 | */ |
148 | 148 | |
149 | - 'auth' => function ($app) { |
|
149 | + 'auth' => function($app) { |
|
150 | 150 | return new Tymon\JWTAuth\Providers\Auth\IlluminateAuthAdapter($app['auth']); |
151 | 151 | }, |
152 | 152 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | | |
160 | 160 | */ |
161 | 161 | |
162 | - 'storage' => function ($app) { |
|
162 | + 'storage' => function($app) { |
|
163 | 163 | return new Tymon\JWTAuth\Providers\Storage\IlluminateCacheAdapter($app['cache']); |
164 | 164 | }, |
165 | 165 |