Skip to content

Commit

Permalink
🎨 Improve docblocks and typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Log1x committed Feb 29, 2024
1 parent f62b6f8 commit fe2b7f8
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ abstract class Block extends Composer implements BlockContract
/**
* The current post ID.
*
* @param int
* @var int
*/
public $post_id;

Expand All @@ -57,14 +57,14 @@ abstract class Block extends Composer implements BlockContract
/**
* The current post.
*
* @param \WP_Post
* @var \WP_Post
*/
public $post;

/**
* The block classes.
*
* @param string
* @var string
*/
public $classes;

Expand Down Expand Up @@ -326,14 +326,10 @@ public function getInlineStyle(): string
}

/**
* Returns the block template.
*
* @param array $template
* @return string|\Illuminate\Support\Collection
* Retrieve the block template.
*/
public function getTemplate($template = [])
public function getTemplate(string|array $template = []): string
{

if (is_string($template)) {
return $template;
}
Expand All @@ -352,8 +348,7 @@ public function getTemplate($template = [])
}

/**
* Compose the defined field group and register it
* with Advanced Custom Fields.
* Compose the fields and register the block.
*/
public function compose(): ?self
{
Expand Down

0 comments on commit fe2b7f8

Please sign in to comment.