Completed
Branch master (c0984a)
by Andrey
05:23
created
src/components/S3UploadComponent.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     /**
99 99
      * Sets a mediafile model for upload file.
100 100
      * @param Mediafile $mediafileModel
101
-     * @return UploadModelInterface
101
+     * @return \Itstructure\MFUploader\interfaces\UploadModelInterface
102 102
      */
103 103
     public function setModelForSave(Mediafile $mediafileModel): UploadModelInterface
104 104
     {
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     /**
120 120
      * Sets a mediafile model for delete file.
121 121
      * @param Mediafile $mediafileModel
122
-     * @return UploadModelInterface
122
+     * @return \Itstructure\MFUploader\interfaces\UploadModelInterface
123 123
      */
124 124
     public function setModelForDelete(Mediafile $mediafileModel): UploadModelInterface
125 125
     {
Please login to merge, or discard this patch.
src/controllers/album/AlbumController.php 1 patch
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
     /**
88 88
      * Set model.
89
-     * @param Album $model
89
+     * @param \Itstructure\MFUploader\models\album\Album $model
90 90
      */
91 91
     public function setModel(Album $model): void
92 92
     {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
     /**
97 97
      * Returns model.
98
-     * @return Album
98
+     * @return \Itstructure\MFUploader\models\album\Album
99 99
      */
100 100
     public function getModel(): Album
101 101
     {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
     /**
119 119
      * Lists all Album models.
120
-     * @return mixed
120
+     * @return string
121 121
      */
122 122
     public function actionIndex()
123 123
     {
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      * Displays a single Album model.
140 140
      * @param integer $id
141 141
      * @throws NotFoundHttpException if the model cannot be found
142
-     * @return mixed
142
+     * @return string
143 143
      */
144 144
     public function actionView($id)
145 145
     {
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      * @param integer $id
232 232
      * @throws NotFoundHttpException if the model cannot be found
233 233
      * @throws BadRequestHttpException
234
-     * @return mixed
234
+     * @return \yii\web\Response
235 235
      */
236 236
     public function actionDelete($id)
237 237
     {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      * @param $key
252 252
      * @throws BadRequestHttpException
253 253
      * @throws NotFoundHttpException
254
-     * @return Album
254
+     * @return \Itstructure\MFUploader\models\album\Album
255 255
      */
256 256
     protected function findModel($key): Album
257 257
     {
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 
281 281
     /**
282 282
      * Returns new object of main Album model.
283
-     * @return Album
283
+     * @return \Itstructure\MFUploader\models\album\Album
284 284
      */
285 285
     protected function getNewModel(): Album
286 286
     {
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 
291 291
     /**
292 292
      * Returns an intermediate model for working with the main.
293
-     * @param int|string|null $key
293
+     * @param integer $key
294 294
      * @return void
295 295
      */
296 296
     protected function setModelByConditions($key = null): void
Please login to merge, or discard this patch.
src/controllers/upload/CommonUploadController.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     private $uploadModel;
42 42
 
43 43
     /**
44
-     * @return UploadComponentInterface
44
+     * @return \Itstructure\MFUploader\interfaces\UploadComponentInterface
45 45
      */
46 46
     abstract protected function getUploadComponent(): UploadComponentInterface;
47 47
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
     /**
109 109
      * Set upload model.
110
-     * @param UploadModelInterface $model
110
+     * @param \Itstructure\MFUploader\interfaces\UploadModelInterface $model
111 111
      * @return void
112 112
      */
113 113
     public function setUploadModel(UploadModelInterface $model): void
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
     /**
119 119
      * Returns upload model.
120
-     * @return UploadModelInterface
120
+     * @return \Itstructure\MFUploader\interfaces\UploadModelInterface
121 121
      */
122 122
     public function getUploadModel(): UploadModelInterface
123 123
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,6 @@
 block discarded – undo
6 6
 use yii\filters\{AccessControl, ContentNegotiator, VerbFilter};
7 7
 use yii\base\{InvalidConfigException, UnknownMethodException, InvalidArgumentException};
8 8
 use yii\web\{Controller, Request, Response, UploadedFile, BadRequestHttpException, NotFoundHttpException, ForbiddenHttpException};
9
-use Aws\Exception\AwsException;
10
-use Aws\S3\Exception\S3Exception;
11 9
 use Itstructure\MFUploader\Module;
12 10
 use Itstructure\MFUploader\assets\UploadmanagerAsset;
13 11
 use Itstructure\MFUploader\models\Mediafile;
Please login to merge, or discard this patch.
src/interfaces/UploadModelInterface.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,6 +29,7 @@  discard block
 block discarded – undo
29 29
     /**
30 30
      * Set mediafile model.
31 31
      * @param Mediafile $model
32
+     * @return void
32 33
      */
33 34
     public function setMediafileModel(Mediafile $model): void;
34 35
 
@@ -40,14 +41,13 @@  discard block
 block discarded – undo
40 41
 
41 42
     /**
42 43
      * Set file.
43
-     * @param UploadedFile $file|null
44 44
      * @return void
45 45
      */
46 46
     public function setFile(UploadedFile $file = null): void;
47 47
 
48 48
     /**
49 49
      * Get file.
50
-     * @return mixed
50
+     * @return UploadedFile
51 51
      */
52 52
     public function getFile();
53 53
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      * Load data.
81 81
      * Used from the parent model yii\base\Model.
82 82
      * @param $data
83
-     * @param null $formName
83
+     * @param string|null $formName
84 84
      * @return bool
85 85
      */
86 86
     public function load($data, $formName = null);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      * Used from the parent model yii\base\Model.
91 91
      * @param      $values
92 92
      * @param bool $safeOnly
93
-     * @return mixed
93
+     * @return void
94 94
      */
95 95
     public function setAttributes($values, $safeOnly = true);
96 96
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      * Used from the parent model yii\base\Model.
100 100
      * @param null $attributeNames
101 101
      * @param bool $clearErrors
102
-     * @return mixed
102
+     * @return boolean
103 103
      */
104 104
     public function validate($attributeNames = null, $clearErrors = true);
105 105
 
Please login to merge, or discard this patch.
src/models/album/Album.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     /**
142 142
      * Get file type by album type.
143 143
      * @param string $albumType
144
-     * @return mixed|null
144
+     * @return null|string
145 145
      */
146 146
     public static function getFileType(string $albumType)
147 147
     {
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     /**
161 161
      * Search models by file types.
162 162
      * @param array $types
163
-     * @return ActiveRecord|array
163
+     * @return \Itstructure\MFUploader\models\ActiveRecord
164 164
      */
165 165
     public static function findByTypes(array $types): ActiveRecord
166 166
     {
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     /**
216 216
      * Get album's mediafiles.
217 217
      * @param string|null $ownerAttribute
218
-     * @return \Itstructure\MFUploader\models\ActiveRecord[]
218
+     * @return \Itstructure\MFUploader\models\Mediafile[]
219 219
      */
220 220
     public function getMediaFiles(string $ownerAttribute = null)
221 221
     {
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
     /**
240 240
      * Get album thumb image.
241 241
      * @param array  $options
242
-     * @return mixed
242
+     * @return null|string
243 243
      */
244 244
     public function getDefaultThumbImage(array $options = [])
245 245
     {
Please login to merge, or discard this patch.
src/models/Mediafile.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -564,7 +564,7 @@
 block discarded – undo
564 564
      * @param string|null $location
565 565
      * @param Module $module
566 566
      * @param string $fileType
567
-     * @return array
567
+     * @return string
568 568
      */
569 569
     private function getOptions(array $options, string $location = null, Module $module, string $fileType)
570 570
     {
Please login to merge, or discard this patch.
src/models/OwnersAlbums.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Itstructure\MFUploader\models;
4 4
 
5 5
 use yii\db\ActiveQuery;
6
-use yii\base\InvalidArgumentException;
7 6
 use yii\helpers\ArrayHelper;
8 7
 use Itstructure\MFUploader\models\album\Album;
9 8
 
Please login to merge, or discard this patch.
src/models/OwnersMediafiles.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Itstructure\MFUploader\models;
4 4
 
5 5
 use yii\db\ActiveQuery;
6
-use yii\base\InvalidArgumentException;
7 6
 use yii\helpers\ArrayHelper;
8 7
 use Itstructure\MFUploader\interfaces\UploadModelInterface;
9 8
 
Please login to merge, or discard this patch.
src/models/upload/LocalUpload.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
 
139 139
     /**
140 140
      * Create thumb.
141
-     * @param ThumbConfigInterface|ThumbConfig $thumbConfig
141
+     * @param \Itstructure\MFUploader\interfaces\ThumbConfigInterface $thumbConfig
142 142
      * @return string
143 143
      */
144 144
     protected function createThumb(ThumbConfigInterface $thumbConfig)
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Itstructure\MFUploader\models\upload;
4 4
 
5
-use Yii;
6 5
 use yii\imagine\Image;
7 6
 use yii\base\InvalidConfigException;
8 7
 use yii\helpers\{BaseFileHelper, Inflector};
Please login to merge, or discard this patch.