@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | * |
61 | 61 | * @var string |
62 | 62 | */ |
63 | - public $skip_elements = 'p|pre|ol|ul|dl|object|table|h\d'; |
|
63 | + public $skip_elements = 'p|pre|ol|ul|dl|object|table|h\d'; |
|
64 | 64 | |
65 | 65 | /** |
66 | 66 | * Tags we want the parser to completely ignore when splitting the string. |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * Etc... |
168 | 168 | * } |
169 | 169 | */ |
170 | - $chunks = preg_split('/(<(?:[^<>]+(?:"[^"]*"|\'[^\']*\')?)+>)/', $str, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY); |
|
170 | + $chunks = preg_split('/(<(?:[^<>]+(?:"[^"]*"|\'[^\']*\')?)+>)/', $str, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); |
|
171 | 171 | |
172 | 172 | // Build our finalized string. We cycle through the array, skipping tags, and processing the contained text |
173 | 173 | $str = ''; |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | // We trim off the right-side new line so that the closing </p> tag |
373 | 373 | // will be positioned immediately following the string, matching |
374 | 374 | // the behavior of the opening <p> tag |
375 | - $str = '<p>'.rtrim($str).'</p>'; |
|
375 | + $str = '<p>'.rtrim($str).'</p>'; |
|
376 | 376 | } |
377 | 377 | |
378 | 378 | // Remove empty paragraphs if they are on the first line, as this |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | */ |
396 | 396 | protected function _protect_characters($match) |
397 | 397 | { |
398 | - return str_replace(array("'",'"','--',' '), array('{@SQ}', '{@DQ}', '{@DD}', '{@NBS}'), $match[0]); |
|
398 | + return str_replace(array("'", '"', '--', ' '), array('{@SQ}', '{@DQ}', '{@DD}', '{@NBS}'), $match[0]); |
|
399 | 399 | } |
400 | 400 | |
401 | 401 | // -------------------------------------------------------------------- |
@@ -266,8 +266,7 @@ |
||
266 | 266 | if ($reduce_linebreaks === TRUE) |
267 | 267 | { |
268 | 268 | $table['#<p>\n*</p>#'] = ''; |
269 | - } |
|
270 | - else |
|
269 | + } else |
|
271 | 270 | { |
272 | 271 | // If we have empty paragraph tags we add a non-breaking space |
273 | 272 | // otherwise most browsers won't treat them as true paragraphs |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * |
93 | 93 | * @var array |
94 | 94 | */ |
95 | - protected $_test_items_visible = array( |
|
95 | + protected $_test_items_visible = array( |
|
96 | 96 | 'test_name', |
97 | 97 | 'test_datatype', |
98 | 98 | 'res_datatype', |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | |
167 | 167 | $back = $this->_backtrace(); |
168 | 168 | |
169 | - $report = array ( |
|
169 | + $report = array( |
|
170 | 170 | 'test_name' => $test_name, |
171 | 171 | 'test_datatype' => gettype($test), |
172 | 172 | 'res_datatype' => $extype, |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $result = $this->result(); |
199 | 199 | } |
200 | 200 | |
201 | - $CI =& get_instance(); |
|
201 | + $CI = & get_instance(); |
|
202 | 202 | $CI->load->language('unit_test'); |
203 | 203 | |
204 | 204 | $this->_parse_template(); |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | */ |
274 | 274 | public function result($results = array()) |
275 | 275 | { |
276 | - $CI =& get_instance(); |
|
276 | + $CI = & get_instance(); |
|
277 | 277 | $CI->load->language('unit_test'); |
278 | 278 | |
279 | 279 | if (count($results) === 0) |
@@ -157,8 +157,7 @@ discard block |
||
157 | 157 | $expected = str_replace('is_double', 'is_float', $expected); |
158 | 158 | $result = $expected($test); |
159 | 159 | $extype = str_replace(array('true', 'false'), 'bool', str_replace('is_', '', $expected)); |
160 | - } |
|
161 | - else |
|
160 | + } else |
|
162 | 161 | { |
163 | 162 | $result = ($this->strict === TRUE) ? ($test === $expected) : ($test == $expected); |
164 | 163 | $extype = gettype($expected); |
@@ -215,8 +214,7 @@ discard block |
||
215 | 214 | if ($val === $CI->lang->line('ut_passed')) |
216 | 215 | { |
217 | 216 | $val = '<span style="color: #0C0;">'.$val.'</span>'; |
218 | - } |
|
219 | - elseif ($val === $CI->lang->line('ut_failed')) |
|
217 | + } elseif ($val === $CI->lang->line('ut_failed')) |
|
220 | 218 | { |
221 | 219 | $val = '<span style="color: #C00;">'.$val.'</span>'; |
222 | 220 | } |
@@ -290,8 +288,7 @@ discard block |
||
290 | 288 | if ( ! in_array($key, $this->_test_items_visible)) |
291 | 289 | { |
292 | 290 | continue; |
293 | - } |
|
294 | - elseif (in_array($key, array('test_name', 'test_datatype', 'test_res_datatype', 'result'), TRUE)) |
|
291 | + } elseif (in_array($key, array('test_name', 'test_datatype', 'test_res_datatype', 'result'), TRUE)) |
|
295 | 292 | { |
296 | 293 | if (FALSE !== ($line = $CI->lang->line(strtolower('ut_'.$val), FALSE))) |
297 | 294 | { |
@@ -16,10 +16,10 @@ |
||
16 | 16 | |
17 | 17 | <ul class="nav navbar-nav navbar-right"> |
18 | 18 | <li> |
19 | - <?php if (! empty($_SESSION['logged_in']) ) : ?> |
|
20 | - <a href="<?= site_url( \Myth\Route::named('logout') ) ?>">Logout</a> |
|
19 | + <?php if ( ! empty($_SESSION['logged_in'])) : ?> |
|
20 | + <a href="<?= site_url(\Myth\Route::named('logout')) ?>">Logout</a> |
|
21 | 21 | <?php else : ?> |
22 | - <a href="<?= site_url( \Myth\Route::named('login') ) ?>">Login</a> |
|
22 | + <a href="<?= site_url(\Myth\Route::named('login')) ?>">Login</a> |
|
23 | 23 | <?php endif; ?> |
24 | 24 | </li> |
25 | 25 | </ul> |
@@ -18,9 +18,12 @@ |
||
18 | 18 | <li> |
19 | 19 | <?php if (! empty($_SESSION['logged_in']) ) : ?> |
20 | 20 | <a href="<?= site_url( \Myth\Route::named('logout') ) ?>">Logout</a> |
21 | - <?php else : ?> |
|
21 | + <?php else { |
|
22 | + : ?> |
|
22 | 23 | <a href="<?= site_url( \Myth\Route::named('login') ) ?>">Login</a> |
23 | - <?php endif; ?> |
|
24 | + <?php endif; |
|
25 | +} |
|
26 | +?> |
|
24 | 27 | </li> |
25 | 28 | </ul> |
26 | 29 | </div> |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | - if (empty($navbar_style)) $themer->set('navbar_style', 'navbar-static'); |
|
3 | - if (empty($containerClass)) |
|
4 | - { |
|
5 | - $themer->set('containerClass', 'container'); |
|
6 | - $containerClass = 'container'; |
|
7 | - } |
|
2 | + if (empty($navbar_style)) $themer->set('navbar_style', 'navbar-static'); |
|
3 | + if (empty($containerClass)) |
|
4 | + { |
|
5 | + $themer->set('containerClass', 'container'); |
|
6 | + $containerClass = 'container'; |
|
7 | + } |
|
8 | 8 | ?> |
9 | 9 | |
10 | 10 | <?= $themer->display('bootstrap:fragments/head') ?> |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | - if (empty($navbar_style)) $themer->set('navbar_style', 'navbar-static'); |
|
2 | + if (empty($navbar_style)) { |
|
3 | + $themer->set('navbar_style', 'navbar-static'); |
|
4 | + } |
|
3 | 5 | if (empty($containerClass)) |
4 | 6 | { |
5 | 7 | $themer->set('containerClass', 'container'); |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <!doctype html> |
2 | 2 | <html> |
3 | 3 | <head> |
4 | - <title><?= !empty($page_title) ? $page_title : 'Docs'; echo ' - '. config_item('site.name') ?></title> |
|
4 | + <title><?= ! empty($page_title) ? $page_title : 'Docs'; echo ' - '.config_item('site.name') ?></title> |
|
5 | 5 | |
6 | 6 | <?= $html_meta->renderTags() ?> |
7 | 7 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | </ul> |
38 | 38 | |
39 | 39 | <!-- Search Form --> |
40 | - <?= form_open( site_url('docs/search'), 'class="navbar-form navbar-right"' ); ?> |
|
40 | + <?= form_open(site_url('docs/search'), 'class="navbar-form navbar-right"'); ?> |
|
41 | 41 | <div class="form-group"> |
42 | 42 | <input type="search" class="form-control" name="search_terms" placeholder="<?= lang('docs_search_for') ?>"/> |
43 | 43 | </div> |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | <div class="row"> |
70 | 70 | |
71 | 71 | <div class="col-md-9 main"> |
72 | - <?php if (! empty($view_content)) : ?> |
|
72 | + <?php if ( ! empty($view_content)) : ?> |
|
73 | 73 | <?= $view_content; ?> |
74 | 74 | <?php else: ?> |
75 | 75 | <div class="alert"> |
@@ -30,7 +30,10 @@ discard block |
||
30 | 30 | <div class="collapse navbar-collapse" id="main-nav-collapse"> |
31 | 31 | <ul class="nav navbar-nav navbar-left"> |
32 | 32 | <?php foreach (config_item('docs.folders') as $group => $path) : ?> |
33 | - <li <?php if ($this->uri->segment(2) == $group) echo 'class="active"'; ?>> |
|
33 | + <li <?php if ($this->uri->segment(2) == $group) { |
|
34 | + echo 'class="active"'; |
|
35 | +} |
|
36 | +?>> |
|
34 | 37 | <a href="<?= site_url("docs/{$group}"); ?>"><?= ucwords($group) ?></a> |
35 | 38 | </li> |
36 | 39 | <?php endforeach; ?> |
@@ -71,11 +74,14 @@ discard block |
||
71 | 74 | <div class="col-md-9 main"> |
72 | 75 | <?php if (! empty($view_content)) : ?> |
73 | 76 | <?= $view_content; ?> |
74 | - <?php else: ?> |
|
77 | + <?php else { |
|
78 | + : ?> |
|
75 | 79 | <div class="alert"> |
76 | 80 | <?= lang('docs_not_found') ?> |
77 | 81 | </div> |
78 | - <?php endif; ?> |
|
82 | + <?php endif; |
|
83 | +} |
|
84 | +?> |
|
79 | 85 | </div> |
80 | 86 | |
81 | 87 | <div class="col-md-3 sidebar"> |
@@ -11,10 +11,10 @@ |
||
11 | 11 | <!-- Right Nav Section --> |
12 | 12 | <ul class="right"> |
13 | 13 | <li> |
14 | - <?php if (! empty($_SESSION['logged_in']) ) : ?> |
|
15 | - <a href="<?= site_url( \Myth\Route::named('logout') ) ?>">Logout</a> |
|
14 | + <?php if ( ! empty($_SESSION['logged_in'])) : ?> |
|
15 | + <a href="<?= site_url(\Myth\Route::named('logout')) ?>">Logout</a> |
|
16 | 16 | <?php else : ?> |
17 | - <a href="<?= site_url( \Myth\Route::named('login') ) ?>">Login</a> |
|
17 | + <a href="<?= site_url(\Myth\Route::named('login')) ?>">Login</a> |
|
18 | 18 | <?php endif; ?> |
19 | 19 | </li> |
20 | 20 | </ul> |
@@ -13,9 +13,12 @@ |
||
13 | 13 | <li> |
14 | 14 | <?php if (! empty($_SESSION['logged_in']) ) : ?> |
15 | 15 | <a href="<?= site_url( \Myth\Route::named('logout') ) ?>">Logout</a> |
16 | - <?php else : ?> |
|
16 | + <?php else { |
|
17 | + : ?> |
|
17 | 18 | <a href="<?= site_url( \Myth\Route::named('login') ) ?>">Login</a> |
18 | - <?php endif; ?> |
|
19 | + <?php endif; |
|
20 | +} |
|
21 | +?> |
|
19 | 22 | </li> |
20 | 23 | </ul> |
21 | 24 |
@@ -4,8 +4,11 @@ |
||
4 | 4 | <a href="#" class="close">×</a> |
5 | 5 | </div> |
6 | 6 | |
7 | -<?php else: ?> |
|
7 | +<?php else { |
|
8 | + : ?> |
|
8 | 9 | |
9 | 10 | <div id="notice"></div> |
10 | 11 | |
11 | -<?php endif; ?> |
|
12 | 12 | \ No newline at end of file |
13 | +<?php endif; |
|
14 | +} |
|
15 | +?> |
|
13 | 16 | \ No newline at end of file |
@@ -61,7 +61,7 @@ |
||
61 | 61 | * @param mixed alias name or array of alias->field_id pairs |
62 | 62 | * @param string field_id if alias name was passed in |
63 | 63 | * @param bool |
64 | - * @return array |
|
64 | + * @return string |
|
65 | 65 | */ |
66 | 66 | function smiley_js($alias = '', $field_id = '', $inline = TRUE) |
67 | 67 | { |
@@ -115,8 +115,7 @@ discard block |
||
115 | 115 | if (isset($this->DSN)) |
116 | 116 | { |
117 | 117 | $this->dsn .= 'DSN='.$this->DSN; |
118 | - } |
|
119 | - elseif ( ! empty($this->database)) |
|
118 | + } elseif ( ! empty($this->database)) |
|
120 | 119 | { |
121 | 120 | $this->dsn .= 'DSN='.$this->database; |
122 | 121 | } |
@@ -130,8 +129,7 @@ discard block |
||
130 | 129 | if (isset($this->DATABASE)) |
131 | 130 | { |
132 | 131 | $this->dsn .= 'DATABASE='.$this->DATABASE.';'; |
133 | - } |
|
134 | - elseif ( ! empty($this->database)) |
|
132 | + } elseif ( ! empty($this->database)) |
|
135 | 133 | { |
136 | 134 | $this->dsn .= 'DATABASE='.$this->database.';'; |
137 | 135 | } |
@@ -139,8 +137,7 @@ discard block |
||
139 | 137 | if (isset($this->HOSTNAME)) |
140 | 138 | { |
141 | 139 | $this->dsn .= 'HOSTNAME='.$this->HOSTNAME.';'; |
142 | - } |
|
143 | - else |
|
140 | + } else |
|
144 | 141 | { |
145 | 142 | $this->dsn .= 'HOSTNAME='.(empty($this->hostname) ? '127.0.0.1;' : $this->hostname.';'); |
146 | 143 | } |
@@ -148,8 +145,7 @@ discard block |
||
148 | 145 | if (isset($this->PORT)) |
149 | 146 | { |
150 | 147 | $this->dsn .= 'PORT='.$this->port.';'; |
151 | - } |
|
152 | - elseif ( ! empty($this->port)) |
|
148 | + } elseif ( ! empty($this->port)) |
|
153 | 149 | { |
154 | 150 | $this->dsn .= ';PORT='.$this->port.';'; |
155 | 151 | } |
@@ -4,8 +4,11 @@ |
||
4 | 4 | <a href="#" class="close">×</a> |
5 | 5 | </div> |
6 | 6 | |
7 | -<?php else: ?> |
|
7 | +<?php else { |
|
8 | + : ?> |
|
8 | 9 | |
9 | 10 | <div id="notice"></div> |
10 | 11 | |
11 | -<?php endif; ?> |
|
12 | 12 | \ No newline at end of file |
13 | +<?php endif; |
|
14 | +} |
|
15 | +?> |
|
13 | 16 | \ No newline at end of file |