@@ -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 | { |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | public function debugDatabaseQueries($log = true, $terminal = false) |
| 30 | 30 | { |
| 31 | 31 | if (Config::get('database.query_debugging')) { |
| 32 | - DB::listen(function ($event) use ($terminal, $log) { |
|
| 32 | + DB::listen(function($event) use ($terminal, $log) { |
|
| 33 | 33 | $fullQuery = vsprintf(str_replace(['%', '?'], ['%%', '%s'], $event->sql), $event->bindings); |
| 34 | 34 | |
| 35 | 35 | $text = $event->connectionName . ' (' . $event->time . '): ' . $fullQuery; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function changeTheDefaultDatabaseModelsFactoriesPath($customPath) |
| 54 | 54 | { |
| 55 | - App::singleton(\Illuminate\Database\Eloquent\Factory::class, function ($app) use ($customPath) { |
|
| 55 | + App::singleton(\Illuminate\Database\Eloquent\Factory::class, function($app) use ($customPath) { |
|
| 56 | 56 | $faker = $app->make(\Faker\Generator::class); |
| 57 | 57 | |
| 58 | 58 | return \Illuminate\Database\Eloquent\Factory::construct($faker, base_path() . $customPath); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $allServiceProviders[] = PortButler::buildMainServiceProvider($containersNamespace, $containerName); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - return array_unique($allServiceProviders) ? : []; |
|
| 78 | + return array_unique($allServiceProviders) ?: []; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | if (File::isDirectory($containerMigrationDirectory)) { |
| 106 | 106 | |
| 107 | - App::afterResolving('migrator', function ($migrator) use ($containerMigrationDirectory) { |
|
| 107 | + App::afterResolving('migrator', function($migrator) use ($containerMigrationDirectory) { |
|
| 108 | 108 | foreach ((array)$containerMigrationDirectory as $path) { |
| 109 | 109 | $migrator->path($path); |
| 110 | 110 | } |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | |
| 202 | 202 | // if DataArray `\League\Fractal\Serializer\DataArraySerializer` do noting since it's set by default by the Dingo API |
| 203 | 203 | if ($serializerName !== 'DataArray') { |
| 204 | - app('Dingo\Api\Transformer\Factory')->setAdapter(function () use ($serializerName) { |
|
| 204 | + app('Dingo\Api\Transformer\Factory')->setAdapter(function() use ($serializerName) { |
|
| 205 | 205 | switch ($serializerName) { |
| 206 | 206 | case 'JsonApi': |
| 207 | 207 | $serializer = new \League\Fractal\Serializer\JsonApiSerializer(Config::get('api.domain')); |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | ->registerMiddlewareGroups($middlewareGroups); |
| 235 | 235 | |
| 236 | 236 | // Registering Route Middleware's |
| 237 | - foreach ($routeMiddlewares as $key => $routeMiddleware){ |
|
| 237 | + foreach ($routeMiddlewares as $key => $routeMiddleware) { |
|
| 238 | 238 | $this->app['router']->middleware($key, $routeMiddleware); |
| 239 | 239 | } |
| 240 | 240 | |
@@ -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 | ); |
@@ -220,7 +220,7 @@ |
||
| 220 | 220 | */ |
| 221 | 221 | 'generator' => [ |
| 222 | 222 | 'basePath' => env('SRC_PATH'), |
| 223 | - 'rootNamespace' => env('ROOT_NAMESPACE').'\\', |
|
| 223 | + 'rootNamespace' => env('ROOT_NAMESPACE') . '\\', |
|
| 224 | 224 | 'paths' => [ |
| 225 | 225 | 'models' => 'Entities', |
| 226 | 226 | 'repositories' => 'Repositories', |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | /** |
| 114 | 114 | * @param \Symfony\Component\Finder\SplFileInfo $file |
| 115 | 115 | * |
| 116 | - * @return mixed |
|
| 116 | + * @return string |
|
| 117 | 117 | */ |
| 118 | 118 | private function getRouteFileNameWithoutExtension(SplFileInfo $file) |
| 119 | 119 | { |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $apiVersionNumber = $this->getRouteFileVersionNumber($file); |
| 56 | 56 | |
| 57 | 57 | $this->apiRouter->version('v' . $apiVersionNumber, |
| 58 | - function (DingoApiRouter $router) use ($file, $containerPath, $containersNamespace) { |
|
| 58 | + function(DingoApiRouter $router) use ($file, $containerPath, $containersNamespace) { |
|
| 59 | 59 | |
| 60 | 60 | $controllerNamespace = $containersNamespace . '\\Containers\\' . basename($containerPath) . '\\UI\API\Controllers'; |
| 61 | 61 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | 'limit' => Config::get('api.limit'), |
| 69 | 69 | // The API limit expiry time. |
| 70 | 70 | 'expires' => Config::get('api.limit_expires'), |
| 71 | - ], function ($router) use ($file) { |
|
| 71 | + ], function($router) use ($file) { |
|
| 72 | 72 | |
| 73 | 73 | require $file->getPathname(); |
| 74 | 74 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $this->webRouter->group([ |
| 103 | 103 | 'middleware' => ['web'], |
| 104 | 104 | 'namespace' => $controllerNamespace, |
| 105 | - ], function (LaravelRouter $router) use ($file) { |
|
| 105 | + ], function(LaravelRouter $router) use ($file) { |
|
| 106 | 106 | require $file->getPathname(); |
| 107 | 107 | }); |
| 108 | 108 | } |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | protected function hashIds() |
| 144 | 144 | { |
| 145 | 145 | if (Config::get('hello.hash-id')) { |
| 146 | - Route::bind('id', function ($id, $route) { |
|
| 146 | + Route::bind('id', function($id, $route) { |
|
| 147 | 147 | return Hashids::decode($id)[0]; |
| 148 | 148 | }); |
| 149 | 149 | } |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use App\Containers\Authorization\Tasks\AttachRoleTask; |
| 8 | 8 | use App\Containers\User\Actions\CreateUserAction; |
| 9 | 9 | use Dingo\Api\Http\Response as DingoAPIResponse; |
| 10 | - |
|
| 11 | 10 | use Illuminate\Http\Response; |
| 12 | 11 | use Illuminate\Http\UploadedFile; |
| 13 | 12 | use Illuminate\Support\Arr as LaravelArr; |
@@ -355,7 +355,7 @@ |
||
| 355 | 355 | */ |
| 356 | 356 | public function injectEndpointId($endpoint, $id) |
| 357 | 357 | { |
| 358 | - if(Config::get('hello.hash-id')){ |
|
| 358 | + if (Config::get('hello.hash-id')) { |
|
| 359 | 359 | $id = Hashids::encode($id); |
| 360 | 360 | } |
| 361 | 361 | |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | public $loggedInTestingUser; |
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | - * @param $endpoint |
|
| 38 | + * @param string $endpoint |
|
| 39 | 39 | * @param string $verb |
| 40 | 40 | * @param array $data |
| 41 | 41 | * @param bool $protected |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $repoName = ucfirst(strtolower($repoName)); |
| 52 | 52 | |
| 53 | 53 | // TODO: find a way to validate the repo! |
| 54 | - $process = new Process("rm -rf " . $ContainersPath . '/' .$repoName); |
|
| 54 | + $process = new Process("rm -rf " . $ContainersPath . '/' . $repoName); |
|
| 55 | 55 | $process->run(); |
| 56 | 56 | |
| 57 | 57 | if (!$process->isSuccessful()) { |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | * @param $name |
| 34 | 34 | * @param $userId |
| 35 | 35 | * |
| 36 | - * @return \App\Containers\Application\Models\Application|mixed |
|
| 36 | + * @return Application |
|
| 37 | 37 | */ |
| 38 | 38 | public function run($name, $userId) |
| 39 | 39 | { |
@@ -15,8 +15,8 @@ |
||
| 15 | 15 | { |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | - * @param \App\Containers\Application\UI\API\Requests\GenerateApplicationTokenRequest $request |
|
| 19 | - * @param \App\Containers\Application\Actions\GenerateApplicationTokenAction $action |
|
| 18 | + * @param CreateApplicationRequest $request |
|
| 19 | + * @param CreateApplicationWithTokenAction $action |
|
| 20 | 20 | * |
| 21 | 21 | * @return \Dingo\Api\Http\Response |
| 22 | 22 | */ |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | * LoginAction constructor. |
| 29 | 29 | * |
| 30 | 30 | * @param \App\Containers\Authentication\Tasks\WebLoginTask $webLoginTask |
| 31 | - * @param \App\Containers\Authentication\Tasks\IsUserAdminTask $isUserAdminTask |
|
| 31 | + * @param IsUserAdminTask $isUserAdminTask |
|
| 32 | 32 | */ |
| 33 | 33 | public function __construct(WebLoginTask $webLoginTask, IsUserAdminTask $isUserAdminTask) |
| 34 | 34 | { |