File tree Expand file tree Collapse file tree 6 files changed +11
-14
lines changed Expand file tree Collapse file tree 6 files changed +11
-14
lines changed Original file line number Diff line number Diff line change 8
8
use Swis \JsonApi \Client \Interfaces \TypeMapperInterface ;
9
9
10
10
/**
11
- * @method static void setMapping(string $type, string $class)
12
- * @method static bool hasMapping(string $type)
13
- * @method static void removeMapping(string $type)
11
+ * @method static void setMapping(string $type, string $class)
12
+ * @method static bool hasMapping(string $type)
13
+ * @method static void removeMapping(string $type)
14
14
* @method static \Swis\JsonApi\Client\Interfaces\ItemInterface getMapping(string $type)
15
15
*
16
16
* @see \Swis\JsonApi\Client\Interfaces\TypeMapperInterface
Original file line number Diff line number Diff line change @@ -75,12 +75,12 @@ static function (ClientInterface $client) {
75
75
76
76
protected function registerLaravelHttpClientMacros (): void
77
77
{
78
- if (!class_exists (Http::class)) {
78
+ if (! class_exists (Http::class)) {
79
79
// N.B. The HTTP Client was introduced in Laravel 7.
80
80
return ;
81
81
}
82
82
83
- if (!PendingRequest::hasMacro ('asJsonApi ' )) {
83
+ if (! PendingRequest::hasMacro ('asJsonApi ' )) {
84
84
PendingRequest::macro ('asJsonApi ' , function (): PendingRequest {
85
85
/* @var \Illuminate\Http\Client\PendingRequest $this */
86
86
return $ this ->bodyFormat ('json ' )
@@ -89,7 +89,7 @@ protected function registerLaravelHttpClientMacros(): void
89
89
});
90
90
}
91
91
92
- if (!Response::hasMacro ('jsonApi ' )) {
92
+ if (! Response::hasMacro ('jsonApi ' )) {
93
93
Response::macro ('jsonApi ' , function (): DocumentInterface {
94
94
/* @var \Illuminate\Http\Client\Response $this */
95
95
return ResponseParserFacade::parse ($ this ->toPsrResponse ());
Original file line number Diff line number Diff line change @@ -16,9 +16,6 @@ class TypeMapperServiceProvider extends BaseServiceProvider
16
16
*/
17
17
protected $ items = [];
18
18
19
- /**
20
- * @param \Swis\JsonApi\Client\Interfaces\TypeMapperInterface $typeMapper
21
- */
22
19
public function boot (TypeMapperInterface $ typeMapper )
23
20
{
24
21
foreach ($ this ->items as $ class ) {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ abstract class AbstractTestCase extends TestCase
12
12
/**
13
13
* Define environment setup.
14
14
*
15
- * @param \Illuminate\Foundation\Application $app
15
+ * @param \Illuminate\Foundation\Application $app
16
16
*/
17
17
protected function getEnvironmentSetUp ($ app )
18
18
{
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class ServiceProviderTest extends AbstractTestCase
13
13
{
14
14
protected function setUp (): void
15
15
{
16
- if (!class_exists (Http::class)) {
16
+ if (! class_exists (Http::class)) {
17
17
$ this ->markTestSkipped ('The Laravel HTTP Client is not available. ' );
18
18
}
19
19
@@ -23,7 +23,7 @@ protected function setUp(): void
23
23
/**
24
24
* @test
25
25
*/
26
- public function itRegistersHttpFacadeMacroForRequest (): void
26
+ public function it_registers_http_facade_macro_for_request (): void
27
27
{
28
28
// arrange
29
29
Http::fake ();
@@ -41,7 +41,7 @@ public function itRegistersHttpFacadeMacroForRequest(): void
41
41
/**
42
42
* @test
43
43
*/
44
- public function itRegistersHttpFacadeMacroForResponse (): void
44
+ public function it_registers_http_facade_macro_for_response (): void
45
45
{
46
46
// arrange
47
47
Http::fake ();
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class TypeMapperServiceProviderTest extends AbstractTestCase
15
15
/**
16
16
* @test
17
17
*/
18
- public function itRegistersTypesWithTheTypeMapper ()
18
+ public function it_registers_types_with_the_type_mapper ()
19
19
{
20
20
$ provider = new MockTypeMapperServiceProvider ($ this ->app );
21
21
$ typeMapper = $ this ->createMock (TypeMapper::class);
You can’t perform that action at this time.
0 commit comments