Passed
Branch master (384920)
by Kanstantsin
08:15
created
src/file/saver/Factory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
      */
68 68
     protected static function getTempFile(string $content)
69 69
     {
70
-        $stream = fopen('php://memory','rb+');
70
+        $stream = fopen('php://memory', 'rb+');
71 71
         fwrite($stream, $content); // write file into stream
72 72
         rewind($stream); // reset stream pointer to start
73 73
 
Please login to merge, or discard this patch.
src/file/saver/FileListSaver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,16 +91,16 @@
 block discarded – undo
91 91
     public function rules(): array
92 92
     {
93 93
         return [
94
-            ['model', function ($attribute) {
94
+            ['model', function($attribute) {
95 95
                 if ($this->$attribute->isNewRecord || $this->$attribute->id === null) {
96 96
                     $this->$attribute->addError($attribute, 'Parent model must be saved.');
97 97
                 }
98 98
             }],
99 99
             [
100 100
                 'fileArray',
101
-                function ($attribute) {
101
+                function($attribute) {
102 102
                     // max count
103
-                    $fileArray = array_filter($this->fileArray, function (File $file) {
103
+                    $fileArray = array_filter($this->fileArray, function(File $file) {
104 104
                         return $file->isActual();
105 105
                     });
106 106
                     if (\count($fileArray) > $this->aliasConfig['maxCount']) {
Please login to merge, or discard this patch.
src/file/formatter/icon/IconGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      * @param null|string $extension
86 86
      * @return string returns default icon if nothing found
87 87
      */
88
-    public function getIcon(?string $extension): ?string
88
+    public function getIcon(?string $extension) : ?string
89 89
     {
90 90
         $iconClass = $this->iconSet[$this->getIconType($extension)] ?? null;
91 91
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      * @param null|string $extension
100 100
      * @return string
101 101
      */
102
-    public function getIconType(?string $extension): string
102
+    public function getIconType(?string $extension) : string
103 103
     {
104 104
         if ($extension !== null && $extension !== '') {
105 105
             foreach (self::TYPE_TO_REGEX as $type => $regex) {
Please login to merge, or discard this patch.
src/file/formatter/preview/Preview.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      * @var array
24 24
      */
25 25
     public static $iconPreviewArray = [
26
-        'file' => ['txt', 'doc',],
26
+        'file' => ['txt', 'doc', ],
27 27
     ];
28 28
 
29 29
     /**
Please login to merge, or discard this patch.
src/file/FileManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
      * @param null|string $extension
130 130
      * @return string
131 131
      */
132
-    public function getIcon(?string $extension): ?string
132
+    public function getIcon(?string $extension) : ?string
133 133
     {
134 134
         return $this->iconGenerator->getIcon($extension);
135 135
     }
Please login to merge, or discard this patch.
src/yii2/model/File.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     public static function tableName(): string
47 47
     {
48 48
         // TODO: how to defined it outside via any type of config?
49
-         return '{{%file}}';
49
+            return '{{%file}}';
50 50
     }
51 51
 
52 52
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
             // filters
83 83
             [
84 84
                 'name',
85
-                function ($attribute) {
85
+                function($attribute) {
86 86
                     $name = $this->$attribute ?: static::DEFAULT_FILENAME;
87 87
                     // remove all wrong characters
88 88
                     $name = preg_replace('/[^A-zА-я0-9\s]+/u', '-', $name);
Please login to merge, or discard this patch.
src/yii2/action/UploadAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
                 $uploadedFile,
125 125
                 $this->fileManager->getAliasConfig($this->ownerModelAlias),
126 126
                 $this->contentFS,
127
-                [ // other config
127
+                [// other config
128 128
                     'parent_model' => $this->ownerModelAlias,
129 129
                     'parent_model_id' => $this->ownerId,
130 130
                 ]);
Please login to merge, or discard this patch.
src/yii2/action/GetAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,6 +176,6 @@
 block discarded – undo
176 176
             $options['height'] = $height;
177 177
         }
178 178
 
179
-        return [$fileType, $options,];
179
+        return [$fileType, $options, ];
180 180
     }
181 181
 }
Please login to merge, or discard this patch.