Completed
Push — master ( 8e46e1...99d49d )
by Şəhriyar
19:53
created
database/migrations/2015_02_18_113206_create_nested_entities.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('nested_entities', function (Blueprint $table) {
15
+        Schema::create('nested_entities', function(Blueprint $table) {
16 16
             $table->engine = 'InnoDb';
17 17
 
18 18
             $table->mediumInteger('id', true, true);
Please login to merge, or discard this patch.
database/migrations/2015_12_06_115712_create_files_users_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('files_users', function (Blueprint $table) {
15
+        Schema::create('files_users', function(Blueprint $table) {
16 16
             $table->engine = 'InnoDb';
17 17
             $table->string('file_hash', 64);
18 18
             $table->unsignedInteger('user_id');
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function down()
35 35
     {
36
-        Schema::table('files_users', function (Blueprint $table) {
36
+        Schema::table('files_users', function(Blueprint $table) {
37 37
             $table->dropForeign('files_users_file_hash_foreign');
38 38
             $table->dropForeign('files_users_user_id_foreign');
39 39
         });
Please login to merge, or discard this patch.
database/migrations/2015_05_13_125906_create_users_oauth_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('users_oauth', function (Blueprint $table) {
15
+        Schema::create('users_oauth', function(Blueprint $table) {
16 16
             $table->increments('id');
17 17
             $table->unsignedInteger('user_id');
18 18
             $table->string('remote_provider', 32);
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function down()
36 36
     {
37
-        Schema::table('users_oauth', function (Blueprint $table) {
37
+        Schema::table('users_oauth', function(Blueprint $table) {
38 38
             $table->dropForeign('users_oauth_user_id_foreign');
39 39
         });
40 40
         Schema::drop('users_oauth');
Please login to merge, or discard this patch.
bootstrap/app.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 */
13 13
 
14 14
 $app = new Illuminate\Foundation\Application(
15
-    realpath(__DIR__ . '/../')
15
+    realpath(__DIR__.'/../')
16 16
 );
17 17
 
18 18
 /*
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/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.
app/Models/File.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             throw new \Exception();
51 51
         }
52 52
 
53
-        return $query->where('mime', 'like', $type . '/%');
53
+        return $query->where('mime', 'like', $type.'/%');
54 54
     }
55 55
 
56 56
     /**
Please login to merge, or discard this patch.