Passed
Push — master ( fe7535...9007a8 )
by Jens
03:14
created
src/templates/documents.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,8 @@  discard block
 block discarded – undo
24 24
           Search index is no longer in sync with documents.
25 25
           <a href="<?= $request::$subfolders ?><?= $cmsPrefix ?>/search/update-index?returnUrl=<?= urlencode($request::$subfolders . $cmsPrefix . '/documents') ?>" title="Update Index">Update Index</a>
26 26
         </div>
27
-      <?php else : ?>
27
+      <?php else {
28
+    : ?>
28 29
         <div class="message valid">
29 30
           <i class="fa fa-check"></i>
30 31
           Search index is in sync with documents.
@@ -56,7 +57,9 @@  discard block
 block discarded – undo
56 57
           <?php foreach ($documents as $document) : ?>
57 58
             <li class="grid-container">
58 59
                 <?php if ($document->type == 'document') : ?>
59
-                    <?php renderDocument($document, $cmsPrefix, '', $request); ?>
60
+                    <?php renderDocument($document, $cmsPrefix, '', $request);
61
+}
62
+?>
60 63
                 <?php elseif ($document->type == 'folder') : ?>
61 64
                     <?php renderFolder($document, $cmsPrefix, '', true, $request); ?>
62 65
                 <?php endif ?>
Please login to merge, or discard this patch.
src/templates/documents/fieldTypes/Rich-Text.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 ?>
7 7
 <div class="rte">
8 8
   <div id="summernote_<?= str_replace(']', '-', str_replace('[', '-',
9
-      $fieldPrefix)) . $field->slug ?>_rte_<?= $summernoteInstances ?>" class="summernote"><?= isset($value) ? $value : '' ?></div>
9
+        $fieldPrefix)) . $field->slug ?>_rte_<?= $summernoteInstances ?>" class="summernote"><?= isset($value) ? $value : '' ?></div>
10 10
 </div>
11 11
 <textarea style="display:none;" id="summernote_<?= $field->slug ?>_container_<?= $summernoteInstances ?>" name="<?= $fieldPrefix ?>[<?= $field->slug ?>][]"></textarea>
12 12
 <script>
