Skip to content

Commit 9167a94

Browse files
committed
Fixes from static analysis
1 parent c8e5169 commit 9167a94

File tree

4 files changed

+115
-90
lines changed

4 files changed

+115
-90
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
},
1515
"require-dev": {
1616
"orchestra/testbench": "^7.0|^8.0",
17+
"phpstan/phpstan": "^1.10",
1718
"phpunit/phpunit": "^9.3"
1819
},
1920
"support": {

phpstan.neon

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
parameters:
2+
3+
paths:
4+
- src
5+
6+
# The level 9 is the highest level
7+
level: 6

src/BladeDirectiveServiceProvider.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,17 @@
22

33
namespace HnhDigital\LaravelHtmlGenerator;
44

5-
use Blade;
5+
use Illuminate\Support\Facades\Blade;
66
use Illuminate\Support\ServiceProvider;
77

88
class BladeDirectiveServiceProvider extends ServiceProvider
99
{
1010
/**
1111
* Bootstrap any application services.
12-
*
13-
* @return void
1412
*/
15-
public function boot()
13+
public function boot(): void
1614
{
17-
blade::directive('icon', function ($icon) {
15+
Blade::directive('icon', function ($icon) {
1816
$icon = trim($icon, "'\"");
1917

2018
if (substr($icon, 0, 1) !== '$') {
@@ -24,17 +22,15 @@ public function boot()
2422
return "<?= (string)Html::icon($icon); ?>";
2523
});
2624

27-
blade::directive('html', function ($html) {
25+
Blade::directive('html', function ($html) {
2826
return "<?= (string)Html::$html; ?>";
2927
});
3028
}
3129

3230
/**
3331
* Register any application services.
34-
*
35-
* @return void
3632
*/
37-
public function register()
33+
public function register(): void
3834
{
3935
//
4036
}

0 commit comments

Comments
 (0)