Skip to content

Commit 5fc0849

Browse files
committed
docs: fix incorrect global classname in sample code
1 parent 123f378 commit 5fc0849

58 files changed

Lines changed: 194 additions & 72 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<?php
22

3-
$color = \CLI::prompt('What is your favorite color?');
3+
use CodeIgniter\CLI\CLI;
4+
5+
$color = CLI::prompt('What is your favorite color?');
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<?php
22

3-
$color = \CLI::prompt('What is your favorite color?', 'blue');
3+
use CodeIgniter\CLI\CLI;
4+
5+
$color = CLI::prompt('What is your favorite color?', 'blue');
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<?php
22

3-
$overwrite = \CLI::prompt('File exists. Overwrite?', ['y', 'n']);
3+
use CodeIgniter\CLI\CLI;
4+
5+
$overwrite = CLI::prompt('File exists. Overwrite?', ['y', 'n']);
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<?php
22

3-
$email = \CLI::prompt('What is your email?', null, 'required|valid_email');
3+
use CodeIgniter\CLI\CLI;
4+
5+
$email = CLI::prompt('What is your email?', null, 'required|valid_email');
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<?php
22

3-
$email = \CLI::prompt('What is your email?', null, ['required', 'valid_email']);
3+
use CodeIgniter\CLI\CLI;
4+
5+
$email = CLI::prompt('What is your email?', null, ['required', 'valid_email']);

user_guide_src/source/cli/cli_library/007.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

3-
$fruit = \CLI::promptByKey('These are your choices:', ['The red apple', 'The plump orange', 'The ripe banana']);
3+
use CodeIgniter\CLI\CLI;
4+
5+
$fruit = CLI::promptByKey('These are your choices:', ['The red apple', 'The plump orange', 'The ripe banana']);
46
/*
57
* These are your choices:
68
* [0] The red apple

user_guide_src/source/cli/cli_library/008.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

3-
$fruit = \CLI::promptByKey(['These are your choices:', 'Which would you like?'], [
3+
use CodeIgniter\CLI\CLI;
4+
5+
$fruit = CLI::promptByKey(['These are your choices:', 'Which would you like?'], [
46
'apple' => 'The red apple',
57
'orange' => 'The plump orange',
68
'banana' => 'The ripe banana',
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<?php
22

3-
\CLI::write('The rain in Spain falls mainly on the plains.');
3+
use CodeIgniter\CLI\CLI;
4+
5+
CLI::write('The rain in Spain falls mainly on the plains.');
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<?php
22

3-
\CLI::write('File created.', 'green');
3+
use CodeIgniter\CLI\CLI;
4+
5+
CLI::write('File created.', 'green');
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<?php
22

3-
\CLI::write('File overwritten.', 'light_red', 'dark_gray');
3+
use CodeIgniter\CLI\CLI;
4+
5+
CLI::write('File overwritten.', 'light_red', 'dark_gray');

0 commit comments

Comments
 (0)