Passed
Push — develop ( 111896...eb49e9 )
by Jens
02:45
created
cloudcontrol/templates/cms/documents/brick.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,8 +9,10 @@
 block discarded – undo
9 9
 				<? if (isset($dynamicBrick)) :
10 10
 					$fieldSlug = $field->slug;
11 11
 					$value = isset($dynamicBrick->fields->$fieldSlug) ? current($dynamicBrick->fields->$fieldSlug) : '';
12
-				else :
12
+				else {
13
+					:
13 14
 					$value = '';
15
+				}
14 16
 				endif ?>
15 17
 				<? if ($field->multiple == true && $field->type != 'Rich Text') : ?>
16 18
 				<ul class="grid-wrapper sortable">
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@  discard block
 block discarded – undo
3 3
 	<a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a>
4 4
 </div>
5 5
 <?if ($static == true) {
6
-	$fieldPrefix = 'bricks[' . $myBrickSlug . '][' . str_replace('.', '', str_replace(' ', '', microtime())) . '][fields]';
6
+	$fieldPrefix = 'bricks['.$myBrickSlug.']['.str_replace('.', '', str_replace(' ', '', microtime())).'][fields]';
7 7
 } else {
8
-	$fieldPrefix = 'dynamicBricks[' . $brick->slug . '][' . str_replace('.', '', str_replace(' ', '', microtime())) . ']';
8
+	$fieldPrefix = 'dynamicBricks['.$brick->slug.']['.str_replace('.', '', str_replace(' ', '', microtime())).']';
9 9
 }?>
10 10
 <? foreach ($brick->fields as $field) : ?>
11 11
 			<div class="form-element">
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 							<a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a>
31 31
 							<div class="form-element">
32 32
 				<? endif ?>
33
-					<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?>
33
+					<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?>
34 34
 				<? if ($field->multiple == true && $field->type != 'Rich Text') : ?>
35 35
 
36 36
 							</div>
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 						<li class="grid-container">
53 53
 							<div class="grid-box-10">
54 54
 								<div class="grid-inner form-element">
55
-									<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?>
55
+									<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?>
56 56
 								</div>
57 57
 							</div>
58 58
 							<div class="grid-box-2">
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 								</div>
63 63
 							</div>
64 64
 						</li>
65
-						<?$value='';?>
65
+						<?$value = ''; ?>
66 66
 						<? endforeach ?>
67 67
 					<? endif ?>
68 68
 				</ul>
@@ -79,10 +79,10 @@  discard block
 block discarded – undo
79 79
 							<a class="btn error js-deletemultiple"><i class="fa fa-times"></i></a>
80 80
 							<a class="btn move ui-sortable-handle"><i class="fa fa-arrows-v"></i></a>
81 81
 							<div class="form-element">
82
-							<? include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?>
82
+							<? include(__DIR__.'/fieldTypes/'.str_replace(' ', '-', $field->type).'.php') ?>
83 83
 							</div>
84 84
 						</li>
85
-						<?$value='';?>
85
+						<?$value = ''; ?>
86 86
 					<? endforeach ?>
87 87
 					<? endif ?>
88 88
 					</div>
@@ -91,5 +91,5 @@  discard block
 block discarded – undo
91 91
 				<a class="btn js-addrtemultiple">+</a>
92 92
 				<? endif ?>
93 93
 			</div>
94
-			<?$value='';?>
94
+			<?$value = ''; ?>
95 95
 		<? endforeach ?>
Please login to merge, or discard this patch.
cloudcontrol/templates/cms/documents/fieldTypes/Image.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 	<div class="grid-container">
3 3
 		<div class="grid-box-2">
4 4
 			<div class="grid-inner">
5
-				<div<?=isset($value) ? ' style="background-image:url(\'' . $request::$subfolders . 'images/' . $value . '\');"' : '' ?> class="selected-image" id="<?=$field->slug?>_selectedImage"></div>
5
+				<div<?=isset($value) ? ' style="background-image:url(\''.$request::$subfolders.'images/'.$value.'\');"' : '' ?> class="selected-image" id="<?=$field->slug?>_selectedImage"></div>
6 6
 			</div>
