Issues (35)

src/Renderer/AbstractRenderer.php (1 issue)

Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Enjoys\Forms\Renderer;
6
7
use Enjoys\Forms\Form;
8
use Enjoys\Forms\Interfaces\RendererInterface;
9
10
/**
11
 * @deprecated use \Enjoys\Forms\Renderer\Renderer, remove in 6.x
12
 */
13
abstract class AbstractRenderer implements RendererInterface
0 ignored issues
show
Deprecated Code introduced by
The interface Enjoys\Forms\Interfaces\RendererInterface has been deprecated: remove in 6.x ( Ignorable by Annotation )

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

13
abstract class AbstractRenderer implements /** @scrutinizer ignore-deprecated */ RendererInterface

This interface has been deprecated. The supplier of the interface has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the interface will be removed and what other interface to use instead.

Loading history...
14
{
15
    private Form $form;
16
17 1
    public function __construct(?Form $form = null)
18
    {
19 1
        $this->form = $form ?? new Form();
20
    }
21
22
    abstract public function output(): mixed;
23
24
    public function setForm(Form $form): self
25
    {
26
        $this->form = $form;
27
        return $this;
28
    }
29
30 1
    public function getForm(): Form
31
    {
32 1
        return $this->form;
33
    }
34
}
35