Skip to content

Commit 8969b81

Browse files
committed
Minor tweak for phpstan and pathinfo return array
1 parent 5f644c0 commit 8969b81

File tree

2 files changed

+38
-42
lines changed

2 files changed

+38
-42
lines changed

composer.lock

Lines changed: 37 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/PhpSpreadsheet/Helper/Sample.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function getSamples()
8585
foreach ($regex as $file) {
8686
$file = str_replace(str_replace('\\', '/', $baseDir) . '/', '', str_replace('\\', '/', $file[0]));
8787
$info = pathinfo($file);
88-
$category = str_replace('_', ' ', $info['dirname']);
88+
$category = str_replace('_', ' ', $info['dirname'] ?? '');
8989
$name = str_replace('_', ' ', (string) preg_replace('/(|\.php)/', '', $info['filename']));
9090
if (!in_array($category, ['.', 'boostrap', 'templates'])) {
9191
if (!isset($files[$category])) {

0 commit comments

Comments
 (0)