Skip to content

Commit

Permalink
Merge pull request #957 from BrandonSurowiec/master
Browse files Browse the repository at this point in the history
Prefer Str:: class for Laravel 6 compatability.
  • Loading branch information
barryvdh authored Aug 22, 2019
2 parents bf19d93 + 3b2eb63 commit 8794e7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/DataCollector/RequestCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use DebugBar\DataCollector\DataCollector;
use DebugBar\DataCollector\DataCollectorInterface;
use DebugBar\DataCollector\Renderable;
use Illuminate\Support\Str;
use Laravel\Telescope\IncomingEntry;
use Laravel\Telescope\Telescope;
use Symfony\Component\HttpFoundation\Response;
Expand Down Expand Up @@ -115,8 +116,8 @@ public function collect()
}

foreach ($data['request_server'] as $key => $value) {
if (str_is('*_KEY', $key) || str_is('*_PASSWORD', $key)
|| str_is('*_SECRET', $key) || str_is('*_PW', $key)) {
if (Str::is('*_KEY', $key) || Str::is('*_PASSWORD', $key)
|| Str::is('*_SECRET', $key) || Str::is('*_PW', $key)) {
$data['request_server'][$key] = '******';
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/LaravelDebugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

use Illuminate\Contracts\Foundation\Application;
use Illuminate\Session\SessionManager;
use Illuminate\Support\Str;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

Expand Down Expand Up @@ -98,7 +99,7 @@ public function __construct($app = null)
}
$this->app = $app;
$this->version = $app->version();
$this->is_lumen = str_contains($this->version, 'Lumen');
$this->is_lumen = Str::contains($this->version, 'Lumen');
}

/**
Expand Down

0 comments on commit 8794e7a

Please sign in to comment.