Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
Complex classes like TPage often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use TPage, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
39 | class TPage extends TTemplateControl |
||
40 | { |
||
41 | /** |
||
42 | * system post fields |
||
43 | */ |
||
44 | const FIELD_POSTBACK_TARGET = 'PRADO_POSTBACK_TARGET'; |
||
45 | const FIELD_POSTBACK_PARAMETER = 'PRADO_POSTBACK_PARAMETER'; |
||
46 | const FIELD_LASTFOCUS = 'PRADO_LASTFOCUS'; |
||
47 | const FIELD_PAGESTATE = 'PRADO_PAGESTATE'; |
||
48 | const FIELD_CALLBACK_TARGET = 'PRADO_CALLBACK_TARGET'; |
||
49 | const FIELD_CALLBACK_PARAMETER = 'PRADO_CALLBACK_PARAMETER'; |
||
50 | |||
51 | /** |
||
52 | * @var array system post fields |
||
53 | */ |
||
54 | private static $_systemPostFields = [ |
||
55 | 'PRADO_POSTBACK_TARGET' => true, |
||
56 | 'PRADO_POSTBACK_PARAMETER' => true, |
||
57 | 'PRADO_LASTFOCUS' => true, |
||
58 | 'PRADO_PAGESTATE' => true, |
||
59 | 'PRADO_CALLBACK_TARGET' => true, |
||
60 | 'PRADO_CALLBACK_PARAMETER' => true |
||
61 | ]; |
||
62 | /** |
||
63 | * @var TForm form instance |
||
64 | */ |
||
65 | private $_form; |
||
66 | /** |
||
67 | * @var THead head instance |
||
68 | */ |
||
69 | private $_head; |
||
70 | /** |
||
71 | * @var array list of registered validators |
||
72 | */ |
||
73 | private $_validators = []; |
||
74 | /** |
||
75 | * @var bool if validation has been performed |
||
76 | */ |
||
77 | private $_validated = false; |
||
78 | /** |
||
79 | * @var TTheme page theme |
||
80 | */ |
||
81 | private $_theme; |
||
82 | /** |
||
83 | * @var string page title set when Head is not in page yet |
||
84 | */ |
||
85 | private $_title; |
||
86 | /** |
||
87 | * @var TTheme page stylesheet theme |
||
88 | */ |
||
89 | private $_styleSheet; |
||
90 | /** |
||
91 | * @var TClientScriptManager client script manager |
||
92 | */ |
||
93 | private $_clientScript; |
||
94 | /** |
||
95 | * @var TMap data post back by user |
||
96 | */ |
||
97 | protected $_postData; |
||
98 | /** |
||
99 | * @var TMap postback data that is not handled during first invocation of LoadPostData. |
||
100 | */ |
||
101 | protected $_restPostData; |
||
102 | /** |
||
103 | * @var array list of controls whose data have been changed due to the postback |
||
104 | */ |
||
105 | protected $_controlsPostDataChanged = []; |
||
106 | /** |
||
107 | * @var array list of controls that need to load post data in the current request |
||
108 | */ |
||
109 | protected $_controlsRequiringPostData = []; |
||
110 | /** |
||
111 | * @var array list of controls that need to load post data in the next postback |
||
112 | */ |
||
113 | protected $_controlsRegisteredForPostData = []; |
||
114 | /** |
||
115 | * @var TControl control that needs to raise postback event |
||
116 | */ |
||
117 | private $_postBackEventTarget; |
||
118 | /** |
||
119 | * @var string postback event parameter |
||
120 | */ |
||
121 | private $_postBackEventParameter; |
||
122 | /** |
||
123 | * @var bool whether the form has been rendered |
||
124 | */ |
||
125 | protected $_formRendered = false; |
||
126 | /** |
||
127 | * @var bool whether the current rendering is within a form |
||
128 | */ |
||
129 | protected $_inFormRender = false; |
||
130 | /** |
||
131 | * @var string|TControl the control or the ID of the element on the page to be focused when the page is sent back to user |
||
132 | */ |
||
133 | private $_focus; |
||
134 | /** |
||
135 | * @var string page path to this page |
||
136 | */ |
||
137 | private $_pagePath = ''; |
||
138 | /** |
||
139 | * @var bool whether page state should be HMAC validated |
||
140 | */ |
||
141 | private $_enableStateValidation = true; |
||
142 | /** |
||
143 | * @var bool whether page state should be encrypted |
||
144 | */ |
||
145 | private $_enableStateEncryption = false; |
||
146 | /** |
||
147 | * @var bool whether page state should be compressed |
||
148 | * @since 3.1.6 |
||
149 | */ |
||
150 | private $_enableStateCompression = true; |
||
151 | /** |
||
152 | * @var bool whether to use the igbinary serializer if available |
||
153 | * @since 4.1 |
||
154 | */ |
||
155 | private $_enableStateIGBinary = true; |
||
156 | /** |
||
157 | * @var string page state persister class name |
||
158 | */ |
||
159 | private $_statePersisterClass = '\Prado\Web\UI\TPageStatePersister'; |
||
160 | /** |
||
161 | * @var mixed page state persister |
||
162 | */ |
||
163 | private $_statePersister; |
||
164 | /** |
||
165 | * @var TStack stack used to store currently active caching controls |
||
166 | */ |
||
167 | private $_cachingStack; |
||
168 | /** |
||
169 | * @var string state string to be stored on the client side |
||
170 | */ |
||
171 | private $_clientState = ''; |
||
172 | /** |
||
173 | * @var bool true if loading post data. |
||
174 | */ |
||
175 | protected $_isLoadingPostData = false; |
||
176 | /** |
||
177 | * @var bool whether client supports javascript |
||
178 | */ |
||
179 | private $_enableJavaScript = true; |
||
180 | /** |
||
181 | * @var THtmlWriter current html render writer |
||
182 | */ |
||
183 | private $_writer; |
||
184 | |||
185 | /** |
||
186 | * Constructor. |
||
187 | * Sets the page object to itself. |
||
188 | * Derived classes must call parent implementation. |
||
189 | */ |
||
190 | public function __construct() |
||
194 | |||
195 | /** |
||
196 | * Runs through the page lifecycles. |
||
197 | * @param THtmlTextWriter $writer the HTML writer |
||
198 | */ |
||
199 | public function run($writer) |
||
218 | |||
219 | protected function processNormalRequest($writer) |
||
252 | |||
253 | protected function processPostBackRequest($writer) |
||
297 | |||
298 | protected static function decodeUTF8($data, $enc) |
||
311 | |||
312 | /** |
||
313 | * Sets Adapter to TActivePageAdapter and calls apter to process the |
||
314 | * callback request. |
||
315 | * @param mixed $writer |
||
316 | */ |
||
317 | protected function processCallbackRequest($writer) |
||
388 | |||
389 | /** |
||
390 | * Gets the callback client script handler that allows javascript functions |
||
391 | * to be executed during the callback response. |
||
392 | * @return TCallbackClientScript interface to client-side javascript code. |
||
393 | */ |
||
394 | public function getCallbackClient() |
||
402 | |||
403 | /** |
||
404 | * Set a new callback client handler. |
||
405 | * @param TCallbackClientScript $client new callback client script handler. |
||
406 | */ |
||
407 | public function setCallbackClient($client) |
||
411 | |||
412 | /** |
||
413 | * @return TControl the control responsible for the current callback event, |
||
414 | * null if nonexistent |
||
415 | */ |
||
416 | public function getCallbackEventTarget() |
||
420 | |||
421 | /** |
||
422 | * Registers a control to raise callback event in the current request. |
||
423 | * @param TControl $control control registered to raise callback event. |
||
424 | */ |
||
425 | public function setCallbackEventTarget(TControl $control) |
||
429 | |||
430 | /** |
||
431 | * Callback parameter is decoded assuming JSON encoding. |
||
432 | * @return string callback event parameter |
||
433 | */ |
||
434 | public function getCallbackEventParameter() |
||
438 | |||
439 | /** |
||
440 | * @param mixed $value callback event parameter |
||
441 | */ |
||
442 | public function setCallbackEventParameter($value) |
||
446 | |||
447 | /** |
||
448 | * @return TForm the form on the page |
||
449 | */ |
||
450 | public function getForm() |
||
454 | |||
455 | /** |
||
456 | * Registers a TForm instance to the page. |
||
457 | * Note, a page can contain at most one TForm instance. |
||
458 | * @param TForm $form the form on the page |
||
459 | * @throws TInvalidOperationException if this method is invoked twice or more. |
||
460 | */ |
||
461 | public function setForm(TForm $form) |
||
469 | |||
470 | /** |
||
471 | * Returns a list of registered validators. |
||
472 | * If validation group is specified, only the validators in that group will be returned. |
||
473 | * @param null|string $validationGroup validation group |
||
474 | * @return TList registered validators in the requested group. If the group is null, all validators will be returned. |
||
475 | */ |
||
476 | public function getValidators($validationGroup = null) |
||
493 | |||
494 | /** |
||
495 | * Performs input validation. |
||
496 | * This method will invoke the registered validators to perform the actual validation. |
||
497 | * If validation group is specified, only the validators in that group will be invoked. |
||
498 | * @param string $validationGroup validation group. If null, all validators will perform validation. |
||
499 | */ |
||
500 | public function validate($validationGroup = null) |
||
518 | |||
519 | /** |
||
520 | * Returns whether user input is valid or not. |
||
521 | * This method must be invoked after {@link validate} is called. |
||
522 | * @throws TInvalidOperationException if {@link validate} is not invoked yet. |
||
523 | * @return bool whether the user input is valid or not. |
||
524 | */ |
||
525 | public function getIsValid() |
||
540 | |||
541 | /** |
||
542 | * @return TTheme the theme used for the page. Defaults to null. |
||
543 | */ |
||
544 | View Code Duplication | public function getTheme() |
|
551 | |||
552 | /** |
||
553 | * Sets the theme to be used for the page. |
||
554 | * @param string|TTheme $value the theme name or the theme object to be used for the page. |
||
555 | */ |
||
556 | public function setTheme($value) |
||
560 | |||
561 | |||
562 | /** |
||
563 | * @return TTheme the stylesheet theme used for the page. Defaults to null. |
||
564 | */ |
||
565 | View Code Duplication | public function getStyleSheetTheme() |
|
572 | |||
573 | /** |
||
574 | * Sets the stylesheet theme to be used for the page. |
||
575 | * @param string|TTheme $value the stylesheet theme name or the stylesheet theme object to be used for the page. |
||
576 | */ |
||
577 | public function setStyleSheetTheme($value) |
||
581 | |||
582 | /** |
||
583 | * Applies a skin in the current theme to a control. |
||
584 | * This method should only be used by framework developers. |
||
585 | * @param TControl $control a control to be applied skin with |
||
586 | */ |
||
587 | public function applyControlSkin($control) |
||
593 | |||
594 | /** |
||
595 | * Applies a stylesheet skin in the current theme to a control. |
||
596 | * This method should only be used by framework developers. |
||
597 | * @param TControl $control a control to be applied stylesheet skin with |
||
598 | */ |
||
599 | public function applyControlStyleSheet($control) |
||
605 | |||
606 | /** |
||
607 | * @return TClientScriptManager client script manager |
||
608 | */ |
||
609 | public function getClientScript() |
||
622 | |||
623 | /** |
||
624 | * Raises OnPreInit event. |
||
625 | * This method is invoked right before {@link onInit OnInit} stage. |
||
626 | * You may override this method to provide additional initialization that |
||
627 | * should be done before {@link onInit OnInit} (e.g. setting {@link setTheme Theme} or |
||
628 | * {@link setStyleSheetTheme StyleSheetTheme}). |
||
629 | * Remember to call the parent implementation to ensure OnPreInit event is raised. |
||
630 | * @param mixed $param event parameter |
||
631 | */ |
||
632 | public function onPreInit($param) |
||
636 | |||
637 | /** |
||
638 | * Raises OnInitComplete event. |
||
639 | * This method is invoked right after {@link onInit OnInit} stage and before {@link onLoad OnLoad} stage. |
||
640 | * You may override this method to provide additional initialization that |
||
641 | * should be done after {@link onInit OnInit}. |
||
642 | * Remember to call the parent implementation to ensure OnInitComplete event is raised. |
||
643 | * @param mixed $param event parameter |
||
644 | */ |
||
645 | public function onInitComplete($param) |
||
649 | |||
650 | /** |
||
651 | * Raises OnPreLoad event. |
||
652 | * This method is invoked right before {@link onLoad OnLoad} stage. |
||
653 | * You may override this method to provide additional page loading logic that |
||
654 | * should be done before {@link onLoad OnLoad}. |
||
655 | * Remember to call the parent implementation to ensure OnPreLoad event is raised. |
||
656 | * @param mixed $param event parameter |
||
657 | */ |
||
658 | public function onPreLoad($param) |
||
662 | |||
663 | /** |
||
664 | * Raises OnLoadComplete event. |
||
665 | * This method is invoked right after {@link onLoad OnLoad} stage. |
||
666 | * You may override this method to provide additional page loading logic that |
||
667 | * should be done after {@link onLoad OnLoad}. |
||
668 | * Remember to call the parent implementation to ensure OnLoadComplete event is raised. |
||
669 | * @param mixed $param event parameter |
||
670 | */ |
||
671 | public function onLoadComplete($param) |
||
675 | |||
676 | /** |
||
677 | * Raises OnPreRenderComplete event. |
||
678 | * This method is invoked right after {@link onPreRender OnPreRender} stage. |
||
679 | * You may override this method to provide additional preparation for page rendering |
||
680 | * that should be done after {@link onPreRender OnPreRender}. |
||
681 | * Remember to call the parent implementation to ensure OnPreRenderComplete event is raised. |
||
682 | * @param mixed $param event parameter |
||
683 | */ |
||
684 | public function onPreRenderComplete($param) |
||
711 | |||
712 | /** |
||
713 | * Determines the media type of the CSS file. |
||
714 | * The media type is determined according to the following file name pattern: |
||
715 | * xxx.media-type.extension |
||
716 | * For example, 'mystyle.print.css' means its media type is 'print'. |
||
717 | * @param string $url CSS URL |
||
718 | * @return string media type of the CSS file |
||
719 | */ |
||
720 | private function getCssMediaType($url) |
||
729 | |||
730 | /** |
||
731 | * Raises OnSaveStateComplete event. |
||
732 | * This method is invoked right after {@link onSaveState OnSaveState} stage. |
||
733 | * You may override this method to provide additional logic after page state is saved. |
||
734 | * Remember to call the parent implementation to ensure OnSaveStateComplete event is raised. |
||
735 | * @param mixed $param event parameter |
||
736 | */ |
||
737 | public function onSaveStateComplete($param) |
||
741 | |||
742 | /** |
||
743 | * Determines whether the current page request is a postback. |
||
744 | * Call {@link getIsPostBack} to get the result. |
||
745 | */ |
||
746 | private function determinePostBackMode() |
||
753 | |||
754 | /** |
||
755 | * @return bool whether the current page request is a postback |
||
756 | */ |
||
757 | public function getIsPostBack() |
||
761 | |||
762 | /** |
||
763 | * @return bool whether this is a callback request |
||
764 | */ |
||
765 | public function getIsCallback() |
||
769 | |||
770 | /** |
||
771 | * This method is invoked when control state is to be saved. |
||
772 | * You can override this method to do last step state saving. |
||
773 | * Parent implementation must be invoked. |
||
774 | */ |
||
775 | public function saveState() |
||
780 | |||
781 | /** |
||
782 | * This method is invoked right after the control has loaded its state. |
||
783 | * You can override this method to initialize data from the control state. |
||
784 | * Parent implementation must be invoked. |
||
785 | */ |
||
786 | public function loadState() |
||
791 | |||
792 | /** |
||
793 | * Loads page state from persistent storage. |
||
794 | */ |
||
795 | protected function loadPageState() |
||
801 | |||
802 | /** |
||
803 | * Saves page state from persistent storage. |
||
804 | */ |
||
805 | protected function savePageState() |
||
811 | |||
812 | /** |
||
813 | * @param string $field the field name |
||
814 | * @return bool whether the specified field is a system field in postback data |
||
815 | */ |
||
816 | protected function isSystemPostField($field) |
||
820 | |||
821 | /** |
||
822 | * Registers a control for loading post data in the next postback. |
||
823 | * This method needs to be invoked if the control to load post data |
||
824 | * may not have a post variable in some cases. For example, a checkbox, |
||
825 | * if not checked, will not have a post value. |
||
826 | * @param TControl $control control registered for loading post data |
||
827 | */ |
||
828 | public function registerRequiresPostData($control) |
||
837 | |||
838 | /** |
||
839 | * @return TControl the control responsible for the current postback event, null if nonexistent |
||
840 | */ |
||
841 | public function getPostBackEventTarget() |
||
851 | |||
852 | /** |
||
853 | * Registers a control to raise postback event in the current request. |
||
854 | * @param TControl $control control registered to raise postback event. |
||
855 | */ |
||
856 | public function setPostBackEventTarget(TControl $control) |
||
860 | |||
861 | /** |
||
862 | * @return string postback event parameter |
||
863 | */ |
||
864 | public function getPostBackEventParameter() |
||
873 | |||
874 | /** |
||
875 | * @param string $value postback event parameter |
||
876 | */ |
||
877 | public function setPostBackEventParameter($value) |
||
881 | |||
882 | /** |
||
883 | * Processes post data. |
||
884 | * @param TMap $postData post data to be processed |
||
885 | * @param bool $beforeLoad whether this method is invoked before {@link onLoad OnLoad}. |
||
886 | */ |
||
887 | protected function processPostData($postData, $beforeLoad) |
||
926 | |||
927 | /** |
||
928 | * @return bool true if loading post data. |
||
929 | */ |
||
930 | public function getIsLoadingPostData() |
||
934 | |||
935 | /** |
||
936 | * Raises OnPostDataChangedEvent for controls whose data have been changed due to the postback. |
||
937 | */ |
||
938 | protected function raiseChangedEvents() |
||
944 | |||
945 | /** |
||
946 | * Raises PostBack event. |
||
947 | */ |
||
948 | protected function raisePostBackEvent() |
||
956 | |||
957 | /** |
||
958 | * @return bool Whether form rendering is in progress |
||
959 | */ |
||
960 | public function getInFormRender() |
||
964 | |||
965 | /** |
||
966 | * Ensures the control is rendered within a form. |
||
967 | * @param TControl $control the control to be rendered |
||
968 | * @throws TConfigurationException if the control is outside of the form |
||
969 | */ |
||
970 | public function ensureRenderInForm($control) |
||
976 | |||
977 | /** |
||
978 | * @internal This method is invoked by TForm at the beginning of its rendering |
||
979 | * @param mixed $writer |
||
980 | */ |
||
981 | public function beginFormRender($writer) |
||
990 | |||
991 | /** |
||
992 | * @internal This method is invoked by TForm at the end of its rendering |
||
993 | * @param mixed $writer |
||
994 | */ |
||
995 | public function endFormRender($writer) |
||
1009 | |||
1010 | /** |
||
1011 | * Sets input focus on a control after the page is rendered to users. |
||
1012 | * @param string|TControl $value control to receive focus, or the ID of the element on the page to receive focus |
||
1013 | */ |
||
1014 | public function setFocus($value) |
||
1018 | |||
1019 | /** |
||
1020 | * @return bool whether client supports javascript. Defaults to true. |
||
1021 | */ |
||
1022 | public function getClientSupportsJavaScript() |
||
1026 | |||
1027 | /** |
||
1028 | * @param bool $value whether client supports javascript. If false, javascript will not be generated for controls. |
||
1029 | */ |
||
1030 | public function setClientSupportsJavaScript($value) |
||
1034 | |||
1035 | /** |
||
1036 | * @return THead page head, null if not available |
||
1037 | */ |
||
1038 | public function getHead() |
||
1042 | |||
1043 | /** |
||
1044 | * @param THead $value page head |
||
1045 | * @throws TInvalidOperationException if a head already exists |
||
1046 | */ |
||
1047 | public function setHead(THead $value) |
||
1058 | |||
1059 | /** |
||
1060 | * @return string page title. |
||
1061 | */ |
||
1062 | public function getTitle() |
||
1070 | |||
1071 | /** |
||
1072 | * Sets the page title. |
||
1073 | * Note, a {@link THead} control needs to place on the page |
||
1074 | * in order that this title be rendered. |
||
1075 | * @param string $value page title. This will override the title set in {@link getHead Head}. |
||
1076 | */ |
||
1077 | public function setTitle($value) |
||
1085 | |||
1086 | /** |
||
1087 | * Returns the state to be stored on the client side. |
||
1088 | * This method should only be used by framework and control developers. |
||
1089 | * @return string the state to be stored on the client side |
||
1090 | */ |
||
1091 | public function getClientState() |
||
1095 | |||
1096 | /** |
||
1097 | * Sets the state to be stored on the client side. |
||
1098 | * This method should only be used by framework and control developers. |
||
1099 | * @param string $state the state to be stored on the client side |
||
1100 | */ |
||
1101 | public function setClientState($state) |
||
1105 | |||
1106 | /** |
||
1107 | * @return string the state postback from client side |
||
1108 | */ |
||
1109 | public function getRequestClientState() |
||
1113 | |||
1114 | /** |
||
1115 | * @return string class name of the page state persister. Defaults to TPageStatePersister. |
||
1116 | */ |
||
1117 | public function getStatePersisterClass() |
||
1121 | |||
1122 | /** |
||
1123 | * @param string $value class name of the page state persister. |
||
1124 | */ |
||
1125 | public function setStatePersisterClass($value) |
||
1129 | |||
1130 | /** |
||
1131 | * @return IPageStatePersister page state persister |
||
1132 | */ |
||
1133 | public function getStatePersister() |
||
1144 | |||
1145 | /** |
||
1146 | * @return bool whether page state should be HMAC validated. Defaults to true. |
||
1147 | */ |
||
1148 | public function getEnableStateValidation() |
||
1152 | |||
1153 | /** |
||
1154 | * @param bool $value whether page state should be HMAC validated. |
||
1155 | */ |
||
1156 | public function setEnableStateValidation($value) |
||
1160 | |||
1161 | /** |
||
1162 | * @return bool whether page state should be encrypted. Defaults to false. |
||
1163 | */ |
||
1164 | public function getEnableStateEncryption() |
||
1168 | |||
1169 | /** |
||
1170 | * @param bool $value whether page state should be encrypted. |
||
1171 | */ |
||
1172 | public function setEnableStateEncryption($value) |
||
1176 | |||
1177 | /** |
||
1178 | * @return bool whether page state should be compressed. Defaults to true. |
||
1179 | * @since 3.1.6 |
||
1180 | */ |
||
1181 | public function getEnableStateCompression() |
||
1185 | |||
1186 | /** |
||
1187 | * @param bool $value whether page state should be compressed. |
||
1188 | * @since 3.1.6 |
||
1189 | */ |
||
1190 | public function setEnableStateCompression($value) |
||
1194 | |||
1195 | /** |
||
1196 | * @return bool whether page state should be serialized using igbinary if available. Defaults to true. |
||
1197 | * @since 4.1 |
||
1198 | */ |
||
1199 | public function getEnableStateIGBinary() |
||
1203 | |||
1204 | /** |
||
1205 | * @param bool $value whether page state should be serialized using igbinary if available. |
||
1206 | * @since 4.1 |
||
1207 | */ |
||
1208 | public function setEnableStateIGBinary($value) |
||
1212 | |||
1213 | /** |
||
1214 | * @return string the requested page path for this page |
||
1215 | */ |
||
1216 | public function getPagePath() |
||
1220 | |||
1221 | /** |
||
1222 | * @param string $value the requested page path for this page |
||
1223 | */ |
||
1224 | public function setPagePath($value) |
||
1228 | |||
1229 | /** |
||
1230 | * Registers an action associated with the content being cached. |
||
1231 | * The registered action will be replayed if the content stored |
||
1232 | * in the cache is served to end-users. |
||
1233 | * @param string $context context of the action method. This is a property-path |
||
1234 | * referring to the context object (e.g. Page, Page.ClientScript). |
||
1235 | * @param string $funcName method name of the context object |
||
1236 | * @param array $funcParams list of parameters to be passed to the action method |
||
1237 | */ |
||
1238 | public function registerCachingAction($context, $funcName, $funcParams) |
||
1246 | |||
1247 | /** |
||
1248 | * @return TStack stack of {@link TOutputCache} objects |
||
1249 | */ |
||
1250 | public function getCachingStack() |
||
1257 | |||
1258 | /** |
||
1259 | * Flushes output |
||
1260 | */ |
||
1261 | public function flushWriter() |
||
1267 | } |
||
1268 |
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..