7 7
 		</div>
8 8
 		<div class="grid-box-10">
Please login to merge, or discard this patch.
cloudcontrol/templates/cms/images/show.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,22 +10,22 @@
 block discarded – undo
10 10
 	<div class="show-image">
11 11
 		<label>File</label>
12 12
 		<div class="value">
13
-			<?=isset($image)? $image->file : '' ?>
13
+			<?=isset($image) ? $image->file : '' ?>
14 14
 		</div>
15 15
 		<label>Type</label>
16 16
 		<div class="value">
17
-			<?=isset($image)? $image->type : '' ?>
17
+			<?=isset($image) ? $image->type : '' ?>
18 18
 		</div>
19 19
 		<label>Size</label>
20 20
 		<div class="value">
21
-			<?=isset($image)? humanFileSize($image->size) : '' ?>
21
+			<?=isset($image) ? humanFileSize($image->size) : '' ?>
22 22
 		</div>
23 23
 		<label>Set</label>
24 24
 		<? if (isset($image)) : ?>
25 25
 			<? foreach ($image->set as $key => $set) : ?>
26 26
 				<div class="sets">
27 27
 					<label><?=$key?></label>
28
-					<img src="<?=\library\cc\Request::$subfolders . 'images/' . $set?>" />
28
+					<img src="<?=\library\cc\Request::$subfolders.'images/'.$set?>" />
29 29
 				</div>
30 30
 			<? endforeach ?>
31 31
 		<? endif ?>
Please login to merge, or discard this patch.
cloudcontrol/templates/cms/documents.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<script>window.onload=function(){History.init();History.replaceState(null, 'Cloud Control CMS', '/<?=$request::$subfolders . $cmsPrefix?>/documents?path=/');};</script>
1
+<script>window.onload=function(){History.init();History.replaceState(null, 'Cloud Control CMS', '/<?=$request::$subfolders.$cmsPrefix?>/documents?path=/');};</script>
2 2
 <section class="documents">
3 3
 	<h2><i class="fa fa-file-text-o"></i> Documents</h2>
4 4
 	<nav class="actions">
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 			<? foreach ($documents as $document) : ?>
25 25
 				<li class="grid-container">
26 26
 					<? if ($document->type == 'document') : ?>
27
-						<?renderDocument($document, $cmsPrefix);?>
27
+						<?renderDocument($document, $cmsPrefix); ?>
28 28
 					<? elseif ($document->type == 'folder') : ?>
29
-						<?renderFolder($document, $cmsPrefix, '', true);?>
29
+						<?renderFolder($document, $cmsPrefix, '', true); ?>
30 30
 					<? endif ?>
31 31
 				</li>
32 32
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 <? function renderDocument($document, $cmsPrefix, $slugPrefix = '') {?>
38 38
 <div class="grid-box-10">
39 39
 	<h3>
40
-		<a class="btn documentTitle" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/edit-document?slug=<?=$slugPrefix . $document->slug?>" title="Edit">
40
+		<a class="btn documentTitle" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/edit-document?slug=<?=$slugPrefix.$document->slug?>" title="Edit">
41 41
 			<i class="fa fa-file-text-o"></i> <?=$document->title?>
42 42
 		</a>
43 43
 		<small class="small state <?=strtolower($document->state)?>"><?=ucfirst($document->state)?></small>
@@ -53,29 +53,29 @@  discard block
 block discarded – undo
53 53
 	</h3>
54 54
 </div>
55 55
 <div class="documentActions grid-box-2">
56
-	<a class="btn" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/edit-document?slug=<?=$slugPrefix . $document->slug?>" title="Edit"><i class="fa fa-pencil"></i></a>
57
-	<a onclick="return confirm('Are you sure you want to delete this item?');" class="btn error" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/delete-document?slug=<?=$slugPrefix . $document->slug?>" title="Delete"><i class="fa fa-times"></i></a>
56
+	<a class="btn" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/edit-document?slug=<?=$slugPrefix.$document->slug?>" title="Edit"><i class="fa fa-pencil"></i></a>
57
+	<a onclick="return confirm('Are you sure you want to delete this item?');" class="btn error" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/delete-document?slug=<?=$slugPrefix.$document->slug?>" title="Delete"><i class="fa fa-times"></i></a>
58 58
 </div>
59 59
 <?}?>
