From d23067e74e4969a96ee81ee19671004f7bee7d24 Mon Sep 17 00:00:00 2001 From: Arthur LORENT Date: Thu, 9 May 2019 11:19:43 +0200 Subject: [PATCH] fixed scrutinizer issues --- CHANGELOG.md | 7 +++++++ src/Table.php | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a374cb22..fe5ee860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.12](https://github.com/Okipa/laravel-table/releases/tag/1.0.12) + +2019-05-09 + +- Locked project compatibility to Laravel 5.5+ and PHP7.2+ to avoid issues. +- Improved code phpdoc for better maintainability. + ## [1.0.11](https://github.com/Okipa/laravel-table/releases/tag/1.0.11) 2019-05-06 diff --git a/src/Table.php b/src/Table.php index 22e65fdb..e5bc8aea 100644 --- a/src/Table.php +++ b/src/Table.php @@ -400,7 +400,7 @@ public function destroyConfirmationHtmlAttributes(Closure $destroyConfirmationCl */ public function navigationStatus(): string { - return __('laravel-table::laravel-table.navigation', [ + return (string) __('laravel-table::laravel-table.navigation', [ 'start' => ($this->list->perPage() * ($this->list->currentPage() - 1)) + 1, 'stop' => $this->list->count() + (($this->list->currentPage() - 1) * $this->list->perPage()), 'total' => (int) $this->list->total(), @@ -559,7 +559,7 @@ protected function applySortClauses(Builder $query): void */ protected function paginateList(Builder $query): void { - $this->list = $query->paginate((int) $this->rows ?: $query->count()); + $this->list = $query->paginate($this->rows ?: (int) $query->count()); $this->list->appends(array_merge([ 'rows' => $this->rows, 'search' => $this->search,