Issues (38)

src/Component/Base/Component.php (1 issue)

Severity
1
<?php
2
3
namespace Lagdo\UiBuilder\Component\Base;
4
5
use Lagdo\UiBuilder\Component\Base\HtmlComponent;
6
7
/**
8
 * The common base class for all components, virtual or real.
9
 */
10
abstract class Component
11
{
12
    /**
13
     * Callback on component creation.
14
     *
15
     * @return void
16
     */
17
    protected function onCreate(): void
18
    {}
19
20
    /**
21
     * Callback on component parent-child relation.
22
     *
23
     * @param HtmlComponent $parent
24
     *
25
     * @return void
26
     */
27
    protected function onBuild(HtmlComponent $parent): void
0 ignored issues
show
The parameter $parent is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

27
    protected function onBuild(/** @scrutinizer ignore-unused */ HtmlComponent $parent): void

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
28
    {}
29
}
30