Skip to content

Commit 0f384b0

Browse files
authored
Merge pull request #32 from yajra/fix31
Fix phpstan
2 parents 6bc04d9 + de4c1a4 commit 0f384b0

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"require-dev": {
2727
"maatwebsite/excel": "^3.1.40",
28-
"nunomaduro/larastan": "^1.0|^2.1",
28+
"nunomaduro/larastan": "^1.0|2.1.12",
2929
"orchestra/testbench": "6.*|^7.3"
3030
},
3131
"autoload": {

phpstan.neon.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ parameters:
1010

1111
ignoreErrors:
1212
- '#Parameter \#1 \$callback of method Illuminate\\Container\\Container::call\(\) expects \(callable\(\): mixed\)\|string*#'
13+
- '#Parameter \#2 \$needles of static method Illuminate\\Support\\Str::endsWith*#'
14+
- '#Parameter \#2 \$needles of static method Illuminate\\Support\\Str::contains*#'
1315

1416
excludePaths:
1517
- tests

src/ExportServiceProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ public function boot(): void
1616

1717
$this->publishAssets();
1818

19-
Livewire::component('export-button', ExportButtonComponent::class);
19+
if (! $this->app->runningInConsole()) {
20+
Livewire::component('export-button', ExportButtonComponent::class);
21+
}
2022
}
2123

2224
protected function publishAssets(): void

src/Jobs/DataTableExportJob.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public function handle()
142142
$property = $property['_'] ?? $column->name;
143143
}
144144

145+
/** @var array|bool|int|string|null $value */
145146
$value = $row[$property] ?? '';
146147

147148
if (is_array($value)) {

0 commit comments

Comments
 (0)