Skip to content

Commit 53797ef

Browse files
committed
Leverage array_is_list(), get_debug_type(), is_countable(), is_iterable(), str_contains() and str_starts_with()
1 parent bbb636f commit 53797ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Resources/views/exception.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
$last = $exceptionAsArrayCount - 1;
3636
foreach ($exceptionAsArray as $i => $e) {
3737
foreach ($e['trace'] as $trace) {
38-
if ($trace['file'] && false === mb_strpos($trace['file'], '/vendor/') && false === mb_strpos($trace['file'], '/var/cache/') && $i < $last) {
38+
if ($trace['file'] && !str_contains($trace['file'], '/vendor/') && !str_contains($trace['file'], '/var/cache/') && $i < $last) {
3939
$exceptionWithUserCode[] = $i;
4040
}
4141
}

Resources/views/traces.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<?php
3232
$isFirstUserCode = true;
3333
foreach ($exception['trace'] as $i => $trace) {
34-
$isVendorTrace = $trace['file'] && (false !== mb_strpos($trace['file'], '/vendor/') || false !== mb_strpos($trace['file'], '/var/cache/'));
34+
$isVendorTrace = $trace['file'] && (str_contains($trace['file'], '/vendor/') || str_contains($trace['file'], '/var/cache/'));
3535
$displayCodeSnippet = $isFirstUserCode && !$isVendorTrace;
3636
if ($displayCodeSnippet) {
3737
$isFirstUserCode = false;

0 commit comments

Comments
 (0)