Skip to content

Commit 28aed7c

Browse files
Merge pull request #7 from TheDragonCode/1.x
Improved function calls
2 parents 9ab78e4 + e212db5 commit 28aed7c

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

src/Commands/GenerateHelperCommand.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@
1010
use Illuminate\Console\Command;
1111
use Illuminate\Support\Str;
1212

13+
use function array_map;
14+
use function base_path;
15+
use function collect;
16+
use function config;
17+
use function file_get_contents;
18+
use function implode;
19+
use function is_string;
20+
use function sprintf;
21+
22+
use const PHP_EOL;
23+
1324
class GenerateHelperCommand extends Command
1425
{
1526
protected $signature = 'http:macros-helper';

src/Macros/ToDataCollectionMacro.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
use Closure;
88
use Illuminate\Support\Collection;
99

10+
use function collect;
11+
use function is_array;
12+
use function is_callable;
13+
use function is_null;
14+
use function method_exists;
15+
1016
/**
1117
* Get the JSON decoded body of the response as a collection.
1218
*/

src/Macros/ToDataMacro.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
use Closure;
88

9+
use function is_callable;
10+
use function is_null;
11+
use function method_exists;
12+
913
/**
1014
* Get the JSON decoded body of the response as a class instance.
1115
*/

src/ServiceProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
use Illuminate\Http\Client\Response;
99
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
1010

11+
use function app;
12+
use function config;
13+
use function is_string;
14+
1115
class ServiceProvider extends BaseServiceProvider
1216
{
1317
public function register(): void
@@ -57,7 +61,7 @@ protected function registerConfig(): void
5761
protected function publishConfig(): void
5862
{
5963
$this->publishes([
60-
__DIR__ . '/../config/http.php' => config_path('http.php'),
64+
__DIR__ . '/../config/http.php' => app()->configPath('http.php'),
6165
]);
6266
}
6367
}

0 commit comments

Comments
 (0)