Code Duplication    Length = 31-36 lines in 2 locations

src/kint/KintBootup.php 2 locations

@@ 109-144 (lines=36) @@
106
      }
107
    }
108
109
    if (!function_exists('s')) {
110
      /**
111
       * Alias of Kint::dump(), however the output is in plain html-escaped text and some minor visibility enhancements
112
       * added. If run in CLI mode, output is pure whitespace.
113
       *
114
       * To force rendering mode without auto-detecting anything:
115
       *
116
       *  Kint::enabled( Kint::MODE_PLAIN );
117
       *  Kint::dump( $variable );
118
       *
119
       * [!!!] IMPORTANT: execution will halt after call to this function
120
       *
121
       * @return string
122
       */
123
      function s()
124
      {
125
        if (!Kint::enabled()) {
126
          return '';
127
        }
128
129
        $stash = Kint::settings();
130
131
        if (Kint::enabled() !== Kint::MODE_WHITESPACE) {
132
          Kint::enabled(Kint::MODE_PLAIN);
133
          if (PHP_SAPI === 'cli' && Kint::$cliDetection === true) {
134
            Kint::enabled(Kint::MODE_CLI);
135
          }
136
        }
137
138
        $out = call_user_func_array(array('kint\Kint', 'dump'), func_get_args());
139
140
        Kint::settings($stash);
141
142
        return $out;
143
      }
144
    }
145
146
    if (!function_exists('sd')) {
147
      /**
@@ 172-202 (lines=31) @@
169
      }
170
    }
171
172
    if (!function_exists('se')) {
173
      /**
174
       * @see s()
175
       * @see de()
176
       *
177
       * @return string
178
       */
179
      function se()
180
      {
181
        if (!Kint::enabled()) {
182
          return '';
183
        }
184
185
        $stash = Kint::settings();
186
187
        Kint::$delayedMode = true;
188
189
        if (Kint::enabled() !== Kint::MODE_WHITESPACE) {
190
          Kint::enabled(Kint::MODE_PLAIN);
191
          if (PHP_SAPI === 'cli' && Kint::$cliDetection === true) {
192
            Kint::enabled(Kint::MODE_CLI);
193
          }
194
        }
195
196
        $out = call_user_func_array(array('kint\Kint', 'dump'), func_get_args());
197
198
        Kint::settings($stash);
199
200
        return $out;
201
      }
202
    }
203
204
    if (!function_exists('j')) {
205
      /**