@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | /** |
| 186 | 186 | * Set icon |
| 187 | 187 | * @param string|callable $icon |
| 188 | - * @return static|callable |
|
| 188 | + * @return Action |
|
| 189 | 189 | * @throws DataGridException |
| 190 | 190 | */ |
| 191 | 191 | public function setIcon($icon) |
@@ -270,7 +270,8 @@ discard block |
||
| 270 | 270 | |
| 271 | 271 | /** |
| 272 | 272 | * Check whether given property is string or callable |
| 273 | - * @param mixed $property |
|
| 273 | + * @param callable $property |
|
| 274 | + * @param string $name |
|
| 274 | 275 | * @return void |
| 275 | 276 | * @throws DataGridException |
| 276 | 277 | */ |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | |
| 49 | 49 | $this->key = $key; |
| 50 | 50 | |
| 51 | - $this->setTemplate(__DIR__ . '/../templates/column_status.latte'); |
|
| 51 | + $this->setTemplate(__DIR__.'/../templates/column_status.latte'); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | |
@@ -219,7 +219,7 @@ |
||
| 219 | 219 | /** |
| 220 | 220 | * @param string $key |
| 221 | 221 | * @param Column\Column $column |
| 222 | - * @return void |
|
| 222 | + * @return Column\Column |
|
| 223 | 223 | */ |
| 224 | 224 | public function applyColumnCallback($key, Column\Column $column) |
| 225 | 225 | { |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | $element = $a; |
| 109 | 109 | |
| 110 | 110 | if ($this->icon) { |
| 111 | - $a->addHtml(Html::el('span')->class(DataGrid::$icon_prefix . $this->icon)); |
|
| 111 | + $a->addHtml(Html::el('span')->class(DataGrid::$icon_prefix.$this->icon)); |
|
| 112 | 112 | |
| 113 | 113 | if (strlen($value)) { |
| 114 | 114 | $a->addHtml(' '); |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | |
| 93 | 93 | /** |
| 94 | 94 | * Get filter key |
| 95 | - * @return mixed |
|
| 95 | + * @return string |
|
| 96 | 96 | */ |
| 97 | 97 | public function getKey() |
| 98 | 98 | { |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $this->grid = $grid; |
| 49 | 49 | $this->name = $name; |
| 50 | 50 | |
| 51 | - $this->setTemplate(__DIR__ . '/../templates/column_multi_action.latte'); |
|
| 51 | + $this->setTemplate(__DIR__.'/../templates/column_multi_action.latte'); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | if ($this->getClass()) { |
| 82 | - $button->class($this->getClass() . ' dropdown-toggle'); |
|
| 82 | + $button->class($this->getClass().' dropdown-toggle'); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | return $button; |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | { |
| 40 | 40 | parent::__construct($grid, $key, $name, $options, $column); |
| 41 | 41 | |
| 42 | - $this->addAttribute('data-selected-icon-check', DataGrid::$icon_prefix . 'check'); |
|
| 42 | + $this->addAttribute('data-selected-icon-check', DataGrid::$icon_prefix.'check'); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | /** |
| 108 | 108 | * Render row item into template |
| 109 | 109 | * @param Row $row |
| 110 | - * @return mixed |
|
| 110 | + * @return string |
|
| 111 | 111 | */ |
| 112 | 112 | public function render(Row $row) |
| 113 | 113 | { |
@@ -490,7 +490,7 @@ discard block |
||
| 490 | 490 | |
| 491 | 491 | |
| 492 | 492 | /** |
| 493 | - * @return bool |
|
| 493 | + * @return boolean|null |
|
| 494 | 494 | */ |
| 495 | 495 | public function hasSortNext() |
| 496 | 496 | { |
@@ -12,7 +12,6 @@ |
||
| 12 | 12 | use Ublaboo; |
| 13 | 13 | use Ublaboo\DataGrid\DataGrid; |
| 14 | 14 | use Ublaboo\DataGrid\Exception\DataGridColumnRendererException; |
| 15 | -use Ublaboo\DataGrid\Exception\DataGridException; |
|
| 16 | 15 | use Ublaboo\DataGrid\Row; |
| 17 | 16 | use Ublaboo\DataGrid\Traits; |
| 18 | 17 | |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | - * @return bool |
|
| 52 | + * @return integer |
|
| 53 | 53 | */ |
| 54 | 54 | public function getFilterDataType() |
| 55 | 55 | { |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | if ($dataSource instanceof QueryBuilder) { |
| 75 | 75 | $column = Strings::contains($this->column, '.') |
| 76 | 76 | ? $this->column |
| 77 | - : current($dataSource->getRootAliases()) . '.' . $this->column; |
|
| 77 | + : current($dataSource->getRootAliases()).'.'.$this->column; |
|
| 78 | 78 | |
| 79 | 79 | $this->result = $dataSource |
| 80 | 80 | ->select(sprintf('SUM(%s)', $column)) |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | if ($dataSource instanceof Collection) { |
| 86 | - $dataSource->forAll(function ($key, $value) { |
|
| 86 | + $dataSource->forAll(function($key, $value) { |
|
| 87 | 87 | $this->result += PropertyAccessHelper::getValue($value, $this->column); |
| 88 | 88 | return true; |
| 89 | 89 | }); |