Please login to merge, or discard this patch.
src/templates/documents/function.renderAction.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 { ?>
11 11
     <?php if ($condition) : ?>
12 12
   <a class="btn <?= $class ?>" title="<?= $title ?>" href="<?= $href ?>"<?php if ($onclick !== false) : ?> onclick="<?= /** @scrutinizer ignore-type */
13
-  $onclick ?>"<?php endif ?>>
13
+    $onclick ?>"<?php endif ?>>
14 14
     <i class="fa fa-<?= $icon ?>"></i>
15 15
   </a>
16 16
 <?php endif
Please login to merge, or discard this patch.
src/images/methods/Watermark.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
          */
38 38
         public function SetTransparency($transparency)
39 39
         {
40
-            $this->_transparency = (int)$transparency;
40
+            $this->_transparency = (int) $transparency;
41 41
             return $this;
42 42
         }
43 43
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
          */
65 65
         protected function calculateX($imageResource)
66 66
         {
67
-            if ((int)$this->_x === $this->_x) {
67
+            if ((int) $this->_x === $this->_x) {
68 68
                 return $this->_x;
69 69
             }
70 70
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             } elseif ($x == 'right') {
81 81
                 $x = $imageWidth - $watermarkWidth;
82 82
             }
83
-            return (int)$x;
83
+            return (int) $x;
84 84
         }
85 85
 
86 86
         /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
          */
93 93
         public function calculateY($imageResource)
94 94
         {
95
-            if ((int)$this->_y === $this->_y) {
95
+            if ((int) $this->_y === $this->_y) {
96 96
                 return $this->_y;
97 97
             }
98 98
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             } elseif ($y == 'bottom') {
109 109
                 $y = $imageHeight - $watermarkHeight;
110 110
             }
111
-            return (int)$y;
111
+            return (int) $y;
112 112
         }
113 113
 
114 114
         /**
Please login to merge, or discard this patch.
src/components/CachableBaseComponent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             $cacheExists = $this->cache !== false;
102 102
             $cacheExpired = false;
103 103
             if ($cacheExists) {
104
-                $cacheCreationStamp = (int)$this->cache->creationStamp;
104
+                $cacheCreationStamp = (int) $this->cache->creationStamp;
105 105
                 $currentTime = time();
106 106
                 $cacheAge = $currentTime - $cacheCreationStamp;
107 107
                 $maxAgeInterval = new \DateInterval($this->maxAge);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     private function setHeadersFromCache()
129 129
     {
130 130
         if (isset($this->cache->headers)) {
131
-            $headers = (array)json_decode($this->cache->headers);
131
+            $headers = (array) json_decode($this->cache->headers);
132 132
             /** @var array $headers */
133 133
             foreach ($headers as $headerName => $headerContent) {
134 134
                 ResponseHeaders::add($headerName, $headerContent);
Please login to merge, or discard this patch.
src/images/BitmapFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
             $g = hexdec($bitmapBodyModel->body[$iPos + 2] . $bitmapBodyModel->body[$iPos + 3]);
109 109
             $b = hexdec($bitmapBodyModel->body[$iPos] . $bitmapBodyModel->body[$iPos + 1]);
110 110
             //    Calculate and draw the pixel
111
-            $color = imagecolorallocate($bitmapBodyModel->image, (int)$r, (int)$g, (int)$b);
111
+            $color = imagecolorallocate($bitmapBodyModel->image, (int) $r, (int) $g, (int) $b);
112 112
             imagesetpixel($bitmapBodyModel->image, $bitmapBodyModel->x, $bitmapBodyModel->height - $bitmapBodyModel->y, $color);
113 113
             //    Raise the horizontal position
114 114
             $bitmapBodyModel->x++;
Please login to merge, or discard this patch.
src/images/Image.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
             }
110 110
 
111 111
             if ($mimeTypeConstantValue == IMAGETYPE_PNG) {
112
-                return imagepng($imageResource, $path, ((int)($quality / 10) - 1));
112
+                return imagepng($imageResource, $path, ((int) ($quality / 10) - 1));
113 113
             }
114 114
 
115 115
             throw new \RuntimeException('Not a valid mimetypeconstant given see function documentation');
Please login to merge, or discard this patch.
src/util/GlobalFunctions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
     {
66 66
         if (!isset($_GET['unsanitized'])) {
67 67
             $search = array(
68
-                '/\>[^\S ]+/s',     // strip whitespaces after tags, except space
69
-                '/[^\S ]+\</s',     // strip whitespaces before tags, except space
70
-                '/(\s)+/s',         // shorten multiple whitespace sequences
68
+                '/\>[^\S ]+/s', // strip whitespaces after tags, except space
69
+                '/[^\S ]+\</s', // strip whitespaces before tags, except space
70
+                '/(\s)+/s', // shorten multiple whitespace sequences
71 71
                 '/<!--(.|\s)*?-->/' // Remove HTML comments
72 72
             );
73 73
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public static function utf8Convert($array)
96 96
     {
97
-        array_walk_recursive($array, function (&$item) {
97
+        array_walk_recursive($array, function(&$item) {
98 98
             if (!mb_detect_encoding($item, 'utf-8', true)) {
99 99
                 $item = utf8_encode($item);
100 100
             }
Please login to merge, or discard this patch.
src/util/StringUtil.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     public static function slugify($str, $replace = array(), $delimiter = '-')
21 21
     {
22 22
         if (!empty($replace)) {
23
-            $str = str_replace((array)$replace, ' ', $str);
23
+            $str = str_replace((array) $replace, ' ', $str);
24 24
         }
25 25
 
26 26
         $clean = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $str);
Please login to merge, or discard this patch.