Completed
Push — master ( e252bb...9a0cd7 )
by Daniel
09:22
created
model/menus/entity/item.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	 * Checks if a url is an extension route
185 185
 	 *
186 186
 	 * @param string $item_url
187
-	 * @return true|false
187
+	 * @return boolean
188 188
 	 */
189 189
 	private function is_extension_route($item_url)
190 190
 	{
@@ -195,6 +195,9 @@  discard block
 block discarded – undo
195 195
 		return ($host || $extension || is_dir($item_url) || $is_absolute_path) ? false : true;
196 196
 	}
197 197
 
198
+	/**
199
+	 * @param string $item_url
200
+	 */
198 201
 	private function add_board_url($item_url)
199 202
 	{
200 203
 		return $this->board_url . ($item_url[0] === '/' ? '' : '/') . $item_url;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	 */
137 137
 	public function set_item_icon($icon)
138 138
 	{
139
-		$this->item_icon = ($icon) ? trim($icon) . ' ' : '';
139
+		$this->item_icon = ($icon) ? trim($icon).' ' : '';
140 140
 		return $this;
141 141
 	}
142 142
 
@@ -146,14 +146,14 @@  discard block
 block discarded – undo
146 146
 	 */
147 147
 	public function set_item_url($item_url)
148 148
 	{
149
-		$this->item_url = str_replace($this->board_url . '/', '', $item_url);
149
+		$this->item_url = str_replace($this->board_url.'/', '', $item_url);
150 150
 
151 151
 		// to make things uniform and easy to switch between mod_rewrite_enabled or not without
152 152
 		// having to edit menu items, we add app.php/ for all extension routes
153 153
 		if (strpos($item_url, 'app.php') === false && $this->is_extension_route($item_url))
154 154
 		{
155 155
 			$this->item_url = ltrim($this->item_url, './');
156
-			$this->item_url = '/app.php/' . $this->item_url;
156
+			$this->item_url = '/app.php/'.$this->item_url;
157 157
 		}
158 158
 
159 159
 		return $this;
@@ -197,6 +197,6 @@  discard block
 block discarded – undo
197 197
 
198 198
 	private function add_board_url($item_url)
199 199
 	{
200
-		return $this->board_url . ($item_url[0] === '/' ? '' : '/') . $item_url;
200
+		return $this->board_url.($item_url[0] === '/' ? '' : '/').$item_url;
201 201
 	}
202 202
 }
Please login to merge, or discard this patch.