Skip to content

Commit 139e305

Browse files
committed
remove unnecessary method from all collections
1 parent 6403c50 commit 139e305

File tree

5 files changed

+1
-33
lines changed

5 files changed

+1
-33
lines changed

src/Entities/BlockCollection.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@
1010

1111
class BlockCollection extends EntityCollection
1212
{
13-
14-
protected function setResponseData(array $responseData): void
15-
{
16-
parent::setResponseData($responseData);
17-
$this->collectChildren();
18-
}
19-
2013
protected function collectChildren()
2114
{
2215
$this->collection = new Collection();

src/Entities/DatabaseCollection.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@
1010

1111
class DatabaseCollection extends EntityCollection
1212
{
13-
14-
protected function setResponseData(array $responseData): void
15-
{
16-
parent::setResponseData($responseData);
17-
$this->collectChildren();
18-
}
19-
2013
protected function collectChildren()
2114
{
2215
$this->collection = new Collection();

src/Entities/EntityCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ protected function setResponseData(array $reponseData): void
3030

3131
$this->responseData = $reponseData;
3232
$this->fillFromRaw();
33+
$this->collectChildren();
3334
}
3435

3536
protected function fillFromRaw()
@@ -40,7 +41,6 @@ protected function fillFromRaw()
4041
protected function fillResult()
4142
{
4243
$this->rawResults = $this->responseData['results'];
43-
$this->collectChildren();
4444
}
4545

4646

src/Entities/PageCollection.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,11 @@
1010

1111
class PageCollection extends EntityCollection
1212
{
13-
14-
protected function setResponseData(array $responseData): void
15-
{
16-
parent::setResponseData($responseData);
17-
$this->collectChildren();
18-
}
19-
2013
protected function collectChildren()
2114
{
2215
$this->collection = new Collection();
2316
foreach ($this->rawResults as $pageChild) {
2417
$this->collection->add(new Page($pageChild));
2518
}
2619
}
27-
28-
29-
30-
3120
}

src/Entities/UserCollection.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@
1010

1111
class UserCollection extends EntityCollection
1212
{
13-
14-
protected function setResponseData(array $responseData): void
15-
{
16-
parent::setResponseData($responseData);
17-
$this->collectChildren();
18-
}
19-
2013
protected function collectChildren()
2114
{
2215
$this->collection = new Collection();

0 commit comments

Comments
 (0)