Skip to content

Commit

Permalink
Minor updates (#308)
Browse files Browse the repository at this point in the history
* Adding PHP 7.4 to travis ci

* Replacing `strtolower()` with `Str::lower()`

* Bump version
  • Loading branch information
arcanedev-maroc authored Oct 22, 2019
1 parent f1d5f22 commit 451dbec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ language: php
php:
- 7.2
- 7.3
- 7.4snapshot
- nightly

matrix:
allow_failures:
- php: 7.4snapshot
- php: nightly

before_script:
Expand All @@ -19,5 +21,5 @@ script:
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

after_script:
- if [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
- if [ "$TRAVIS_PHP_VERSION" != "7.4snapshot" ] && [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" != "7.4snapshot" ] && [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
6 changes: 4 additions & 2 deletions src/Http/Controllers/LogViewerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,13 @@ public function search(Request $request, $date, $level = 'all')

$log = $this->getLogOrFail($date);
$levels = $this->logViewer->levelsNames();
$needles = array_map('strtolower', array_filter(explode(' ', $query)));
$needles = array_map(function ($needle) {
return Str::lower($needle);
}, array_filter(explode(' ', $query)));
$entries = $log->entries($level)
->unless(empty($needles), function (LogEntryCollection $entries) use ($needles) {
return $entries->filter(function (LogEntry $entry) use ($needles) {
return Str::containsAll(strtolower($entry->header), $needles);
return Str::containsAll(Str::lower($entry->header), $needles);
});
})
->paginate($this->perPage);
Expand Down
2 changes: 1 addition & 1 deletion src/LogViewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class LogViewer implements LogViewerContract
/**
* LogViewer Version
*/
const VERSION = '5.1.5';
const VERSION = '5.1.6';

/* -----------------------------------------------------------------
| Properties
Expand Down

0 comments on commit 451dbec

Please sign in to comment.