Issues (37)

demo/demo.window.php (1 issue)

Severity
1
<?php
2
require_once __DIR__ .'/../vendor/autoload.php';
3
use Kristuff\Mishell\Console;  
4
5
Console::log(' Let say we are current window.');
6
Console::log(' We will open a new window using ' . Console::text('Console::newWindow()', 'lightblue', 'underlined') . ' method.');
7
Console::ask(' Press [Enter] to open new window > ');
8
9
// ------------------
10
// *open* new window
11
// ------------------
12
Console::newWindow();
13
14
Console::log();
15
Console::log(' _____________________________', 'green');
16
Console::log('                              ', 'green');
17
Console::log('          NEW WINDOW 1        ', 'green');
18
Console::log(' _____________________________', 'green');
19
Console::log();
20
Console::log(' I am in new window. We will restore the window later using ' .  Console::text('Console::restoreWindow()', 'lightblue', 'underlined') . ' method.' );
21
Console::ask(' Press [Enter] to restore >');
22
23
// ------------------
24
// restore new window
25
// ------------------
26
Console::restoreWindow();
27
28
Console::log(' We have now restored the current window using ' . Console::text('Console::restoreWindow()', 'lightblue', 'underlined') . ' method');
29
Console::log(' We will reopen a new window using ' . Console::text('Console::newWindow()', 'lightblue', 'underlined') . ' method.');
30
Console::ask(' Press [Enter] to open new window > ');
31
32
// ------------------
33
// *open* new window
34
// ------------------
35
Console::newWindow();
36
37
Console::log();
38
Console::log(' _____________________________', 'yellow');
39
Console::log('                              ', 'yellow');
40
Console::log('          NEW WINDOW 2        ', 'yellow');
41
Console::log(' _____________________________', 'yellow');
42
Console::log();
43
Console::log(' I am in new window. We will restore the window later using ' .  Console::text('Console::restoreWindow()', 'lightblue', 'underlined') . ' method.' );
44
Console::ask(' Press [Enter] to restore >');
45
46
// ------------------
47
// restore new window
48
// ------------------
49
Console::restoreWindow();
50
Console::log(' We have now restored the current window using ' .  Console::text('Console::restoreWindow()', 'lightblue', 'underlined') . ' method. That\'s all.');
51
Console::log(' Got it'. Console::text('?', 'green'));
52
53
?>
0 ignored issues
show
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
54