Passed
Push — develop ( 546638...4b1aa8 )
by Jens
02:46
created
cloudcontrol/templates/cms/documents/fieldTypes/Rich-Text.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@  discard block
 block discarded – undo
6 6
 }
7 7
 ?>
8 8
 <div class="rte">
9
-	<div id="summernote_<?=str_replace(']', '-', str_replace('[','-', $fieldPrefix)) . $field->slug?>_rte_<?=$summernoteInstances?>" class="summernote"><?=isset($value) ? $value : '' ?></div>
9
+	<div id="summernote_<?=str_replace(']', '-', str_replace('[', '-', $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>
13 13
 	$(document).ready(function () {
14
-		$('#summernote_<?=str_replace(']', '-', str_replace('[','-', $fieldPrefix)) . $field->slug?>_rte_<?=$summernoteInstances?>').summernote({
14
+		$('#summernote_<?=str_replace(']', '-', str_replace('[', '-', $fieldPrefix)).$field->slug?>_rte_<?=$summernoteInstances?>').summernote({
15 15
 			height: 300,
16 16
 			toolbar: [
17 17
 				//[groupname, [button list]]
@@ -29,4 +29,4 @@  discard block
 block discarded – undo
29 29
 if (!isset($GLOBALS['rteList'])) {
30 30
 	$GLOBALS['rteList'] = array();
31 31
 }
32
-$GLOBALS['rteList'][] = 'summernote_' . str_replace(']', '-', str_replace('[','-', $fieldPrefix)) . $field->slug . '_rte_' . $summernoteInstances ?>
32
+$GLOBALS['rteList'][] = 'summernote_'.str_replace(']', '-', str_replace('[', '-', $fieldPrefix)).$field->slug.'_rte_'.$summernoteInstances ?>
Please login to merge, or discard this patch.
cloudcontrol/library/components/DocumentComponent.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 				if (isset($this->parameters['document'])) {
21 21
 					$this->parameters['document'] = $storage->getDocumentBySlug($this->parameters['document']);
22 22
 				} else {
23
-					throw new \Exception('When not using a regex, you need to set the parameter `document` with the path to the document in this sitemap item: ' . $this->matchedSitemapItem->title);
23
+					throw new \Exception('When not using a regex, you need to set the parameter `document` with the path to the document in this sitemap item: '.$this->matchedSitemapItem->title);
24 24
 				}
25 25
 			} else {
26 26
 				if (isset($this->parameters['document'])) {
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 					$relativeDocumentUri = current($this->matchedSitemapItem->matches[1]);
30 30
 					if (isset($this->parameters['folder'])) {
31 31
 						if (substr($this->parameters['folder'], -1) !== '/') {
32
-							$this->parameters['folder'] = $this->parameters['folder'] . '/';
32
+							$this->parameters['folder'] = $this->parameters['folder'].'/';
33 33
 						}
34
-						$relativeDocumentUri = $this->parameters['folder'] . $relativeDocumentUri;
34
+						$relativeDocumentUri = $this->parameters['folder'].$relativeDocumentUri;
35 35
 					}
36 36
 
37 37
 					$document = $storage->getDocumentBySlug($relativeDocumentUri);
Please login to merge, or discard this patch.
cloudcontrol/library/components/BaseComponent.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 		 * @param array   $parameters
41 41
 		 * @param         $matchedSitemapItem
42 42
 		 */
43
-		public function __construct($template='', Request $request, $parameters=array(), $matchedSitemapItem)
43
+		public function __construct($template = '', Request $request, $parameters = array(), $matchedSitemapItem)
44 44
 		{
45 45
 			$this->template = $template;
46 46
 			$this->request = $request;
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
 		 * @return string
88 88
 		 * @throws \Exception
89 89
 		 */
90
-		public function renderTemplate($template='', $obClean = true)
90
+		public function renderTemplate($template = '', $obClean = true)
91 91
 		{
92
-			$templatePath = __DIR__ . '/../../templates/' . $template . '.php';
92
+			$templatePath = __DIR__.'/../../templates/'.$template.'.php';
93 93
 			if (realpath($templatePath) !== false) {
94 94
 				if ($obClean) {
95 95
 					ob_clean();
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 				include($templatePath);
100 100
 				return ob_get_contents();
101 101
 			} else {
102
-				throw new \Exception('Couldnt find template ' . $templatePath);
102
+				throw new \Exception('Couldnt find template '.$templatePath);
103 103
 			}
104 104
 		}
105 105
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 		 * @return string
114 114
 		 * @throws \Exception
115 115
 		 */
116
-		public function includeTemplate($template='', $parameters = array())
116
+		public function includeTemplate($template = '', $parameters = array())
117 117
 		{
118 118
 			if (is_array($parameters)) {
119 119
 				foreach ($parameters as $name => $value) {
Please login to merge, or discard this patch.
cloudcontrol/library/cc/Application.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
 		 */
66 66
 		private function config()
67 67
 		{
68
-			$configPath = __DIR__ . '/../../config.json';
68
+			$configPath = __DIR__.'/../../config.json';
69 69
 			if (realpath($configPath) !== false) {
70 70
 				$json = file_get_contents($configPath);
71 71
 				$this->config = json_decode($json);
72 72
 			} else {
73
-				throw new \Exception('Couldn\'t find config file in path ' . $configPath);
73
+				throw new \Exception('Couldn\'t find config file in path '.$configPath);
74 74
 			}
75 75
 		}
76 76
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		private function sitemapMatching($request)
94 94
 		{
95 95
 			$sitemap = $this->storage->getSitemap();
96
-			$relativeUri = '/' . $request::$relativeUri;
96
+			$relativeUri = '/'.$request::$relativeUri;
97 97
 
98 98
 			foreach ($sitemap as $sitemapItem) {
99 99
 				if ($sitemapItem->regex) {
@@ -156,17 +156,17 @@  discard block
 block discarded – undo
156 156
 		 * @return mixed
157 157
 		 * @throws \Exception
158 158
 		 */
159
-		private function getComponentObject($class='', $template='', $parameters=array(), $matchedSitemapItem)
159
+		private function getComponentObject($class = '', $template = '', $parameters = array(), $matchedSitemapItem)
160 160
 		{
161
-			$libraryComponentName = '\\library\\components\\' . $class;
162
-			$userComponentName = '\\components\\' . $class;
161
+			$libraryComponentName = '\\library\\components\\'.$class;
162
+			$userComponentName = '\\components\\'.$class;
163 163
 			
164 164
 			if (\autoLoad($libraryComponentName, false)) {
165 165
 				$component = new $libraryComponentName($template, $this->request, $parameters, $matchedSitemapItem);
166 166
 			} elseif (\autoLoad($userComponentName, false)) {
167 167
 				$component = new $userComponentName($template, $this->request, $parameters, $matchedSitemapItem);
168 168
 			} else {
169
-				throw new \Exception('Could not load component ' . $class);
169
+				throw new \Exception('Could not load component '.$class);
170 170
 			}
171 171
 			
172 172
 			if (!$component instanceof Component) {
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		{
194 194
 			foreach ($this->matchedSitemapItems as $sitemapItem) {
195 195
 				header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + (60 * 60 * 24 * 2))); // 2 days
196
-				header("Cache-Control: max-age=" . (60 * 60 * 24 * 2));
196
+				header("Cache-Control: max-age=".(60 * 60 * 24 * 2));
197 197
 				$sitemapItem->object->render();
198 198
 				ob_clean();
199 199
 				echo $sitemapItem->object->get();
Please login to merge, or discard this patch.