Completed
Push — master ( b1c4b6...a05019 )
by Şəhriyar
19s
created
server.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 // built-in PHP web server. This provides a convenient way to test a Laravel
9 9
 // application without having installed a "real" web server software here.
10 10
 
11
-if ($uri !== '/' && file_exists(__DIR__ . '/public' . $uri)) {
11
+if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
12 12
     return false;
13 13
 }
14
-require_once __DIR__ . '/public/index.php';
14
+require_once __DIR__.'/public/index.php';
Please login to merge, or discard this patch.
app/Listeners/Files/PersistUploadedFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,10 +46,10 @@
 block discarded – undo
46 46
         /** @var \App\Models\User $me */
47 47
         $me = app('sentinel')->getUser();
48 48
         $tag = $request->get('qqtag');
49
-        $tagLimit = config('filesystems.allowed_tags_and_limits.' . $tag);
49
+        $tagLimit = config('filesystems.allowed_tags_and_limits.'.$tag);
50 50
         if ($tagLimit > 0) {
51 51
             $allFilesWithSameTagBelongingToUser = $me->load([
52
-                'files' => function (BelongsToMany $query) use ($tag) {
52
+                'files' => function(BelongsToMany $query) use ($tag) {
53 53
                     $query->wherePivot('tag', '=', $tag);
54 54
                 }
55 55
             ])->files;
Please login to merge, or discard this patch.
app/Http/Controllers/FilesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             'qquuid' => 'required|string|size:36',
45 45
             'qqfilename' => 'required|string',
46 46
             'qqtotalfilesize' => 'required|numeric',
47
-            'qqtag' => 'required|string|in:' . implode(',', array_keys(config('filesystems.allowed_tags_and_limits'))),
47
+            'qqtag' => 'required|string|in:'.implode(',', array_keys(config('filesystems.allowed_tags_and_limits'))),
48 48
             'qqtotalparts' => 'required_with_all:qqpartindex,qqpartbyteoffset,qqchunksize|numeric',
49 49
             'qqpartindex' => 'required_with_all:qqtotalparts,qqpartbyteoffset,qqchunksize|numeric',
50 50
             'qqpartbyteoffset' => 'required_with_all:qqpartindex,qqtotalparts,qqchunksize|numeric',
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         /** @var \App\Models\User $me */
77 77
         $me = app('sentinel')->getUser();
78 78
 
79
-        $file = $me->with(['files' => function (BelongsToMany $query) use ($hash) {
79
+        $file = $me->with(['files' => function(BelongsToMany $query) use ($hash) {
80 80
             $query->where('hash', '=', $hash);
81 81
         }])->first()->files->first();
82 82
 
Please login to merge, or discard this patch.
app/Http/Controllers/Users/AuthController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function __construct()
18 18
     {
19 19
         if (!empty($locale = app('translator')->getLocale()) && $locale != app('config')->get('app.locale')) {
20
-            $this->redirectTo = '/' . $locale . $this->redirectTo;
20
+            $this->redirectTo = '/'.$locale.$this->redirectTo;
21 21
         }
22 22
 
23 23
         $this->middleware('guest', ['except' => 'getLogout']);
Please login to merge, or discard this patch.
app/Console/Commands/Inspire.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
      */
29 29
     public function handle()
30 30
     {
31
-        $this->comment(PHP_EOL . Inspiring::quote() . PHP_EOL);
31
+        $this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
32 32
     }
33 33
 }
Please login to merge, or discard this patch.
app/Services/Routing/LocalizedRouteCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,6 +73,6 @@
 block discarded – undo
73 73
             return $this->nameList[$name];
74 74
         }
75 75
 
76
-        return isset($this->nameList[$locale . '.' . $name]) ? $this->nameList[$locale . '.' . $name] : null;
76
+        return isset($this->nameList[$locale.'.'.$name]) ? $this->nameList[$locale.'.'.$name] : null;
77 77
     }
78 78
 }
Please login to merge, or discard this patch.
app/Services/Routing/LocalizedRouter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     protected function addFallthroughRoute($controller, $uri)
117 117
     {
118
-        $localizedUri = app('translator')->get('routes.' . $uri . '.');
118
+        $localizedUri = app('translator')->get('routes.'.$uri.'.');
119 119
         if (false !== strpos($localizedUri, '.')) {
120 120
             $localizedUri = $uri;
121 121
         }
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
         $localizedUriTranslationBitParts = [];
135 135
         while (list($level, $bitName) = each($uriExploded)) {
136 136
             if ($level == 0) {
137
-                $localizedUriTranslationBitParts[$level] = 'routes.' . $bitName . '.';
137
+                $localizedUriTranslationBitParts[$level] = 'routes.'.$bitName.'.';
138 138
             } else {
139
-                $localizedUriTranslationBitParts[$level] = trim($localizedUriTranslationBitParts[$level - 1], '.') . '.' . $bitName;
139
+                $localizedUriTranslationBitParts[$level] = trim($localizedUriTranslationBitParts[$level - 1], '.').'.'.$bitName;
140 140
             }
141 141
         }
142 142
         foreach ($localizedUriTranslationBitParts as $level => &$translationBitPart) {
Please login to merge, or discard this patch.
app/Services/Routing/LocalizedResourceRegistrar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      */
24 24
     protected function addResourceCreate($name, $base, $controller, $options)
25 25
     {
26
-        $uri = $this->getResourceUri($name) . '/' . app('translator')->get('routes..resources.create');
26
+        $uri = $this->getResourceUri($name).'/'.app('translator')->get('routes..resources.create');
27 27
 
28 28
         $action = $this->getResourceAction($name, $controller, 'create', $options);
29 29
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     protected function addResourceEdit($name, $base, $controller, $options)
44 44
     {
45
-        $uri = $this->getResourceUri($name) . '/{' . $base . '}/' . app('translator')->get('routes..resources.edit');
45
+        $uri = $this->getResourceUri($name).'/{'.$base.'}/'.app('translator')->get('routes..resources.edit');
46 46
 
47 47
         $action = $this->getResourceAction($name, $controller, 'edit', $options);
48 48
 
Please login to merge, or discard this patch.
app/Services/FileStream.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $this->filesystem = app('filesystem')->disk();
47 47
         $this->chunksExpireIn = config('filesystems.disks.local.chunks_expire_in');
48
-        $this->temporaryChunksFolder = DIRECTORY_SEPARATOR . '_chunks';
48
+        $this->temporaryChunksFolder = DIRECTORY_SEPARATOR.'_chunks';
49 49
         if (app('config')->has('filesystems.chunks_ttl') && is_int(config('filesystems.chunks_ttl'))) {
50 50
             $this->chunksExpireIn = config('filesystems.chunks_ttl');
51 51
         }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         }
89 89
 
90 90
         # Temp folder writable?
91
-        if (!is_writable($absolutePathToTemporaryChunksFolder = config('filesystems.disks.local.root') . $this->temporaryChunksFolder) || !is_executable($absolutePathToTemporaryChunksFolder)) {
91
+        if (!is_writable($absolutePathToTemporaryChunksFolder = config('filesystems.disks.local.root').$this->temporaryChunksFolder) || !is_executable($absolutePathToTemporaryChunksFolder)) {
92 92
             throw new FileStreamExceptions\TemporaryUploadFolderNotWritableException;
93 93
         }
94 94
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
         if ($totalNumberOfChunks > 1) {
139 139
             $chunkIndex = intval($request->get('qqpartindex'));
140
-            $targetFolder = $this->temporaryChunksFolder . DIRECTORY_SEPARATOR . $fineUploaderUuid;
140
+            $targetFolder = $this->temporaryChunksFolder.DIRECTORY_SEPARATOR.$fineUploaderUuid;
141 141
             if (!$this->filesystem->exists($targetFolder)) {
142 142
                 $this->filesystem->makeDirectory($targetFolder);
143 143
             }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             if (!$file->isValid()) {
146 146
                 throw new FileStreamExceptions\UploadAttemptFailedException;
147 147
             }
148
-            $file->move(storage_path('app' . $targetFolder), $chunkIndex);
148
+            $file->move(storage_path('app'.$targetFolder), $chunkIndex);
149 149
 
150 150
             return response()->json(['success' => true, 'uuid' => $fineUploaderUuid]);
151 151
         } else {
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     {
168 168
         $fineUploaderUuid = $request->get('qquuid');
169 169
         $chunkIndex = intval($request->get('qqpartindex'));
170
-        $numberOfExistingChunks = count($this->filesystem->files($this->temporaryChunksFolder . DIRECTORY_SEPARATOR . $fineUploaderUuid));
170
+        $numberOfExistingChunks = count($this->filesystem->files($this->temporaryChunksFolder.DIRECTORY_SEPARATOR.$fineUploaderUuid));
171 171
         if ($numberOfExistingChunks < $chunkIndex) {
172 172
             throw new FileStreamExceptions\UploadIncompleteException;
173 173
         }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $decimalPrefices = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
212 212
         $factor = intval(floor((strlen($bytes) - 1) / 3));
213 213
 
214
-        return sprintf("%.{$decimals}f", $bytes / pow($binary ? 1024 : 1000, $factor)) . ' ' . $binary ? $binaryPrefices[$factor] : $decimalPrefices[$factor];
214
+        return sprintf("%.{$decimals}f", $bytes / pow($binary ? 1024 : 1000, $factor)).' '.$binary ? $binaryPrefices[$factor] : $decimalPrefices[$factor];
215 215
     }
216 216
 
217 217
     /**
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      */
222 222
     public function getAbsolutePath($path)
223 223
     {
224
-        return config('filesystems.disks.local.root') . DIRECTORY_SEPARATOR . trim($path, DIRECTORY_SEPARATOR);
224
+        return config('filesystems.disks.local.root').DIRECTORY_SEPARATOR.trim($path, DIRECTORY_SEPARATOR);
225 225
     }
226 226
 
227 227
     /**
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     {
271 271
         # Prelim
272 272
         $fineUploaderUuid = $request->get('qquuid');
273
-        $chunksFolder = $this->temporaryChunksFolder . DIRECTORY_SEPARATOR . $fineUploaderUuid;
273
+        $chunksFolder = $this->temporaryChunksFolder.DIRECTORY_SEPARATOR.$fineUploaderUuid;
274 274
         $totalNumberOfChunks = $request->has('qqtotalparts') ? intval($request->get('qqtotalparts')) : 1;
275 275
 
276 276
         # Do we have all chunks?
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         # We have all chunks, proceed with combine.
283 283
         $targetStream = fopen($this->getAbsolutePath($fineUploaderUuid), 'wb');
284 284
         for ($i = 0; $i < $totalNumberOfChunks; $i++) {
285
-            $chunkStream = fopen($this->getAbsolutePath($chunksFolder . DIRECTORY_SEPARATOR . $i), 'rb');
285
+            $chunkStream = fopen($this->getAbsolutePath($chunksFolder.DIRECTORY_SEPARATOR.$i), 'rb');
286 286
             stream_copy_to_stream($chunkStream, $targetStream);
287 287
             fclose($chunkStream);
288 288
         }
Please login to merge, or discard this patch.