1 | <?php |
||
35 | class PageLayoutRenderer |
||
36 | { |
||
37 | /** |
||
38 | * @var bool Whether to force (or not force) embedding the content in the layout |
||
39 | */ |
||
40 | protected $use_layout; |
||
41 | |||
42 | /** |
||
43 | * @var HTMLRenderer |
||
44 | */ |
||
45 | protected $view_renderer; |
||
46 | |||
47 | /** |
||
48 | * @var \Request |
||
49 | */ |
||
50 | protected $current_request; |
||
51 | |||
52 | public function __construct(Renderer $view_renderer, \Request $current_request = NULL) |
||
57 | |||
58 | /** |
||
59 | * @param PageContentView $content_view |
||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | public function render(PageContentView $content_view) |
||
72 | |||
73 | /** |
||
74 | * @return bool |
||
75 | */ |
||
76 | protected function shouldUseLayout() |
||
88 | |||
89 | /** |
||
90 | * @param PageLayoutView $layout |
||
91 | * @param string $content |
||
92 | * |
||
93 | * @return string |
||
94 | */ |
||
95 | protected function renderInLayout(PageLayoutView $layout, $content) |
||
101 | |||
102 | /** |
||
103 | * Configure whether to always wrap the content in the layout (TRUE), never (FALSE) or automatically for |
||
104 | * non-AJAX requests (NULL) |
||
105 | * |
||
106 | * @param bool $use_layout |
||
107 | * |
||
108 | * @return void |
||
109 | */ |
||
110 | public function setUseLayout($use_layout) |
||
114 | |||
115 | } |
||
116 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.