@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function setFindSource($value = true) |
81 | 81 | { |
82 | - $this->findSource = (bool) $value; |
|
82 | + $this->findSource = (bool)$value; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | public function setExplainSource($enabled, $types) |
92 | 92 | { |
93 | 93 | $this->explainQuery = $enabled; |
94 | - if($types){ |
|
94 | + if ($types) { |
|
95 | 95 | $this->explainTypes = $types; |
96 | 96 | } |
97 | 97 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $hints[] = '<code>LIMIT</code> without <code>ORDER BY</code> causes non-deterministic results, depending on the query execution plan'; |
161 | 161 | } |
162 | 162 | if (preg_match('/LIKE\\s[\'"](%.*?)[\'"]/i', $query, $matches)) { |
163 | - $hints[] = 'An argument has a leading wildcard character: <code>' . $matches[1]. '</code>. |
|
163 | + $hints[] = 'An argument has a leading wildcard character: <code>' . $matches[1] . '</code>. |
|
164 | 164 | The predicate with this argument is not sargable and cannot use an index if one exists.'; |
165 | 165 | } |
166 | 166 | return implode("<br />", $hints); |
@@ -242,13 +242,13 @@ discard block |
||
242 | 242 | $totalTime += $query['time']; |
243 | 243 | |
244 | 244 | $bindings = $query['bindings']; |
245 | - if($query['hints']){ |
|
245 | + if ($query['hints']) { |
|
246 | 246 | $bindings['hints'] = $query['hints']; |
247 | 247 | } |
248 | 248 | |
249 | 249 | $statements[] = array( |
250 | 250 | 'sql' => $this->formatSql($query['query']), |
251 | - 'params' => (object) $bindings, |
|
251 | + 'params' => (object)$bindings, |
|
252 | 252 | 'duration' => $query['time'], |
253 | 253 | 'duration_str' => $this->formatDuration($query['time']), |
254 | 254 | 'stmt_id' => $query['source'], |
@@ -27,7 +27,7 @@ |
||
27 | 27 | try { |
28 | 28 | $object = new \DateTime($rawDate); |
29 | 29 | return $object->format($format); |
30 | - } catch(\Exception $e) { |
|
30 | + } catch (\Exception $e) { |
|
31 | 31 | return false; |
32 | 32 | } |
33 | 33 | } |
@@ -141,7 +141,7 @@ |
||
141 | 141 | $path = Normalize::diskFullPath($path); |
142 | 142 | |
143 | 143 | $dir = opendir($path . '/.'); |
144 | - while($item = readdir($dir)) { |
|
144 | + while ($item = readdir($dir)) { |
|
145 | 145 | if (is_file($sub = $path . '/' . $item)) { |
146 | 146 | $item_ext = Str::lastIn($item, '.'); |
147 | 147 | if ($ext === null || Arr::in($item_ext, $ext)) { |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | // sounds like a array-path based |
174 | 174 | if (Str::contains('.', $name)) { |
175 | 175 | $splitedName = explode('.', $name); |
176 | - foreach($splitedName as $nameKey) { |
|
176 | + foreach ($splitedName as $nameKey) { |
|
177 | 177 | $property['name'] .= '[' . $nameKey . ']'; |
178 | 178 | $property['id'] .= '-' . $nameKey; |
179 | 179 | } |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | $property['value'] = $opt; |
227 | 227 | // apply structured checkboxes style for each item |
228 | - $buildCheckboxes .= Str::replace('%item%' , self::buildSingleTag('input', $property) . self::nohtml($opt), $this->structureCheckboxes); |
|
228 | + $buildCheckboxes .= Str::replace('%item%', self::buildSingleTag('input', $property) . self::nohtml($opt), $this->structureCheckboxes); |
|
229 | 229 | } |
230 | 230 | |
231 | 231 | $response = $buildCheckboxes; |
@@ -120,12 +120,12 @@ |
||
120 | 120 | if (isset($item['linkProperty']) && Obj::isArray($item['linkProperty'])) { |
121 | 121 | $htmlLink .= self::applyProperty($item['linkProperty']); |
122 | 122 | } |
123 | - $htmlLink .= '>' . ((isset($item['html']) && $item['html'] === true ) ? App::$Security->secureHtml($item['text']) : App::$Security->strip_tags($item['text'])) . '</a>'; |
|
123 | + $htmlLink .= '>' . ((isset($item['html']) && $item['html'] === true) ? App::$Security->secureHtml($item['text']) : App::$Security->strip_tags($item['text'])) . '</a>'; |
|
124 | 124 | $items .= $htmlLink; |
125 | 125 | } |
126 | 126 | $items .= '</li>'; |
127 | 127 | } |
128 | 128 | |
129 | - return '<' . $elements['type'] . $ulProperties . '>' . $items . '</' . $elements['type'] . '>'; |
|
129 | + return '<' . $elements['type'] . $ulProperties . '>' . $items . '</' . $elements['type'] . '>'; |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 | \ No newline at end of file |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | public function display(array $property = null) |
33 | 33 | { |
34 | 34 | // total items is less to pagination requirement |
35 | - if (($this->page * $this->step)+1 > $this->total) { |
|
35 | + if (($this->page * $this->step) + 1 > $this->total) { |
|
36 | 36 | return null; |
37 | 37 | } |
38 | 38 | |
39 | - $lastPage = ceil($this->total/$this->step); // 6/5 ~ 2 = 0..2 |
|
39 | + $lastPage = ceil($this->total / $this->step); // 6/5 ~ 2 = 0..2 |
|
40 | 40 | |
41 | 41 | if ($lastPage <= 1) { |
42 | 42 | return null; |
@@ -59,15 +59,15 @@ discard block |
||
59 | 59 | 'type' => 'link', 'link' => '#', 'text' => '...', 'property' => ['class' => 'disabled'] |
60 | 60 | ]; |
61 | 61 | // add middle page |
62 | - $middlePage = ceil($lastPage/2); |
|
62 | + $middlePage = ceil($lastPage / 2); |
|
63 | 63 | $items[] = [ |
64 | - 'type' => 'link', 'link' => $this->setUrlPage($middlePage), 'text' => $middlePage+1 |
|
64 | + 'type' => 'link', 'link' => $this->setUrlPage($middlePage), 'text' => $middlePage + 1 |
|
65 | 65 | ]; |
66 | 66 | // add "..." button |
67 | 67 | $items[] = [ |
68 | 68 | 'type' => 'link', 'link' => '#', 'text' => '...', 'property' => ['class' => 'disabled'] |
69 | 69 | ]; |
70 | - $items = Arr::merge($items, $this->generateItems($lastPage-4, $lastPage)); |
|
70 | + $items = Arr::merge($items, $this->generateItems($lastPage - 4, $lastPage)); |
|
71 | 71 | } else { // meanwhile on middle |
72 | 72 | // generate 1-2 pages |
73 | 73 | $items = $this->generateItems(0, 2); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | ]; |
79 | 79 | |
80 | 80 | // add middle variance -3..mid..+3 |
81 | - $items = Arr::merge($items, $this->generateItems($this->page-3, $this->page+3)); |
|
81 | + $items = Arr::merge($items, $this->generateItems($this->page - 3, $this->page + 3)); |
|
82 | 82 | |
83 | 83 | // add "..." button |
84 | 84 | $items[] = [ |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | ]; |
87 | 87 | |
88 | 88 | // add latest 2 items |
89 | - $items = Arr::merge($items, $this->generateItems($lastPage-2, $lastPage)); |
|
89 | + $items = Arr::merge($items, $this->generateItems($lastPage - 2, $lastPage)); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | } else { // less then 10 items in pagination |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $items = []; |
142 | 142 | for ($i = $start; $i < $end; $i++) { |
143 | 143 | $items[] = [ |
144 | - 'type' => 'link', 'link' => $this->setUrlPage($i), 'text' => $i+1 |
|
144 | + 'type' => 'link', 'link' => $this->setUrlPage($i), 'text' => $i + 1 |
|
145 | 145 | ]; |
146 | 146 | } |
147 | 147 | return $items; |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $theadItems .= '<tr>'; |
63 | 63 | if (Obj::isArray($elements['thead']['titles']) && count($elements['thead']['titles']) > 0) { |
64 | 64 | foreach ($elements['thead']['titles'] as $order => $title) { |
65 | - if ($selectOptions !== false && $order+1 === $selectOptions['attachOrder']) { |
|
65 | + if ($selectOptions !== false && $order + 1 === $selectOptions['attachOrder']) { |
|
66 | 66 | $title['text'] = self::buildSingleTag('input', ['type' => 'checkbox', 'name' => 'selectAll']) . ' ' . $title['text']; |
67 | 67 | $title['html'] = true; |
68 | 68 | } |