@@ -29,57 +29,56 @@ class DebuggerConfigurator implements IShowModable {
2929 * @var string
3030 */
3131 protected $ logChunkDelimeter = "\n====== \n" ;
32+
33+ public const SHOW_MODE_IN_CODE = 'code ' ;
34+ public const SHOW_MODE_IN_DEBUG_BAR = 'debug_bar ' ;
3235
3336 /**
34- * Где показывать
37+ * Текущие режимы отображения
3538 *
3639 * code - в коде
3740 * debug_bar - в дебаг-баре
3841 *
3942 * @var array
4043 */
41- protected $ showModes = [' code ' , ' debug_bar ' ];
44+ protected $ showModes = [self :: SHOW_MODE_IN_CODE , self :: SHOW_MODE_IN_DEBUG_BAR ];
4245
4346 public function getShowModes (): array {
4447 return $ this ->showModes ;
4548 }
4649
4750 public function notShowDebugPanel () {
4851 $ nowModes = $ this ->getShowModes ();
49- if (\in_array (' debug_bar ' , $ nowModes )) {
50- unset($ nowModes [\array_search (' debug_bar ' , $ nowModes )]);
52+ if (\in_array (self :: SHOW_MODE_IN_DEBUG_BAR , $ nowModes )) {
53+ unset($ nowModes [\array_search (self :: SHOW_MODE_IN_DEBUG_BAR , $ nowModes )]);
5154 $ this ->setShowModes (\array_unique ($ nowModes ));
5255 }
5356 return $ this ;
5457 }
5558
5659 public function notShowDebugInCode () {
5760 $ nowModes = $ this ->getShowModes ();
58- if (\in_array (' code ' , $ nowModes )) {
59- unset($ nowModes [\array_search (' code ' , $ nowModes )]);
61+ if (\in_array (self :: SHOW_MODE_IN_CODE , $ nowModes )) {
62+ unset($ nowModes [\array_search (self :: SHOW_MODE_IN_CODE , $ nowModes )]);
6063 $ this ->setShowModes (\array_unique ($ nowModes ));
6164 }
6265 return $ this ;
6366 }
6467
6568 public function showDebugPanel () {
6669 $ nowModes = $ this ->getShowModes ();
67- $ nowModes [] = ' debug_bar ' ;
70+ $ nowModes [] = self :: SHOW_MODE_IN_DEBUG_BAR ;
6871 $ this ->setShowModes (\array_unique ($ nowModes ));
6972 return $ this ;
7073 }
7174
7275 public function showDebugInCode () {
7376 $ nowModes = $ this ->getShowModes ();
74- $ nowModes [] = ' code ' ;
77+ $ nowModes [] = self :: SHOW_MODE_IN_CODE ;
7578 $ this ->setShowModes (\array_unique ($ nowModes ));
7679 return $ this ;
7780 }
7881
79- public function getShowModesEnum (): array {
80- return ['code ' , 'debug_bar ' ];
81- }
82-
8382 public function setShowModes (array $ showModes ): bool {
8483 $ result = true ;
8584
0 commit comments