Completed
Push — master ( 1e7a7e...fbe17a )
by Mahmoud
02:30
created
app/Port/Email/Abstracts/MailsAbstract.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,6 @@
 block discarded – undo
37 37
     /**
38 38
      * MailsAbstract constructor.
39 39
      *
40
-     * @param \Illuminate\Mail\Mailer $mail
41 40
      */
42 41
     public function __construct()
43 42
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function send($data = [])
63 63
     {
64
-        if(!$this->fromEmail || !$this->toEmail){
64
+        if (!$this->fromEmail || !$this->toEmail) {
65 65
             throw new EmailIsMissedException();
66 66
         }
67 67
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         // check if sending emails is enabled and if this is not running a testing environment
71 71
         if (Config::get('mail.enabled')) {
72 72
 
73
-            Mail::queue('EmailTemplates.' . $this->template, $data, function ($m) {
73
+            Mail::queue('EmailTemplates.' . $this->template, $data, function($m) {
74 74
                 $m->from($this->fromEmail, $this->fromName);
75 75
                 $m->to($this->toEmail, $this->toName)
76 76
                     ->subject($this->subject);
Please login to merge, or discard this patch.
app/Port/Criterias/Eloquent/CountCriteria.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,6 +37,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
app/Port/Broadcast/Providers/BroadcastServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
         /*
20 20
          * Authenticate the user's personal channel...
21 21
          */
22
-        Broadcast::channel('App.User.*', function ($user, $userId) {
23
-            return (int) $user->id === (int) $userId;
22
+        Broadcast::channel('App.User.*', function($user, $userId) {
23
+            return (int)$user->id === (int)$userId;
24 24
         });
25 25
     }
26 26
 }
Please login to merge, or discard this patch.
app/Port/Middleware/Http/Localization.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
app/Port/Provider/Providers/MainServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Port/Provider/Traits/PortServiceProviderTrait.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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'));
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,6 +48,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
138 139
     }
139 140
 
140 141
     /**
141
-     * @param $directory
142
+     * @param string $directory
142 143
      */
143 144
     private function loadConfigs($directory)
144 145
     {
Please login to merge, or discard this patch.
app/Port/Configs/repository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
app/Port/Routes/Traits/RoutesServiceProviderTrait.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
app/Port/Tests/PHPUnit/Traits/TestingTrait.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,13 +32,13 @@
 block discarded – undo
32 32
     public $loggedInTestingUser;
33 33
 
34 34
     /**
35
-     * @param        $endpoint
35
+     * @param        string $endpoint
36 36
      * @param string $verb
37 37
      * @param array  $data
38 38
      * @param bool   $protected
39 39
      * @param array  $headers
40 40
      *
41
-     * @return  mixed
41
+     * @return  Response
42 42
      * @throws \Symfony\Component\Debug\Exception\UndefinedMethodException
43 43
      */
44 44
     public function apiCall($endpoint, $verb = 'get', array $data = [], $protected = true, array $headers = [])
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -355,7 +355,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.