helick /
blocks
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Helick\Blocks; |
||
| 4 | |||
| 5 | use Helick\Contracts\Bootable; |
||
| 6 | |||
| 7 | abstract class Block implements Bootable |
||
| 8 | { |
||
| 9 | use Traits\NestedDeclaration, |
||
| 10 | Traits\Bootable, |
||
| 11 | Traits\Composable, |
||
| 12 | Traits\Renderable; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * The block's display name. |
||
| 16 | * |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $name = ''; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * The block's description. |
||
| 23 | * |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | protected $description = ''; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * The block's icon. |
||
| 30 | * |
||
| 31 | * @var string |
||
| 32 | */ |
||
| 33 | protected $icon = 'star-empty'; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * The block's category. |
||
| 37 | * |
||
| 38 | * @var string |
||
| 39 | */ |
||
| 40 | protected $category = ''; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * The block's keywords. |
||
| 44 | * |
||
| 45 | * @var string[] |
||
| 46 | */ |
||
| 47 | protected $keywords = []; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * The block's preview mode. |
||
| 51 | * |
||
| 52 | * @var bool |
||
| 53 | */ |
||
| 54 | protected $preview = true; |
||
| 55 | |||
| 56 | /** |
||
| 57 | * The block's template(s). |
||
| 58 | * |
||
| 59 | * @var string|string[] |
||
| 60 | */ |
||
| 61 | protected $template = ''; |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Fields to be attached to the block. |
||
| 65 | * |
||
| 66 | * @return array |
||
| 67 | */ |
||
| 68 | public function fields(): array |
||
| 69 | { |
||
| 70 | return []; |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Data to be passed to the rendered block. |
||
| 75 | * |
||
| 76 | * @param array $fields |
||
| 77 | * |
||
| 78 | * @return array |
||
| 79 | */ |
||
| 80 | public function with(array $fields): array |
||
|
0 ignored issues
–
show
|
|||
| 81 | { |
||
| 82 | return []; |
||
| 83 | } |
||
| 84 | } |
||
| 85 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.