Passed
Push — 2.7.20 ( ...c94a2e )
by Neill
24:26
created
neon/cms/components/Renderer.php 1 patch
Braces   +15 added lines, -9 removed lines patch added patch discarded remove patch
@@ -48,12 +48,14 @@  discard block
 block discarded – undo
48 48
 		// set up the theme directories
49 49
 		foreach ($themeHierarchy as $theme) {
50 50
 			if (isset($theme['templates'])) {
51
-				foreach ($theme['templates'] as $tplDir)
52
-					$this->smarty->addTemplateDir($tplDir);
51
+				foreach ($theme['templates'] as $tplDir) {
52
+									$this->smarty->addTemplateDir($tplDir);
53
+				}
53 54
 			}
54 55
 			if (isset($theme['plugins'])) {
55
-				foreach ($theme['plugins'] as $pluginDir)
56
-					$this->smarty->addPluginsDir($pluginDir);
56
+				foreach ($theme['plugins'] as $pluginDir) {
57
+									$this->smarty->addPluginsDir($pluginDir);
58
+				}
57 59
 			}
58 60
 		}
59 61
 
@@ -84,8 +86,9 @@  discard block
 block discarded – undo
84 86
 		$this->smarty->force_compile = neon()->isDevMode();
85 87
 
86 88
 		// ensure all errors are thrown when in debug mode
87
-		if (neon()->isDevMode())
88
-			$this->smarty->error_reporting = E_ALL;
89
+		if (neon()->isDevMode()) {
90
+					$this->smarty->error_reporting = E_ALL;
91
+		}
89 92
 	}
90 93
 
91 94
 	/**
@@ -121,7 +124,9 @@  discard block
 block discarded – undo
121 124
 
122 125
 	public static function component($params, $content, $tagName, $template, $repeat)
123 126
 	{
124
-		if ($repeat) return;
127
+		if ($repeat) {
128
+			return;
129
+		}
125 130
 		$params['content'] = $content;
126 131
 		$params['slot'] = $content;
127 132
 		$params['type'] = $tagName;
@@ -150,8 +155,9 @@  discard block
 block discarded – undo
150 155
 		$this->smarty->assign('site', $this->_page->getSiteData());
151 156
 
152 157
 		// an expensive-ish call so reduce need for it in repeated renders
153
-		if (!isset($templates[$template]))
154
-			$templates[$template] = $this->smarty->createTemplate($template);
158
+		if (!isset($templates[$template])) {
159
+					$templates[$template] = $this->smarty->createTemplate($template);
160
+		}
155 161
 		$tpl = $templates[$template];
156 162
 
157 163
 		// reset any parameters for the new render
Please login to merge, or discard this patch.