1 | <?php |
||
13 | class Tree extends \Object { |
||
14 | |||
15 | /** |
||
16 | * Function for generate item body html |
||
17 | * |
||
18 | * @var closure|null |
||
19 | */ |
||
20 | public $itemBodyFn = null; |
||
21 | |||
22 | /** |
||
23 | * Function for generate item body html |
||
24 | * |
||
25 | * @var closure|null |
||
26 | */ |
||
27 | public $itemActiveCheck = null; |
||
28 | |||
29 | /** |
||
30 | * Active item class name |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | public $itemActiveClass = 'active'; |
||
35 | |||
36 | public function __construct() { |
||
39 | |||
40 | /** |
||
41 | * Draw tree |
||
42 | * |
||
43 | * @param Model|string $objectRoot |
||
44 | * @param integer $maxDeep |
||
45 | * @param array $order |
||
46 | * @return integer |
||
47 | */ |
||
48 | public function draw($objectRoot, $maxDeep = 0, $order = []) { |
||
51 | |||
52 | /** |
||
53 | * Start generating items tree from root item |
||
54 | * item must has parent_id col for generating tree by this coll |
||
55 | * |
||
56 | * @param Model|string $objectRoot |
||
57 | * @param integer $maxDeep |
||
58 | * @param closure|null $hrefFunc |
||
59 | * @param array $order |
||
60 | * @return integer |
||
61 | */ |
||
62 | public static function ul($objectRoot, $maxDeep = 0, $hrefFunc = null, $order = [], $activeFunc = '', $activeClass = 'active') { |
||
87 | |||
88 | public static function showLi($object, $deep = 1, $maxDeep = 0, $hrefFunc = null, $order = [], $activeFunc = '', $activeClass = 'active') { |
||
127 | } |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.