Skip to content

Commit a4a238a

Browse files
committed
fix types and missing getters (in block-entity)
1 parent d7c11de commit a4a238a

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

src/Endpoints/Block.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public function children(): Collection
3434
* url: https://api.notion.com/{version}/blocks/{block_id}/children
3535
* notion-api-docs: https://developers.notion.com/reference/get-block-children
3636
*
37-
* @return BlockCollection
37+
* @return array
3838
*/
39-
public function childrenRaw(): Collection
39+
public function childrenRaw(): array
4040
{
4141
return $this->collectChildren()->getRawResults();
4242
}

src/Endpoints/Databases.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ public function all(): Collection
3939
* url: https://api.notion.com/{version}/databases
4040
* notion-api-docs: https://developers.notion.com/reference/get-databases
4141
*
42-
* @return DatabaseCollection
42+
* @return array
4343
*/
44-
public function allRaw(): Collection
44+
public function allRaw(): array
4545
{
4646
return $this->collect()->getRawResults();
4747
}

src/Entities/Block.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,14 @@ public function hasChildren(): bool
6868
{
6969
return $this->hasChildren;
7070
}
71+
72+
public function getCreatedTime(): DateTime
73+
{
74+
return $this->createdTime;
75+
}
76+
77+
public function getLastEditedTime(): DateTime
78+
{
79+
return $this->lastEditedTime;
80+
}
7181
}

0 commit comments

Comments
 (0)