@@ -280,8 +280,6 @@ discard block |
||
280 | 280 | /** |
281 | 281 | * Sets the width attribute of each column in the array. |
282 | 282 | * |
283 | - * @param array $value An Array of column widths in the order of the keys in the |
|
284 | - * source table array. |
|
285 | 283 | */ |
286 | 284 | public function setColumnWidths($widthArray) |
287 | 285 | { |
@@ -291,7 +289,6 @@ discard block |
||
291 | 289 | /** |
292 | 290 | * An optional array of values that can be preselected when using |
293 | 291 | * |
294 | - * @param array $value Indicates the INPUT form element type attribute. |
|
295 | 292 | */ |
296 | 293 | public function setSelectedValues($valueArray) |
297 | 294 | { |
@@ -328,7 +325,7 @@ discard block |
||
328 | 325 | /** |
329 | 326 | * Determines what class the current row should have applied. |
330 | 327 | * |
331 | - * @param int $value The position of the current row being rendered. |
|
328 | + * @param integer $position |
|
332 | 329 | * @return string |
333 | 330 | */ |
334 | 331 | public function determineRowClass($position) |
@@ -355,7 +352,6 @@ discard block |
||
355 | 352 | * Generates an onclick action applied to the current cell, to execute |
356 | 353 | * any specified cell actions. |
357 | 354 | * |
358 | - * @param string $value Indicates the INPUT form element type attribute. |
|
359 | 355 | * @return string |
360 | 356 | */ |
361 | 357 | public function getCellAction($currentActionFieldValue) |
@@ -397,7 +393,7 @@ discard block |
||
397 | 393 | /** |
398 | 394 | * Function to prepare a link generated in the table cell/link actions. |
399 | 395 | * |
400 | - * @param string $value Indicates the INPUT form element type attribute. |
|
396 | + * @param string $link |
|
401 | 397 | * @return string |
402 | 398 | */ |
403 | 399 | public function prepareLink($link) |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | */ |
133 | 133 | public function setTableWidth($value) |
134 | 134 | { |
135 | - $this->tableWidth = (int)$value; |
|
135 | + $this->tableWidth = (int) $value; |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
@@ -318,8 +318,8 @@ discard block |
||
318 | 318 | public function getColumnWidth($columnPosition) |
319 | 319 | { |
320 | 320 | $currentWidth = ''; |
321 | - if (is_array($this->columnWidths) && ! empty($this->columnWidths[$columnPosition])) { |
|
322 | - $currentWidth = ' width="' . $this->columnWidths[$columnPosition] . '" '; |
|
321 | + if (is_array($this->columnWidths) && !empty($this->columnWidths[$columnPosition])) { |
|
322 | + $currentWidth = ' width="'.$this->columnWidths[$columnPosition].'" '; |
|
323 | 323 | } |
324 | 324 | |
325 | 325 | return $currentWidth; |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | $currentClass = $this->rowAlternateClass; |
349 | 349 | } |
350 | 350 | |
351 | - return ' class="' . $currentClass . '"'; |
|
351 | + return ' class="'.$currentClass.'"'; |
|
352 | 352 | } |
353 | 353 | |
354 | 354 | /** |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | { |
363 | 363 | $cellAction = ''; |
364 | 364 | if ($this->cellAction) { |
365 | - $cellAction = ' onClick="javascript:window.location=\'' . $this->cellAction . $this->actionField . '=' . urlencode($currentActionFieldValue) . '\'" '; |
|
365 | + $cellAction = ' onClick="javascript:window.location=\''.$this->cellAction.$this->actionField.'='.urlencode($currentActionFieldValue).'\'" '; |
|
366 | 366 | } |
367 | 367 | |
368 | 368 | return $cellAction; |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | { |
380 | 380 | $cell = $value; |
381 | 381 | if ($this->linkAction) { |
382 | - $cell = '<a href="' . $this->linkAction . $this->actionField . '=' . urlencode($currentActionFieldValue) . '">' . $cell . '</a>'; |
|
382 | + $cell = '<a href="'.$this->linkAction.$this->actionField.'='.urlencode($currentActionFieldValue).'">'.$cell.'</a>'; |
|
383 | 383 | } |
384 | 384 | |
385 | 385 | return $cell; |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | $end = '?'; |
409 | 409 | } |
410 | 410 | |
411 | - return $link . $end; |
|
411 | + return $link.$end; |
|
412 | 412 | } |
413 | 413 | |
414 | 414 | /** |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | if (is_array($fieldsArray)) { |
431 | 431 | $i = 0; |
432 | 432 | foreach ($fieldsArray as $fieldName => $fieldValue) { |
433 | - $table .= "\t<tr" . $this->determineRowClass($i) . ">\n"; |
|
433 | + $table .= "\t<tr".$this->determineRowClass($i).">\n"; |
|
434 | 434 | $currentActionFieldValue = get_by_key($fieldValue, $this->actionField, ''); |
435 | 435 | if (is_array($this->selectedValues)) { |
436 | 436 | $isChecked = array_search($currentActionFieldValue, $this->selectedValues) === false ? 0 : 1; |
@@ -441,15 +441,15 @@ discard block |
||
441 | 441 | $colPosition = 0; |
442 | 442 | foreach ($fieldValue as $key => $value) { |
443 | 443 | if (!in_array($key, $this->excludeFields)) { |
444 | - $table .= "\t\t<td" . $this->getCellAction($currentActionFieldValue) . ">"; |
|
444 | + $table .= "\t\t<td".$this->getCellAction($currentActionFieldValue).">"; |
|
445 | 445 | $table .= $this->createCellText($currentActionFieldValue, $value); |
446 | 446 | $table .= "</td>\n"; |
447 | 447 | if ($i == 0) { |
448 | 448 | if (empty ($header) && $this->formElementType) { |
449 | - $header .= "\t\t<th style=\"width:32px\" " . ($this->thClass ? 'class="' . $this->thClass . '"' : '') . ">" . ($this->allOption ? '<a href="javascript:clickAll()">all</a>' : '') . "</th>\n"; |
|
449 | + $header .= "\t\t<th style=\"width:32px\" ".($this->thClass ? 'class="'.$this->thClass.'"' : '').">".($this->allOption ? '<a href="javascript:clickAll()">all</a>' : '')."</th>\n"; |
|
450 | 450 | } |
451 | 451 | $headerText = array_key_exists($key, $fieldHeadersArray) ? $fieldHeadersArray[$key] : $key; |
452 | - $header .= "\t\t<th" . $this->getColumnWidth($colPosition) . ($this->thClass ? ' class="' . $this->thClass . '" ' : '') . ">" . $headerText . "</th>\n"; |
|
452 | + $header .= "\t\t<th".$this->getColumnWidth($colPosition).($this->thClass ? ' class="'.$this->thClass.'" ' : '').">".$headerText."</th>\n"; |
|
453 | 453 | } |
454 | 454 | $colPosition++; |
455 | 455 | } |
@@ -457,9 +457,9 @@ discard block |
||
457 | 457 | $i++; |
458 | 458 | $table .= "\t</tr>\n"; |
459 | 459 | } |
460 | - $table = "\n" . '<table' . ($this->tableWidth > 0 ? ' width="' . $this->tableWidth . '"' : '') . ($this->tableClass ? ' class="' . $this->tableClass . '"' : '') . ($this->tableID ? ' id="' . $this->tableID . '"' : '') . ">\n" . ($header ? "\t<thead>\n\t<tr class=\"" . $this->rowHeaderClass . "\">\n" . $header . "\t</tr>\n\t</thead>\n" : '') . $table . "</table>\n"; |
|
460 | + $table = "\n".'<table'.($this->tableWidth > 0 ? ' width="'.$this->tableWidth.'"' : '').($this->tableClass ? ' class="'.$this->tableClass.'"' : '').($this->tableID ? ' id="'.$this->tableID.'"' : '').">\n".($header ? "\t<thead>\n\t<tr class=\"".$this->rowHeaderClass."\">\n".$header."\t</tr>\n\t</thead>\n" : '').$table."</table>\n"; |
|
461 | 461 | if ($this->formElementType) { |
462 | - $table = "\n" . '<form id="' . $this->formName . '" name="' . $this->formName . '" action="' . $this->formAction . '" method="POST">' . $table; |
|
462 | + $table = "\n".'<form id="'.$this->formName.'" name="'.$this->formName.'" action="'.$this->formAction.'" method="POST">'.$table; |
|
463 | 463 | } |
464 | 464 | if (strlen($this->pageNav) > 1) {//changed to display the pagination if exists. |
465 | 465 | /* commented this part because of cookie |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | |
474 | 474 | $table .= '</select>'.$_lang["pagination_table_perpage"].'</div>'; |
475 | 475 | */ |
476 | - $table .= '<div id="pagination" class="paginate">' . $_lang["pagination_table_gotopage"] . '<ul>' . $this->pageNav . '</ul></div>'; |
|
476 | + $table .= '<div id="pagination" class="paginate">'.$_lang["pagination_table_gotopage"].'<ul>'.$this->pageNav.'</ul></div>'; |
|
477 | 477 | //$table .= '<script language="javascript">function updatePageSize(size){window.location = \''.$this->prepareLink($linkpage).'pageSize=\'+size;}</script>'; |
478 | 478 | |
479 | 479 | } |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | <script language="javascript"> |
483 | 483 | toggled = 0; |
484 | 484 | function clickAll() { |
485 | - myform = document.getElementById("' . $this->formName . '"); |
|
485 | + myform = document.getElementById("' . $this->formName.'"); |
|
486 | 486 | for(i=0;i<myform.length;i++) { |
487 | 487 | if(myform.elements[i].type==\'checkbox\') { |
488 | 488 | myform.elements[i].checked=(toggled?false:true); |
@@ -494,9 +494,9 @@ discard block |
||
494 | 494 | } |
495 | 495 | if ($this->formElementType) { |
496 | 496 | if ($this->extra) { |
497 | - $table .= "\n" . $this->extra . "\n"; |
|
497 | + $table .= "\n".$this->extra."\n"; |
|
498 | 498 | } |
499 | - $table .= "\n" . '</form>' . "\n"; |
|
499 | + $table .= "\n".'</form>'."\n"; |
|
500 | 500 | } |
501 | 501 | |
502 | 502 | return $table; |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | $numPages = ceil($numRecords / MAX_DISPLAY_RECORDS_NUM); |
520 | 520 | $nav = ''; |
521 | 521 | if ($numPages > 1) { |
522 | - $currentURL = empty($qs) ? '' : '?' . $qs; |
|
522 | + $currentURL = empty($qs) ? '' : '?'.$qs; |
|
523 | 523 | if ($currentPage > 6) { |
524 | 524 | $nav .= $this->createPageLink($currentURL, 1, $_lang["pagination_table_first"]); |
525 | 525 | } |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | $nav .= $this->createPageLink($currentURL, $numPages, $_lang["pagination_table_last"]); |
545 | 545 | } |
546 | 546 | } |
547 | - $this->pageNav = ' ' . $nav; |
|
547 | + $this->pageNav = ' '.$nav; |
|
548 | 548 | } |
549 | 549 | |
550 | 550 | /** |
@@ -560,14 +560,14 @@ discard block |
||
560 | 560 | public function createPageLink($link = '', $pageNum, $displayText, $currentPage = false, $qs = '') |
561 | 561 | { |
562 | 562 | $modx = evolutionCMS(); |
563 | - $orderBy = !empty($_GET['orderby']) ? '&orderby=' . $_GET['orderby'] : ''; |
|
564 | - $orderDir = !empty($_GET['orderdir']) ? '&orderdir=' . $_GET['orderdir'] : ''; |
|
563 | + $orderBy = !empty($_GET['orderby']) ? '&orderby='.$_GET['orderby'] : ''; |
|
564 | + $orderDir = !empty($_GET['orderdir']) ? '&orderdir='.$_GET['orderdir'] : ''; |
|
565 | 565 | if (!empty($qs)) { |
566 | 566 | $qs = "?$qs"; |
567 | 567 | } |
568 | 568 | $link = empty($link) ? $modx->makeUrl($modx->documentIdentifier, $modx->documentObject['alias'], |
569 | - $qs . "page=$pageNum$orderBy$orderDir") : $this->prepareLink($link) . "page=$pageNum"; |
|
570 | - $nav = '<li' . ($currentPage ? ' class="currentPage"' : '') . '><a' . ($currentPage ? ' class="currentPage"' : '') . ' href="' . $link . '">' . $displayText . '</a></li>' . "\n"; |
|
569 | + $qs."page=$pageNum$orderBy$orderDir") : $this->prepareLink($link)."page=$pageNum"; |
|
570 | + $nav = '<li'.($currentPage ? ' class="currentPage"' : '').'><a'.($currentPage ? ' class="currentPage"' : '').' href="'.$link.'">'.$displayText.'</a></li>'."\n"; |
|
571 | 571 | |
572 | 572 | return $nav; |
573 | 573 | } |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | $field = ''; |
586 | 586 | if ($this->formElementType) { |
587 | 587 | $checked = $isChecked ? "checked " : ""; |
588 | - $field = "\t\t" . '<td><input type="' . $this->formElementType . '" name="' . ($this->formElementName ? $this->formElementName : $value) . '" value="' . $value . '" ' . $checked . '/></td>' . "\n"; |
|
588 | + $field = "\t\t".'<td><input type="'.$this->formElementType.'" name="'.($this->formElementName ? $this->formElementName : $value).'" value="'.$value.'" '.$checked.'/></td>'."\n"; |
|
589 | 589 | } |
590 | 590 | |
591 | 591 | return $field; |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | public function handlePaging() |
600 | 600 | { |
601 | 601 | $offset = (is_numeric($_GET['page']) && $_GET['page'] > 0) ? $_GET['page'] - 1 : 0; |
602 | - $limitClause = ' LIMIT ' . ($offset * MAX_DISPLAY_RECORDS_NUM) . ', ' . MAX_DISPLAY_RECORDS_NUM; |
|
602 | + $limitClause = ' LIMIT '.($offset * MAX_DISPLAY_RECORDS_NUM).', '.MAX_DISPLAY_RECORDS_NUM; |
|
603 | 603 | |
604 | 604 | return $limitClause; |
605 | 605 | } |
@@ -614,10 +614,10 @@ discard block |
||
614 | 614 | public function handleSorting($natural_order = false) |
615 | 615 | { |
616 | 616 | $orderByClause = ''; |
617 | - if ((bool)$natural_order === false) { |
|
617 | + if ((bool) $natural_order === false) { |
|
618 | 618 | $orderby = !empty($_GET['orderby']) ? $_GET['orderby'] : "id"; |
619 | 619 | $orderdir = !empty($_GET['orderdir']) ? $_GET['orderdir'] : "DESC"; |
620 | - $orderByClause = !empty($orderby) ? ' ORDER BY ' . $orderby . ' ' . $orderdir . ' ' : ""; |
|
620 | + $orderByClause = !empty($orderby) ? ' ORDER BY '.$orderby.' '.$orderdir.' ' : ""; |
|
621 | 621 | } |
622 | 622 | |
623 | 623 | return $orderByClause; |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | } |
647 | 647 | } |
648 | 648 | |
649 | - return '<a href="[~' . $modx->documentIdentifier . '~]?' . $qs . 'orderby=' . $key . $orderDir . '">' . $text . '</a>'; |
|
649 | + return '<a href="[~'.$modx->documentIdentifier.'~]?'.$qs.'orderby='.$key.$orderDir.'">'.$text.'</a>'; |
|
650 | 650 | } |
651 | 651 | |
652 | 652 | } |
@@ -457,7 +457,8 @@ |
||
457 | 457 | if ($this->formElementType) { |
458 | 458 | $table = "\n" . '<form id="' . $this->formName . '" name="' . $this->formName . '" action="' . $this->formAction . '" method="POST">' . $table; |
459 | 459 | } |
460 | - if (strlen($this->pageNav) > 1) {//changed to display the pagination if exists. |
|
460 | + if (strlen($this->pageNav) > 1) { |
|
461 | +//changed to display the pagination if exists. |
|
461 | 462 | /* commented this part because of cookie |
462 | 463 | $table .= '<div id="max-display-records" ><select style="display:inline" onchange="javascript:updatePageSize(this[this.selectedIndex].value);">'; |
463 | 464 | $pageSizes= array (10, 25, 50, 100, 250); |
@@ -149,7 +149,7 @@ |
||
149 | 149 | /** |
150 | 150 | * This function returns the current page number. |
151 | 151 | * |
152 | - * @return int |
|
152 | + * @return string |
|
153 | 153 | */ |
154 | 154 | public function getCurrentPage() |
155 | 155 | { |
@@ -101,14 +101,14 @@ discard block |
||
101 | 101 | $array_paging['total'] = $this->int_nbr_row; |
102 | 102 | |
103 | 103 | if ($this->int_cur_position != 0) { |
104 | - $array_paging['first_link'] = "<a href=\"$PHP_SELF?int_cur_position=0" . $this->str_ext_argv . "\">"; |
|
105 | - $array_paging['previous_link'] = "<a href=\"$PHP_SELF?int_cur_position=" . ($this->int_cur_position - $this->int_num_result) . $this->str_ext_argv . "\">"; |
|
104 | + $array_paging['first_link'] = "<a href=\"$PHP_SELF?int_cur_position=0".$this->str_ext_argv."\">"; |
|
105 | + $array_paging['previous_link'] = "<a href=\"$PHP_SELF?int_cur_position=".($this->int_cur_position - $this->int_num_result).$this->str_ext_argv."\">"; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | if (($this->int_nbr_row - $this->int_cur_position) > $this->int_num_result) { |
109 | 109 | $int_new_position = $this->int_cur_position + $this->int_num_result; |
110 | - $array_paging['last_link'] = "<a href=\"$PHP_SELF?int_cur_position=" . $this->int_nbr_row . $this->str_ext_argv . "\">"; |
|
111 | - $array_paging['next_link'] = "<a href=\"$PHP_SELF?int_cur_position=$int_new_position" . $this->str_ext_argv . "\">"; |
|
110 | + $array_paging['last_link'] = "<a href=\"$PHP_SELF?int_cur_position=".$this->int_nbr_row.$this->str_ext_argv."\">"; |
|
111 | + $array_paging['next_link'] = "<a href=\"$PHP_SELF?int_cur_position=$int_new_position".$this->str_ext_argv."\">"; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | return $array_paging; |
@@ -126,10 +126,10 @@ discard block |
||
126 | 126 | for ($i = 0; $i < $this->getNumberOfPage(); $i++) { |
127 | 127 | // if current page, do not make a link |
128 | 128 | if ($i == $this->getCurrentPage()) { |
129 | - $array_all_page[$i] = "<b>" . ($i + 1) . "</b> "; |
|
129 | + $array_all_page[$i] = "<b>".($i + 1)."</b> "; |
|
130 | 130 | } else { |
131 | 131 | $int_new_position = ($i * $this->int_num_result); |
132 | - $array_all_page[$i] = "<a href=\"" . $PHP_SELF . "?int_cur_position=$int_new_position$this->str_ext_argv\">" . ($i + 1) . "</a> "; |
|
132 | + $array_all_page[$i] = "<a href=\"".$PHP_SELF."?int_cur_position=$int_new_position$this->str_ext_argv\">".($i + 1)."</a> "; |
|
133 | 133 | } |
134 | 134 | } |
135 | 135 |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php namespace EvolutionCMS\Tracy\Panels; |
2 | 2 | |
3 | +use EvolutionCMS\Interfaces\CoreInterface; |
|
3 | 4 | use EvolutionCMS\Interfaces\TracyPanel; |
5 | +use EvolutionCMS\Tracy\Template; |
|
4 | 6 | use Tracy\Helpers; |
5 | 7 | use Tracy\IBarPanel; |
6 | -use EvolutionCMS\Tracy\Template; |
|
7 | -use EvolutionCMS\Interfaces\CoreInterface; |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * @see: https://github.com/recca0120/laravel-tracy |
@@ -129,7 +129,7 @@ |
||
129 | 129 | } |
130 | 130 | |
131 | 131 | $class_info = new \ReflectionClass($this); |
132 | - return $this->viewPath = dirname($class_info->getFileName()) . '/assets/'; |
|
132 | + return $this->viewPath = dirname($class_info->getFileName()).'/assets/'; |
|
133 | 133 | } |
134 | 134 | /** |
135 | 135 | * getAttributes. |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php namespace EvolutionCMS\Tracy\Panels\Database; |
2 | 2 | |
3 | -use PDO; |
|
3 | +use EvolutionCMS\Support\Formatter\SqlFormatter; |
|
4 | +use EvolutionCMS\Tracy\Panels\AbstractPanel; |
|
4 | 5 | use Exception; |
5 | 6 | use Illuminate\Database\Events\QueryExecuted; |
6 | -use EvolutionCMS\Tracy\Panels\AbstractPanel; |
|
7 | -use EvolutionCMS\Support\Formatter\SqlFormatter; |
|
7 | +use PDO; |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * @see: https://github.com/recca0120/laravel-tracy |
@@ -70,7 +70,7 @@ |
||
70 | 70 | protected function subscribe() |
71 | 71 | { |
72 | 72 | $events = $this->evolution['events']; |
73 | - $events->listen(QueryExecuted::class, function ($event) { |
|
73 | + $events->listen(QueryExecuted::class, function($event){ |
|
74 | 74 | $this->logQuery( |
75 | 75 | $event->sql, |
76 | 76 | $event->bindings, |
@@ -70,7 +70,7 @@ |
||
70 | 70 | protected function subscribe() |
71 | 71 | { |
72 | 72 | $events = $this->evolution['events']; |
73 | - $events->listen(QueryExecuted::class, function ($event) { |
|
73 | + $events->listen(QueryExecuted::class, function ($event){ |
|
74 | 74 | $this->logQuery( |
75 | 75 | $event->sql, |
76 | 76 | $event->bindings, |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php namespace EvolutionCMS\Tracy\Panels\Event; |
2 | 2 | |
3 | -use Tracy\Debugger; |
|
4 | 3 | use EvolutionCMS\Tracy\Panels\AbstractPanel; |
4 | +use Tracy\Debugger; |
|
5 | 5 | |
6 | 6 | class Panel extends AbstractPanel |
7 | 7 | { |
@@ -45,7 +45,7 @@ |
||
45 | 45 | Debugger::timer($id); |
46 | 46 | $events = $this->evolution['events']; |
47 | 47 | |
48 | - $events->listen('evolution.*', function ($key, $payload) use ($id) { |
|
48 | + $events->listen('evolution.*', function($key, $payload) use ($id) { |
|
49 | 49 | $execTime = Debugger::timer($id); |
50 | 50 | $editorLink = static::editorLink(static::findSource()); |
51 | 51 | $this->totalTime += $execTime; |
@@ -45,7 +45,7 @@ |
||
45 | 45 | Debugger::timer($id); |
46 | 46 | $events = $this->evolution['events']; |
47 | 47 | |
48 | - $events->listen('evolution.*', function ($key, $payload) use ($id) { |
|
48 | + $events->listen('evolution.*', function ($key, $payload) use ($id){ |
|
49 | 49 | $execTime = Debugger::timer($id); |
50 | 50 | $editorLink = static::editorLink(static::findSource()); |
51 | 51 | $this->totalTime += $execTime; |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php namespace EvolutionCMS\Tracy\Panels\Routing; |
2 | 2 | |
3 | -use Illuminate\Support\Arr; |
|
4 | 3 | use EvolutionCMS\Tracy\Panels\AbstractPanel; |
4 | +use Illuminate\Support\Arr; |
|
5 | 5 | use ManagerTheme; |
6 | 6 | |
7 | 7 | class Panel extends AbstractPanel |
@@ -20,21 +20,21 @@ |
||
20 | 20 | if ($this->evolution->isBackend()) { |
21 | 21 | $action = Arr::get($_REQUEST, 'a'); |
22 | 22 | if ($action !== null) { |
23 | - $rows['route'] = 'action: ' . $action; |
|
23 | + $rows['route'] = 'action: '.$action; |
|
24 | 24 | } else { |
25 | 25 | $rows['route'] = 'n/a'; |
26 | 26 | } |
27 | 27 | |
28 | 28 | $controller = ManagerTheme::findController($action); |
29 | - if($controller !== null && ! \is_int($controller)) { |
|
29 | + if ($controller !== null && !\is_int($controller)) { |
|
30 | 30 | $rows['controller'] = $controller; |
31 | 31 | } |
32 | 32 | } else { |
33 | 33 | if (!empty($this->evolution->documentMethod) && !empty($this->evolution->documentIdentifier)) { |
34 | - $rows['route'] = $this->evolution->documentMethod . ' : ' . $this->evolution->documentIdentifier; |
|
34 | + $rows['route'] = $this->evolution->documentMethod.' : '.$this->evolution->documentIdentifier; |
|
35 | 35 | } |
36 | 36 | |
37 | - if (! empty($this->evolution->documentObject)) { |
|
37 | + if (!empty($this->evolution->documentObject)) { |
|
38 | 38 | $rows['document'] = $this->evolution->documentObject; |
39 | 39 | } |
40 | 40 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php namespace EvolutionCMS\Tracy\Panels\View; |
2 | 2 | |
3 | +use EvolutionCMS\Tracy\Panels\AbstractPanel; |
|
3 | 4 | use Illuminate\Support\Arr; |
4 | 5 | use Illuminate\Support\Collection; |
5 | -use EvolutionCMS\Tracy\Panels\AbstractPanel; |
|
6 | 6 | |
7 | 7 | class Panel extends AbstractPanel |
8 | 8 | { |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | protected function subscribe() |
25 | 25 | { |
26 | - $this->evolution['events']->listen('composing:*', function ($key, $payload) { |
|
26 | + $this->evolution['events']->listen('composing:*', function($key, $payload){ |
|
27 | 27 | $this->logView($payload[0]); |
28 | 28 | }); |
29 | 29 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | protected function subscribe() |
25 | 25 | { |
26 | - $this->evolution['events']->listen('composing:*', function ($key, $payload) { |
|
26 | + $this->evolution['events']->listen('composing:*', function ($key, $payload){ |
|
27 | 27 | $this->logView($payload[0]); |
28 | 28 | }); |
29 | 29 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php namespace EvolutionCMS\Traits\Models; |
2 | 2 | |
3 | -use Illuminate\Database\Eloquent\SoftDeletes as BaseSoftDeletes; |
|
4 | 3 | use EvolutionCMS\Shit\SoftDeletingScope; |
4 | +use Illuminate\Database\Eloquent\SoftDeletes as BaseSoftDeletes; |
|
5 | 5 | |
6 | 6 | trait SoftDeletes{ |
7 | 7 | use BaseSoftDeletes { |
@@ -3,7 +3,8 @@ |
||
3 | 3 | use Illuminate\Database\Eloquent\SoftDeletes as BaseSoftDeletes; |
4 | 4 | use EvolutionCMS\Shit\SoftDeletingScope; |
5 | 5 | |
6 | -trait SoftDeletes{ |
|
6 | +trait SoftDeletes |
|
7 | +{ |
|
7 | 8 | use BaseSoftDeletes { |
8 | 9 | bootSoftDeletes as baseBootSoftDeletes; |
9 | 10 | restore as baseRestore; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | ]; |
47 | 47 | |
48 | 48 | /** |
49 | - * @param $name |
|
49 | + * @param string $name |
|
50 | 50 | * @param $value |
51 | 51 | */ |
52 | 52 | public function setConfig($name, $value) |
@@ -161,6 +161,9 @@ discard block |
||
161 | 161 | } |
162 | 162 | } |
163 | 163 | |
164 | + /** |
|
165 | + * @param string $key |
|
166 | + */ |
|
164 | 167 | protected function getCastType($key) |
165 | 168 | { |
166 | 169 | return isset($this->casts[$key]) ? trim(strtolower($this->casts[$key])) : null; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | public function setConfig($name, $value) |
53 | 53 | { |
54 | 54 | $this['config'] |
55 | - ->set('cms.settings.' . $name, $value); |
|
55 | + ->set('cms.settings.'.$name, $value); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | $value = $this['config']->get( |
84 | - 'cms.settings.' . $name, |
|
84 | + 'cms.settings.'.$name, |
|
85 | 85 | $config |
86 | 86 | ); |
87 | 87 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | public function getFactorySettings() : array |
127 | 127 | { |
128 | - $out = include EVO_CORE_PATH . 'factory/settings.php'; |
|
128 | + $out = include EVO_CORE_PATH.'factory/settings.php'; |
|
129 | 129 | return \is_array($out) ? $out : []; |
130 | 130 | } |
131 | 131 |