Issues (37)

demo/demo.askpassword.php (1 issue)

Severity
1
<?php
2
require_once __DIR__ .'/../vendor/autoload.php';
3
use Kristuff\Mishell\Console;  
4
5
Console::log(' '. Console::text('Overview:', 'underlined', 'bold'));
6
Console::log('  Use ' .   Console::text("string ", 'blue'). Console::text("Console::askPassword()", 'lightblue', 'underlined') . " to ask user to enter a value and return this value.", 'white');
7
Console::log();
8
Console::log(' '. Console::text('Tips:', 'underlined', 'bold'));
9
Console::log("   - You can customize colors (foreground and background) and some styles in same way than ");
10
Console::log('     with ' . Console::text("Console::text()", 'lightblue', 'underlined') . 
11
                 ' and ' .  Console::text("Console::log()", 'lightblue', 'underlined'). ' methods.');
12
Console::log();
13
Console::log(' '. Console::text('Warning:', 'underlined', 'bold'));
14
Console::log('    '. Console::text("User input are not hidden on windows platform (not supported)", 'red', 'yellow'));
15
Console::log();
16
Console::log(' '. Console::text('Usage:', 'underlined', 'bold'));
17
Console::log('   ' . Console::text("\$value = Console::askPassword('Please Enter something (We wont display it, for now...)  > ');", 'lightmagenta')); 
18
Console::log('   ' . Console::text("Console::log();", 'lightmagenta')); 
19
Console::log('   ' . Console::text("Console::log('=> the value you entered is [' . Console::text(\$value, 'red') . ']');", 'lightmagenta')); 
20
Console::log();
21
Console::log(' '. Console::text('Sample:', 'underlined', 'bold'));
22
23
// -----------------
24
// sample start here
25
// -----------------
26
$value = Console::askPassword(' Please Enter something (We wont display it, for now... (except on windows)  > ');
27
Console::log();
28
Console::log(' => the value you entered is [' . Console::text($value, 'red') . ']');
29
30
?>
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...