1 | <?php namespace Wn\Generators\Template; |
||
6 | class Template { |
||
7 | |||
8 | protected $loader; |
||
9 | |||
10 | protected $text; |
||
11 | |||
12 | protected $data; |
||
13 | |||
14 | protected $compiled; |
||
15 | |||
16 | protected $dirty; |
||
17 | |||
18 | public function __construct(TemplateLoader $loader, $text) |
||
26 | |||
27 | public function clean() |
||
33 | |||
34 | public function with($data = []) |
||
43 | |||
44 | public function get() |
||
52 | |||
53 | public function compile() |
||
61 | |||
62 | } |
||
63 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.