Skip to content

Commit 65b453c

Browse files
committed
Updating to the latest Fractal.
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
1 parent 64649a6 commit 65b453c

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/Transformer/FractalTransformer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ protected function createResource($response, $transformer)
8989
}
9090

9191
/**
92-
* Parse includes
92+
* Parse includes.
9393
*
9494
* @return void
9595
*/
9696
protected function parseIncludes()
9797
{
98-
$scopes = array_filter(explode($this->includeSeparator, $this->request->get($this->includeKey)));
98+
$includes = array_filter(explode($this->includeSeparator, $this->request->get($this->includeKey)));
9999

100-
$this->fractal->parseIncludes($scopes);
100+
$this->fractal->parseIncludes($includes);
101101
}
102102

103103
}

tests/TransformerFractalTransformerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public function testTransformingCollectionUsingCallback()
6262

6363
public function testTransformingNestedRelationships()
6464
{
65-
$this->transformerFactory->transform('Bar', 'BarTransformerStub');
6665
$this->transformerFactory->setRequest(Illuminate\Http\Request::create('/', 'GET', ['include' => 'foo']));
6766
$this->assertEquals(['data' => ['bar' => 'baz', 'foo' => ['data' => ['foo' => 'bar']]]], $this->transformerFactory->transformResponse(new Bar));
6867
}

tests/stubs.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,10 @@ class Foo {
140140
}
141141

142142
class Bar implements Dingo\Api\Transformer\TransformableInterface {
143+
143144
public function getTransformer()
144145
{
145146
return new BarTransformerStub;
146147
}
148+
147149
}

0 commit comments

Comments
 (0)