-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8400 from kenjis/style-cs-fixer-3.46.0
style: update coding style with php-cs-fixer 3.46.0
- Loading branch information
Showing
87 changed files
with
220 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$color = CLI::prompt('What is your favorite color?'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$color = CLI::prompt('What is your favorite color?', 'blue'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$overwrite = CLI::prompt('File exists. Overwrite?', ['y', 'n']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$email = CLI::prompt('What is your email?', null, 'required|valid_email'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$email = CLI::prompt('What is your email?', null, ['required', 'valid_email']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::write('The rain in Spain falls mainly on the plains.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::write('File created.', 'green'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::write('File overwritten.', 'light_red', 'dark_gray'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
for ($i = 0; $i <= 10; $i++) { | ||
CLI::print($i); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::write("fileA \t" . CLI::color('/path/to/file', 'white'), 'yellow'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::error('Cannot write to file: ' . $file); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::color("task1\t", 'yellow'); | ||
CLI::wrap('Some long description goes here that might be longer than the current window.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
// Wrap the text at max 20 characters wide | ||
CLI::wrap($description, 20); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$titles = [ | ||
'task1a', | ||
'task1abc', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::newLine(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
CLI::clearScreen(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
use CodeIgniter\CLI\CLI; | ||
|
||
$totalSteps = count($tasks); | ||
$currStep = 1; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
use CodeIgniter\Config\Factories; | ||
|
||
$users = Factories::models('Blog\Models\UserModel'); | ||
// Or | ||
$users = Factories::models(\Blog\Models\UserModel::class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<?php | ||
|
||
use CodeIgniter\Config\Factories; | ||
|
||
$conn = db_connect('auth'); | ||
$users = Factories::models('UserModel', [], $conn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<?php | ||
|
||
use CodeIgniter\Config\Factories; | ||
|
||
$users = Factories::models('UserModel', ['getShared' => true]); // Default; will always be the same instance | ||
$other = Factories::models('UserModel', ['getShared' => false]); // Will always create a new instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\Config\Factories; | ||
|
||
$users = Factories::models('Blog\Models\UserModel', ['preferApp' => false]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\Config\Factories; | ||
|
||
$lib = Factories::libraries('Sub/SubLib'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?php | ||
|
||
use CodeIgniter\Config\Factories; | ||
|
||
Factories::define('models', 'Myth\Auth\Models\UserModel', 'App\Models\UserModel'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
<?php | ||
|
||
class Myclass | ||
namespace App\Libraries; | ||
|
||
class MyClass | ||
{ | ||
public $title = 'My Title'; | ||
public $content = 'My Content'; | ||
public $date = 'My Date'; | ||
} | ||
|
||
$object = new Myclass(); | ||
$builder->insert($object); | ||
// Produces: INSERT INTO mytable (title, content, date) VALUES ('My Title', 'My Content', 'My Date') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
<?php | ||
|
||
class Myclass | ||
{ | ||
public $title = 'My Title'; | ||
public $content = 'My Content'; | ||
public $date = 'My Date'; | ||
} | ||
use App\Libraries\MyClass; | ||
|
||
$object = new Myclass(); | ||
$object = new MyClass(); | ||
$builder->set($object); | ||
$builder->insert(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
<?php | ||
|
||
class Myclass | ||
{ | ||
public $title = 'My Title'; | ||
public $content = 'My Content'; | ||
public $date = 'My Date'; | ||
} | ||
use App\Libraries\MyClass; | ||
|
||
$object = new Myclass(); | ||
$object = new MyClass(); | ||
$builder->where('id', $id); | ||
$builder->update($object); | ||
/* | ||
* Produces: | ||
* UPDATE `mytable` | ||
* SET `title` = '{$title}', `name` = '{$name}', `date` = '{$date}' | ||
* SET `title` = '{$title}', `content` = '{$content}', `date` = '{$date}' | ||
* WHERE id = `$id` | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
use CodeIgniter\Database\RawSql; | ||
|
||
$data = [ | ||
[ | ||
'id' => 2, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
<?php | ||
|
||
class Myclass | ||
{ | ||
public $email = '[email protected]'; | ||
public $name = 'Ahmadinejad'; | ||
public $country = 'Iran'; | ||
} | ||
use App\Libraries\MyClass; | ||
|
||
$object = new Myclass(); | ||
$object = new MyClass(); | ||
$builder->upsert($object); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
use App\Libraries\MyClass; | ||
|
||
$object = new MyClass(); | ||
$builder->insert($object); | ||
// Produces: INSERT INTO mytable (title, content, date) VALUES ('My Title', 'My Content', 'My Date') |
Oops, something went wrong.