Skip to content

Commit

Permalink
Remove ->values calls that are no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jan 8, 2023
1 parent d9be7cb commit 1281054
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function toArray(): array
'detailTemplate' => $this->detailTemplate,
'listTemplate' => $this->listTemplate,
'pagination' => $this->pagination?->toArray(),
'fields' => $this->fields->values()->toArray(),
'fields' => $this->fields->toArray(),
]);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/framework/tests/Feature/PublicationTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function test_can_construct_new_publication_type()
$this->assertEquals($property, $publicationType->$key->toArray());
} else {
if ($key === 'fields') {
$this->assertEquals($property, $publicationType->$key->values()->toArray());
$this->assertEquals($property, $publicationType->$key->toArray());
} else {
$this->assertEquals($property, $publicationType->$key);
}
Expand Down Expand Up @@ -150,7 +150,7 @@ public function test_can_load_fields_with_validation_rules()
]));

$publicationType = PublicationType::fromFile('test-publication/schema.json');
$this->assertSame($fields, $publicationType->getFields()->values()->toArray());
$this->assertSame($fields, $publicationType->getFields()->toArray());
}

public function test_get_fields_method_returns_collection_of_field_objects()
Expand Down

0 comments on commit 1281054

Please sign in to comment.