60
-<? function renderFolder($document, $cmsPrefix, $slugPrefix ='', $root = false) {?>
60
+<? function renderFolder($document, $cmsPrefix, $slugPrefix = '', $root = false) {?>
61 61
 <div class="grid-box-8">
62 62
 	<h3>
63
-		<a class="btn documentTitle openFolder" data-slug="<?=$slugPrefix . $document->slug?>" title="Open">
63
+		<a class="btn documentTitle openFolder" data-slug="<?=$slugPrefix.$document->slug?>" title="Open">
64 64
 			<i class="fa fa-folder-o "></i> <?=$document->title?>
65 65
 		</a>
66 66
 	</h3>
67 67
 </div>
68 68
 <div class="documentActions grid-box-4">
69
-	<a class="btn" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/edit-folder?slug=<?=$slugPrefix . $document->slug?>" title="Edit"><i class="fa fa-pencil"></i></a>
70
-	<a onclick="return confirm('Are you sure you want to delete this item?');" class="btn error" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/delete-folder?slug=<?=$slugPrefix . $document->slug?>" title="Delete"><i class="fa fa-times"></i></a>
69
+	<a class="btn" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/edit-folder?slug=<?=$slugPrefix.$document->slug?>" title="Edit"><i class="fa fa-pencil"></i></a>
70
+	<a onclick="return confirm('Are you sure you want to delete this item?');" class="btn error" href="<?=\library\cc\Request::$subfolders?><?=$cmsPrefix?>/documents/delete-folder?slug=<?=$slugPrefix.$document->slug?>" title="Delete"><i class="fa fa-times"></i></a>
71 71
 </div>
72 72
 <ul class="documents grid-wrapper nested<?=$root ? ' root' : '' ?>">
73 73
 	<? foreach ($document->content as $subDocument) : ?>
74 74
 		<li class="grid-container">
75 75
 			<? if ($subDocument->type == 'document') : ?>
76
-				<?renderDocument($subDocument, $cmsPrefix, $slugPrefix . $document->slug . '/');?>
76
+				<?renderDocument($subDocument, $cmsPrefix, $slugPrefix.$document->slug.'/'); ?>
77 77
 			<? elseif ($subDocument->type == 'folder') : ?>
78
-				<?renderFolder($subDocument, $cmsPrefix, $slugPrefix . $document->slug . '/');?>
78
+				<?renderFolder($subDocument, $cmsPrefix, $slugPrefix.$document->slug.'/'); ?>
79 79
 			<? endif ?>
80 80
 		</li>
81 81
 	<? endforeach ?>
Please login to merge, or discard this patch.
cloudcontrol/templates/cms.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 				</li>
63 63
 				<? $nrOfMenuItems += 1 ?>
64 64
 				<? endif ?>
65
-				<li class="grid-box-<?=6 + (5-$nrOfMenuItems)?> log-off-box">
65
+				<li class="grid-box-<?=6 + (5 - $nrOfMenuItems)?> log-off-box">
66 66
 					<a class="btn log-off grid-inner" href="<?=$request::$subfolders?><?=$cmsPrefix?>/log-off">
67 67
 						<i class="fa fa-power-off"></i>
68 68
 						<span>Log off</span>
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	</main>
87 87
 <script>
88 88
 var subfolders = '<?=$request::$subfolders?>',
89
-	cmsSubfolders = '<?=$request::$subfolders . $cmsPrefix?>';
89
+	cmsSubfolders = '<?=$request::$subfolders.$cmsPrefix?>';
90 90
 </script>
91 91
 <script src="<?=$request::$subfolders?>js/cms.js"></script>
92 92
 </body>
Please login to merge, or discard this patch.
cloudcontrol/library/images/methods/Watermark.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,7 +61,9 @@  discard block
 block discarded – undo
61 61
 		 */
62 62
 		protected function calculateX($imageResource)
63 63
 		{
64
-			if (intval($this->_x) === $this->_x) return $this->_x;
64
+			if (intval($this->_x) === $this->_x) {
65
+				return $this->_x;
66
+			}
65 67
 			
66 68
 			$x = strtolower($this->_x);
67 69
 			
@@ -86,7 +88,9 @@  discard block
 block discarded – undo
86 88
 		 */
87 89
 		public function calculateY($imageResource)
88 90
 		{
89
-			if (intval($this->_y) === $this->_y) return $this->_y;
91
+			if (intval($this->_y) === $this->_y) {
92
+				return $this->_y;
93
+			}
90 94
 		
91 95
 			$y = strtolower($this->_y);
92 96
 			
@@ -123,7 +127,9 @@  discard block
 block discarded – undo
123 127
 		 */
124 128
 		public function GetWatermark()
125 129
 		{
126
-			if ($this->_watermark == null) throw new \Exception('A watermark is not set. Please supply a \library\image\Image using $this->SetWatermark');
130
+			if ($this->_watermark == null) {
131
+				throw new \Exception('A watermark is not set. Please supply a \library\image\Image using $this->SetWatermark');
132
+			}
127 133
 			return $this->_watermark;
128 134
 		}
129 135
 		
Please login to merge, or discard this patch.
cloudcontrol/library/images/methods/Resize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 			
64 64
 			// Define the ratio and adjust the width and height
65 65
 			if ($this->_preserveAspectRatio) {
66
-				$ratio = min($this->_width/$originalWidth, $this->_height/$originalHeight);
66
+				$ratio = min($this->_width / $originalWidth, $this->_height / $originalHeight);
67 67
 				$this->_width = $originalWidth * $ratio;
68 68
 				$this->_height = $originalHeight * $ratio;
69 69
 			}
Please login to merge, or discard this patch.
cloudcontrol/library/images/methods/Crop.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,8 +109,8 @@
 block discarded – undo
109 109
 
110 110
 			// Preserve transparency
111 111
 			imagecolortransparent($new, imagecolorallocatealpha($new, 0, 0, 0, 127));
112
-            imagealphablending($new, false);
113
-            imagesavealpha($new, true);
112
+			imagealphablending($new, false);
113
+			imagesavealpha($new, true);
114 114
 			
115 115
 			imagecopyresampled($new, $imageResource, $this->_destX, $this->_destY, $this->_x, $this->_y, $this->_destWidth, $this->_destHeight, $this->_destWidth, $this->_destHeight);
116 116
 			
Please login to merge, or discard this patch.
cloudcontrol/library/images/methods/BoxCrop.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,14 +26,14 @@
 block discarded – undo
26 26
 			
27 27
 			// Define which ratio will be used, depending on which is the smallest side
28 28
 			$ratio = min($hRatio, $wRatio);
29
-			if($ratio > 1) $ratio = 1;
29
+			if ($ratio > 1) $ratio = 1;
30 30
 			
31 31
 			// Define sizes
32 32
 			$this->_destWidth = floor($originalWidth * $ratio);
33 33
 			$this->_destHeight = floor($originalHeight * $ratio);
34 34
 			
35 35
 			// Define margins
36
-			$this->_destX = floor(($this->_width  - $this->_destWidth) / 2);
36
+			$this->_destX = floor(($this->_width - $this->_destWidth) / 2);
37 37
 			$this->_destY = floor(($this->_height - $this->_destHeight) / 2);
38 38
 			
39 39
 			// Execute the Crop method with the given parameters
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
 			
27 27
 			// Define which ratio will be used, depending on which is the smallest side
28 28
 			$ratio = min($hRatio, $wRatio);
29
-			if($ratio > 1) $ratio = 1;
29
+			if($ratio > 1) {
30
+				$ratio = 1;
31
+			}
30 32
 			
31 33
 			// Define sizes
32 34
 			$this->_destWidth = floor($originalWidth * $ratio);
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 		/**
18 18
 		 * @param resource $imageResource
19 19
 		 * @return resource
20
-         */
20
+		 */
21 21
 		public function Execute($imageResource)
22 22
 		{
23 23
 			// Define the origial width and height
Please login to merge, or discard this patch.