File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ includes:
4
4
- vendor/phpstan/phpstan-phpunit/rules.neon
5
5
parameters :
6
6
reportUnmatchedIgnoredErrors : true
7
- checkMissingIterableValueType : false
7
+ ignoreErrors :
8
+ - identifier : missingType.iterableValue
Original file line number Diff line number Diff line change @@ -6,5 +6,5 @@ includes:
6
6
parameters :
7
7
ignoreErrors :
8
8
- '#Cannot call method expectsOutput\ (\ ) on Illuminate\\Testing\\PendingCommand\|int. #'
9
+ - identifier : missingType.iterableValue
9
10
reportUnmatchedIgnoredErrors : true
10
- checkMissingIterableValueType : false
Original file line number Diff line number Diff line change @@ -18,12 +18,8 @@ class ServiceProvider extends BaseServiceProvider
18
18
*/
19
19
public function register (): void
20
20
{
21
- if (! defined ('LARAVEL_PDP_PATH ' )) {
22
- define ('LARAVEL_PDP_PATH ' , realpath (__DIR__ .'/../ ' ));
23
- }
24
-
25
21
$ this ->mergeConfigFrom (
26
- LARAVEL_PDP_PATH .'/config/domain-parser.php ' , 'domain-parser '
22
+ $ this -> basePath () .'/config/domain-parser.php ' , 'domain-parser '
27
23
);
28
24
29
25
$ this ->app ->singleton ('pdp.parser ' , function ($ app ) {
@@ -117,8 +113,13 @@ protected function offerPublishing(): void
117
113
{
118
114
if ($ this ->app ->runningInConsole ()) {
119
115
$ this ->publishes ([
120
- LARAVEL_PDP_PATH .'/config/domain-parser.php ' => config_path ('domain-parser.php ' ),
116
+ $ this -> basePath () .'/config/domain-parser.php ' => config_path ('domain-parser.php ' ),
121
117
], 'config ' );
122
118
}
123
119
}
120
+
121
+ private function basePath (): string
122
+ {
123
+ return realpath (rtrim (__DIR__ , '/ ' ).'/../ ' ) ?: '/../ ' ;
124
+ }
124
125
}
You can’t perform that action at this time.
0 commit comments