Completed
Push — master ( bf2930...494091 )
by David
07:08 queued 03:26
created

lib/Dwoo/Processor.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * Copyright (c) 2013-2016
4
 *
5
 * @category  Library
6
 * @package   Dwoo
7
 * @author    Jordi Boggiano <[email protected]>
8
 * @author    David Sanchez <[email protected]>
9
 * @copyright 2008-2013 Jordi Boggiano
10
 * @copyright 2013-2016 David Sanchez
11
 * @license   http://dwoo.org/LICENSE Modified BSD License
12
 * @version   1.3.0
13
 * @date      2016-09-23
14
 * @link      http://dwoo.org/
15
 */
16
17
namespace Dwoo;
18
19
/**
20
 * Base class for processors.
21
 * This software is provided 'as-is', without any express or implied warranty.
22
 * In no event will the authors be held liable for any damages arising from the use of this software.
23
 */
24
abstract class Processor
25
{
26
    /**
27
     * The compiler instance that runs this processor.
28
     *
29
     * @var Core
30
     */
31
    protected $compiler;
32
33
    /**
34
     * Constructor, if you override it, call parent::__construct($compiler); or assign
35
     * the dwoo instance yourself if you need it.
36
     *
37
     * @param Compiler $compiler the compiler class
38
     */
39
    public function __construct(Compiler $compiler)
40
    {
41
        $this->compiler = $compiler;
0 ignored issues
show
Documentation Bug introduced by
It seems like $compiler of type object<Dwoo\Compiler> is incompatible with the declared type object<Dwoo\Core> of property $compiler.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
42
    }
43
44
    /**
45
     * Processes the input and returns it filtered.
46
     *
47
     * @param string $input the template to process
48
     *
49
     * @return string
50
     */
51
    abstract public function process($input);
52
}
53