@@ -60,7 +60,7 @@ |
||
| 60 | 60 | return $this->fields[$name]; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - /** @return string[] */ |
|
| 63 | + /** @return integer[] */ |
|
| 64 | 64 | public function getLinks() |
| 65 | 65 | { |
| 66 | 66 | return array_keys($this->links); |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | public function __construct() |
| 15 | 15 | { |
| 16 | - $this->dbPath = __DIR__.'/../../testapi/endpoints.db'; |
|
| 16 | + $this->dbPath = __DIR__ . '/../../testapi/endpoints.db'; |
|
| 17 | 17 | |
| 18 | 18 | $this->writeEndpoints([]); |
| 19 | 19 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $response = $client->get($url); |
| 57 | 57 | |
| 58 | 58 | return new Response( |
| 59 | - 'data://text/plain,'.(string) $response->getBody(), |
|
| 59 | + 'data://text/plain,' . (string) $response->getBody(), |
|
| 60 | 60 | $response->getStatusCode(), |
| 61 | 61 | $response->getHeaders() |
| 62 | 62 | ); |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | public function iMakeAGetRequestTo($url) |
| 72 | 72 | { |
| 73 | 73 | try { |
| 74 | - $this->response = $this->client->get($this->urlPrefix.$url); |
|
| 74 | + $this->response = $this->client->get($this->urlPrefix . $url); |
|
| 75 | 75 | } catch (HalClientException $error) { |
| 76 | 76 | $this->error = $error; |
| 77 | 77 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | function it_throws_when_requesting_an_unknown_field() |
| 44 | 44 | { |
| 45 | 45 | $this->shouldThrow(new FieldNotFoundException('unknown')) |
| 46 | - ->duringGetField('unknown'); |
|
| 46 | + ->duringGetField('unknown'); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | function it_lists_links() |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | function it_throws_when_requesting_an_unknown_link() |
| 60 | 60 | { |
| 61 | 61 | $this->shouldThrow(new LinkNotFoundException('unknown')) |
| 62 | - ->duringGetLink('unknown'); |
|
| 62 | + ->duringGetLink('unknown'); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | function it_gets_resource_by_name(ResourceNode $resource) |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | function it_throws_when_requesting_an_unknown_resource() |
| 71 | 71 | { |
| 72 | 72 | $this->shouldThrow(new ResourceNotFoundException('unknown')) |
| 73 | - ->duringGetResource('unknown'); |
|
| 73 | + ->duringGetResource('unknown'); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | function it_does_not_match_if_critera_includes_unknown_field() |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | function it_throws_if_field_is_not_found() |
| 25 | 25 | { |
| 26 | 26 | $this->shouldThrow(new FieldNotFoundException('unknown-field')) |
| 27 | - ->duringGetField('unknown-field'); |
|
| 27 | + ->duringGetField('unknown-field'); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | function it_returns_field_via_magic_method(FieldNode $f1) |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $response = new Response("data://text/plain,$json", 200, ['content-type' => 'application/hal+json']); |
| 60 | 60 | |
| 61 | 61 | $this->shouldThrow(ProcessingException::badJson($error)) |
| 62 | - ->duringProcess($response, $fetcher); |
|
| 62 | + ->duringProcess($response, $fetcher); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | function it_processes_simple_single_fields(ResourceFetcher $fetcher) |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $resource = $this->process($this->response, $fetcher); |
| 96 | 96 | |
| 97 | 97 | $resource->shouldThrow(new FieldNotFoundException('_links')) |
| 98 | - ->duringGetField('_links'); |
|
| 98 | + ->duringGetField('_links'); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | function it_does_not_add_embedded_as_a_field(ResourceFetcher $fetcher) |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $resource = $this->process($this->response, $fetcher); |
| 104 | 104 | |
| 105 | 105 | $resource->shouldThrow(new FieldNotFoundException('_embedded')) |
| 106 | - ->duringGetField('_embedded'); |
|
| 106 | + ->duringGetField('_embedded'); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | function it_processes_resources(ResourceFetcher $fetcher) |