1 | <?php |
||
12 | class ActionResult { |
||
13 | |||
14 | /** @var array */ |
||
15 | private $model; |
||
16 | |||
17 | /** @var Element[] */ |
||
18 | private $headElements = []; |
||
19 | |||
20 | /** @var Action */ |
||
21 | private $action; |
||
22 | |||
23 | /** @var string */ |
||
24 | private $actionId; |
||
25 | |||
26 | /** @var BreadCrumbsTrail */ |
||
27 | private $crumbs; |
||
28 | |||
29 | /** @var Executor */ |
||
30 | private $executor; |
||
31 | |||
32 | /** @var RendererRegistry */ |
||
33 | private $renderers; |
||
34 | |||
35 | public function __construct(Executor $executor, RendererRegistry $renderers, Action $action, $actionId, BreadCrumbsTrail $crumbs) { |
||
42 | |||
43 | public function getModel() { |
||
47 | |||
48 | public function getHeadElements() { |
||
52 | |||
53 | public function wasExecuted() { |
||
57 | |||
58 | private function executeFirst() { |
||
63 | |||
64 | private function execute() { |
||
77 | |||
78 | protected function handleFailedResult(FailedResult $result) { |
||
81 | |||
82 | protected function handleMissingParametersResult(MissingParametersResult $result) { |
||
85 | |||
86 | protected function handleNoResult() { |
||
93 | |||
94 | protected function handleNotPermittedResult() { |
||
97 | |||
98 | protected function handleRedirectResult(RedirectResult $result) { |
||
102 | |||
103 | protected function handleValueResult(ValueResult $result) { |
||
116 | } |
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.