Completed
Branch develop (f0eff0)
by Gabriel
06:11
created
Category
Modules/AbstractModule/Controllers/Traits/HasMediaAsyncTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@
 block discarded – undo
56 56
         } catch (FileCannotBeAdded $exception) {
57 57
             http_response_code(415);
58 58
             header('Content-Type: application/json; charset=utf-8');
59
-            $output = ['error' => $exception->getMessage()];
59
+            $output = [ 'error' => $exception->getMessage() ];
60 60
             if ($exception instanceof FileUnacceptableForCollection) {
61
-                $output['error'] .= ': '. $exception->violations->getMessageString();
61
+                $output[ 'error' ] .= ': ' . $exception->violations->getMessageString();
62 62
             }
63 63
             echo json_encode($output);
64 64
         }
Please login to merge, or discard this patch.
src/MediaModule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
         $images = $item->getMedia($type);
71 71
 
72 72
         return self::loadView(
73
-            '/admin/gallery/'.$type.'-grid',
74
-            ['item' => $item, 'images' => $images]
73
+            '/admin/gallery/' . $type . '-grid',
74
+            [ 'item' => $item, 'images' => $images ]
75 75
         );
76 76
     }
77 77
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $images = $item->getMedia($type);
86 86
 
87 87
         return self::loadView(
88
-            '/admin/panels/'.$type.'-gallery',
88
+            '/admin/panels/' . $type . '-gallery',
89 89
             [
90 90
                 'item' => $item,
91 91
                 'viewObj' => $view,
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      *
101 101
      * @return null|string
102 102
      */
103
-    public static function loadView($path, $variables = [])
103
+    public static function loadView($path, $variables = [ ])
104 104
     {
105 105
         return View::instance()->load($path, $variables, true);
106 106
     }
Please login to merge, or discard this patch.
src/resources/views/admin/panels/images-gallery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,4 +2,4 @@
 block discarded – undo
2 2
 /** @var \ByTIC\MediaLibrary\HasMedia\HasMediaTrait|\Nip\Records\Record $item */
3 3
 
4 4
 $type = 'images';
5
-require __DIR__.'/base-gallery.php';
5
+require __DIR__ . '/base-gallery.php';
Please login to merge, or discard this patch.
src/resources/views/admin/panels/base-gallery.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@
 block discarded – undo
6 6
 /** @var Nip\View $viewObj */
7 7
 $uploadUrl = isset($uploadUrl) ? $uploadUrl : $viewObj->uploadURL;
8 8
 $type = isset($type) ? $type : 'images';
9
-$modalId = isset($modalId) ? $modalId : 'dropzone-modal-'.$type;
9
+$modalId = isset($modalId) ? $modalId : 'dropzone-modal-' . $type;
10 10
 $constraint = $item->getMediaRepository()->getCollection($type)->getConstraint();
11 11
 ?>
12 12
 <div class="medialibrary-panel">
13 13
     <div class="panel panel-inverse card card-inverse">
14 14
         <div class="panel-heading card-header">
15 15
             <h4 class="panel-title card-title">
16
-                <?php echo translator()->trans($type.'.label.title.singular'); ?>
16
+                <?php echo translator()->trans($type . '.label.title.singular'); ?>
17 17
             </h4>
18 18
             <div class="panel-heading-btn card-header-btn">
19 19
                 <button type="button" class="btn btn-info btn-xs" data-toggle="modal" data-target="#<?php echo $modalId; ?>">
20 20
                     <i class="fas fa-upload"></i>
21
-                    <?php echo translator()->trans($type.'.label.title.upload'); ?>
21
+                    <?php echo translator()->trans($type . '.label.title.upload'); ?>
22 22
                 </button>
23 23
             </div>
24 24
         </div>
Please login to merge, or discard this patch.
src/resources/views/admin/panels/covers-gallery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,4 +2,4 @@
 block discarded – undo
2 2
 /** @var \ByTIC\MediaLibrary\HasMedia\HasMediaTrait|\Nip\Records\Record $item */
3 3
 
4 4
 $type = 'covers';
5
-require __DIR__.'/base-gallery.php';
6 5
\ No newline at end of file
6
+require __DIR__ . '/base-gallery.php';
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
src/resources/views/admin/gallery/images-grid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,4 +2,4 @@
 block discarded – undo
2 2
 
3 3
 $type = 'images';
4 4
 
5
-require __DIR__.'/base-grid.php';
5
+require __DIR__ . '/base-grid.php';
Please login to merge, or discard this patch.
src/resources/views/admin/gallery/covers-grid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,4 +2,4 @@
 block discarded – undo
2 2
 
3 3
 $type = 'covers';
4 4
 
5
-require __DIR__.'/base-grid.php';
5
+require __DIR__ . '/base-grid.php';
Please login to merge, or discard this patch.
src/resources/views/admin/gallery/base-grid.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
 <div class="gallery row" id="item-gallery">
13 13
     <div class="alert alert-info nomargin"<?php echo count($images) ? ' style="display: none;"' : ''; ?>>
14
-        <?php echo translator()->trans($type.'.messages.dnx'); ?>
14
+        <?php echo translator()->trans($type . '.messages.dnx'); ?>
15 15
     </div>
16 16
     <?php if ($images) { ?>
17 17
         <?php foreach ($images as $image) { ?>
Please login to merge, or discard this patch.
src/MediaLibraryModuleServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function provides()
17 17
     {
18
-        return [];
18
+        return [ ];
19 19
     }
20 20
 
21 21
     /**
@@ -32,13 +32,13 @@  discard block
 block discarded – undo
32 32
 
33 33
     protected function registerResources()
34 34
     {
35
-        $folder = __DIR__.'/resources/lang/';
35
+        $folder = __DIR__ . '/resources/lang/';
36 36
         $languages = $this->getContainer()->get('translation.languages');
37 37
 
38 38
         $translator = $this->getContainer()->get('translator');
39 39
 
40 40
         foreach ($languages as $language) {
41
-            $path = $folder.$language;
41
+            $path = $folder . $language;
42 42
             if (is_dir($path)) {
43 43
                 $translator->addResource('php', $path, $language);
44 44
             }
Please login to merge, or discard this patch.