Skip to content

Commit a82a21c

Browse files
committed
update stan
1 parent cb231b8 commit a82a21c

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.phive/phars.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="phpstan" version="1.10.14" installed="1.10.14" location="./tools/phpstan" copy="false"/>
4-
<phar name="psalm" version="5.10.0" installed="5.10.0" location="./tools/psalm" copy="false"/>
3+
<phar name="phpstan" version="1.10.22" installed="1.10.22" location="./tools/phpstan" copy="false"/>
4+
<phar name="psalm" version="5.13.1" installed="5.13.1" location="./tools/psalm" copy="false"/>
55
</phive>

src/DebugMemory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ public static function record(?string $message = null): bool
6262
$memoryUse = self::getCurrent();
6363
if (!$message) {
6464
$trace = debug_backtrace();
65-
$message = Debugger::trimPath($trace[0]['file']) . ' line ' . $trace[0]['line'];
65+
$file = $trace[0]['file'] ?? 'unknown file';
66+
$line = $trace[0]['line'] ?? 'unknown line';
67+
$message = Debugger::trimPath($file) . ' line ' . $line;
6668
}
6769
if (isset(self::$_points[$message])) {
6870
$originalMessage = $message;

src/DebugTimer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ public static function start(?string $name = null, ?string $message = null): boo
4343
if (!$name) {
4444
$named = false;
4545
$calledFrom = debug_backtrace();
46-
$name = Debugger::trimPath($calledFrom[0]['file']) . ' line ' . $calledFrom[0]['line'];
46+
$file = $calledFrom[0]['file'] ?? 'unknown file';
47+
$line = $calledFrom[0]['line'] ?? 'unknown line';
48+
$name = Debugger::trimPath($file) . ' line ' . $line;
4749
} else {
4850
$named = true;
4951
}

0 commit comments

Comments
 (0)