Completed
Push — 3.0 ( 146ff5...da916b )
by Olivier
04:40
created
lib/Block/EditBlock.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -11,13 +11,10 @@
 block discarded – undo
11 11
 
12 12
 namespace Icybee\Modules\Files\Block;
13 13
 
14
-use ICanBoogie\I18n;
15 14
 use ICanBoogie\Operation;
16
-
17 15
 use Brickrouge\Element;
18 16
 use Brickrouge\Document;
19 17
 use Brickrouge\Form;
20
-
21 18
 use Icybee\Modules\Files as Root;
22 19
 use Icybee\Modules\Files\File;
23 20
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 	{
37 37
 		parent::add_assets($document);
38 38
 
39
-		$document->css->add(Root\DIR . 'public/edit.css');
40
-		$document->js->add(Root\DIR . 'public/edit.js');
39
+		$document->css->add(Root\DIR.'public/edit.css');
40
+		$document->js->add(Root\DIR.'public/edit.js');
41 41
 	}
42 42
 
43 43
 	protected function lazy_get_values()
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
 	protected function lazy_get_children()
54 54
 	{
55
-		$folder = \ICanBoogie\REPOSITORY . 'tmp';
55
+		$folder = \ICanBoogie\REPOSITORY.'tmp';
56 56
 
57 57
 		if (!is_writable($folder))
58 58
 		{
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 				Element::CHILDREN => [
62 62
 
63
-					$this->t('The folder %folder is not writable !', [ '%folder' => $folder ])
63
+					$this->t('The folder %folder is not writable !', ['%folder' => $folder])
64 64
 
65 65
 				]
66 66
 			];
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 
118 118
 				Form::LABEL => 'file',
119 119
 				Element::REQUIRED => empty($nid),
120
-				\Brickrouge\File::FILE_WITH_LIMIT => $this->app->site->metas[$this->module->flat_id . '.max_file_size'],
120
+				\Brickrouge\File::FILE_WITH_LIMIT => $this->app->site->metas[$this->module->flat_id.'.max_file_size'],
121 121
 				Element::WEIGHT => -100,
122
-				\Brickrouge\File::T_UPLOAD_URL => Operation::encode($this->module->id . '/upload'),
122
+				\Brickrouge\File::T_UPLOAD_URL => Operation::encode($this->module->id.'/upload'),
123 123
 
124 124
 				'value' => $path
125 125
 
Please login to merge, or discard this patch.
lib/Hooks.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 namespace Icybee\Modules\Files;
13 13
 
14 14
 use ICanBoogie\Core;
15
-
16 15
 use Icybee\Modules\Files\Storage\FileStorage;
17 16
 use Icybee\Modules\Files\Storage\FileStorageIndex;
18 17
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	{
28 28
 		static $index;
29 29
 
30
-		return $index ?: $index = new FileStorageIndex(\ICanBoogie\REPOSITORY . 'files-index');
30
+		return $index ?: $index = new FileStorageIndex(\ICanBoogie\REPOSITORY.'files-index');
31 31
 	}
32 32
 
33 33
 	/**
@@ -39,6 +39,6 @@  discard block
 block discarded – undo
39 39
 	{
40 40
 		static $manager;
41 41
 
42
-		return $manager ?: $manager = new FileStorage(\ICanBoogie\REPOSITORY . 'files', $app->file_storage_index);
42
+		return $manager ?: $manager = new FileStorage(\ICanBoogie\REPOSITORY.'files', $app->file_storage_index);
43 43
 	}
44 44
 }
Please login to merge, or discard this patch.
lib/Routing/FilesAdminController.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,6 @@
 block discarded – undo
12 12
 namespace Icybee\Modules\Files\Routing;
13 13
 
14 14
 use ICanBoogie\HTTP\FileResponse;
15
-use ICanBoogie\HTTP\Request;
16
-
17 15
 use Icybee\Modules\Files\Binding\CoreBindings;
18 16
 use Icybee\Modules\Files\File;
19 17
 use Icybee\Modules\Files\FileModel;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 		return new FileResponse($pathname, $this->request, [
81 81
 
82 82
 			FileResponse::OPTION_ETAG => $pathname->hash,
83
-			FileResponse::OPTION_FILENAME => $record->title . $record->extension,
83
+			FileResponse::OPTION_FILENAME => $record->title.$record->extension,
84 84
 			FileResponse::OPTION_MIME => $record->mime
85 85
 
86 86
 		]);
Please login to merge, or discard this patch.
lib/Routing/FilesController.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -12,12 +12,10 @@
 block discarded – undo
12 12
 namespace Icybee\Modules\Files\Routing;
13 13
 
14 14
 use ICanBoogie\HTTP\FileResponse;
15
-use ICanBoogie\HTTP\Request;
16 15
 use ICanBoogie\Routing\Controller;
17 16
 use ICanBoogie\Binding\Routing\ControllerBindings;
18 17
 use ICanBoogie\Binding\Routing\ForwardUndefinedPropertiesToApplication;
19 18
 use ICanBoogie\Module\ControllerBindings as ModuleBindings;
20
-
21 19
 use Icybee\Modules\Files\Binding\CoreBindings;
22 20
 use Icybee\Modules\Files\File;
23 21
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 		return new FileResponse($pathname, $this->request, [
81 81
 
82 82
 			FileResponse::OPTION_ETAG => $pathname->hash,
83
-			FileResponse::OPTION_FILENAME => $record->title . $record->extension,
83
+			FileResponse::OPTION_FILENAME => $record->title.$record->extension,
84 84
 			FileResponse::OPTION_MIME => $record->mime
85 85
 
86 86
 		]);
Please login to merge, or discard this patch.
lib/Block/ManageBlock/DownloadColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  */
12 12
 class DownloadColumn extends ManageBlock\Column
13 13
 {
14
-	public function __construct(ManageBlock $manager, $id, array $options=[])
14
+	public function __construct(ManageBlock $manager, $id, array $options = [])
15 15
 	{
16 16
 		parent::__construct($manager, $id, [
17 17
 
Please login to merge, or discard this patch.
lib/Facets/SizeCriterion.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 		{
30 30
 			$value = $modifiers['size'];
31 31
 
32
-			if (in_array($value, [ 'l', 'm', 's' ]))
32
+			if (in_array($value, ['l', 'm', 's']))
33 33
 			{
34 34
 				$filters['size'] = $value;
35 35
 			}
Please login to merge, or discard this patch.
lib/Storage/Base64.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 */
26 26
 	static public function encode($data)
27 27
 	{
28
-		return strtr(base64_encode($data), [ '+' => '-', '/' => '_' ]);
28
+		return strtr(base64_encode($data), ['+' => '-', '/' => '_']);
29 29
 	}
30 30
 
31 31
 	/**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	static public function decode($data)
39 39
 	{
40
-		return base64_decode(strtr($data, [ '-' => '+', '_' => '/' ]));
40
+		return base64_decode(strtr($data, ['-' => '+', '_' => '/']));
41 41
 	}
42 42
 
43 43
 	/**
Please login to merge, or discard this patch.
lib/FileUpload.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 namespace Icybee\Modules\Files;
13 13
 
14 14
 use Brickrouge\Element;
15
-use ICanBoogie\I18n;
16 15
 
17 16
 class FileUpload extends \Brickrouge\File
18 17
 {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 			foreach ($details as $detail)
39 39
 			{
40
-				$rc .= '<li>' . $detail . '</li>';
40
+				$rc .= '<li>'.$detail.'</li>';
41 41
 			}
42 42
 
43 43
 			$rc .= '</ul>';
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 			'class' => "icon-download-alt",
56 56
 			'href' => $path,
57
-			'title' => $this->t('download', [], [ 'scope' => 'fileupload.element' ])
57
+			'title' => $this->t('download', [], ['scope' => 'fileupload.element'])
58 58
 
59 59
 		]);
60 60
 	}
Please login to merge, or discard this patch.
updates.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 		foreach ($model->select("nid, path")->mode(\PDO::FETCH_NUM) as list($nid, $path))
64 64
 		{
65
-			$update('.' . pathinfo($path, PATHINFO_EXTENSION), $nid);
65
+			$update('.'.pathinfo($path, PATHINFO_EXTENSION), $nid);
66 66
 		}
67 67
 	}
68 68
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 		foreach ($model->select("nid, uuid, path")->mode(\PDO::FETCH_NUM) as list($nid, $uuid, $path))
86 86
 		{
87
-			$path = $document_root . $path;
87
+			$path = $document_root.$path;
88 88
 
89 89
 			if (!file_exists($path))
90 90
 			{
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 			}
95 95
 
96 96
 			$hash = $storage->add($path)->hash;
97
-			$index->add(IndexKey::from([ $nid, $uuid, $hash ]));
97
+			$index->add(IndexKey::from([$nid, $uuid, $hash]));
98 98
 		}
99 99
 
100 100
 		$model->remove_column('path');
Please login to merge, or discard this patch.