Skip to content

Commit 804ec61

Browse files
authored
formatting, chore: bump dev dependency (#290)
cs fixer, array alignment
1 parent 82c2fe3 commit 804ec61

File tree

10 files changed

+88
-88
lines changed

10 files changed

+88
-88
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require-dev": {
1919
"phpunit/phpunit": "^9.6",
2020
"mockery/mockery": "^1.6",
21-
"friendsofphp/php-cs-fixer": "^3.49",
21+
"friendsofphp/php-cs-fixer": "^3.52",
2222
"phpstan/phpstan": "^1.10",
2323
"rector/rector": "^1.0"
2424
},

src/System/Integrate/Application.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ public function loadConfig(string $base_path)
200200
// check file exis
201201
$configs = $this->defaultConfigs();
202202
$paths = [
203-
'app.config.php',
204-
'database.config.php',
205-
'pusher.config.php',
206-
'cachedriver.config.php',
203+
'app.config.php',
204+
'database.config.php',
205+
'pusher.config.php',
206+
'cachedriver.config.php',
207207
];
208208
foreach ($paths as $path) {
209209
$file_path = $config_path . $path;

src/System/Integrate/Console/CronCommand.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ class CronCommand extends Command
4040
public function printHelp()
4141
{
4242
return [
43-
'commands' => [
44-
'cron' => 'Run cron job (all shadule)',
45-
'cron:work' => 'Run virtual cron job in terminal (ansync)',
46-
'cron:list' => 'Get list of shadule',
47-
],
48-
'options' => [],
49-
'relation' => [],
43+
'commands' => [
44+
'cron' => 'Run cron job (all shadule)',
45+
'cron:work' => 'Run virtual cron job in terminal (ansync)',
46+
'cron:list' => 'Get list of shadule',
47+
],
48+
'options' => [],
49+
'relation' => [],
5050
];
5151
}
5252

src/System/Integrate/Console/HelpCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public function printHelp()
6464
];
6565
}
6666

67-
protected string $banner =
68-
' _ _ _
67+
protected string $banner ='
68+
_ _ _
6969
___| |_ ___ ___| |_|
7070
| . | | . | | _| | |
7171
| _|_|_| _| |___|_|_|

src/System/Integrate/Console/MigrationCommand.php

+33-33
Original file line numberDiff line numberDiff line change
@@ -76,36 +76,36 @@ class MigrationCommand extends Command
7676
public function printHelp()
7777
{
7878
return [
79-
'commands' => [
80-
'migrate' => 'Run migration (up)',
81-
'migrate:fresh' => 'Drop database and run migrations',
82-
'migrate:reset' => 'Rolling back all migrations (down)',
83-
'migrate:refresh' => 'Rolling back and run migration all',
84-
'migrate:rollback' => 'Rolling back last migrations (down)',
85-
'migrate:init' => 'Initialize migartion table',
86-
'migrate:status' => 'Show migartion status.',
87-
'database:create' => 'Create database',
88-
'database:drop' => 'Drop database',
89-
'database:show' => 'Show database table',
90-
],
91-
'options' => [
92-
'--take' => 'Number of migrations to be run.',
93-
'--batch' => 'Batch migration excution.',
94-
'--dry-run' => 'Excute migration but olny get query output.',
95-
'--force' => 'Force runing migration/database query in production.',
96-
'--seed' => 'Run seeder after migration.',
97-
'--seed-namespace' => 'Run seeder after migration using class namespace.',
98-
'--yes' => 'Accept it without having it ask any questions',
99-
],
100-
'relation' => [
101-
'migrate' => ['--take', '--seed', '--dry-run', '--force'],
102-
'migrate:fresh' => ['--seed', '--dry-run', '--force'],
103-
'migrate:reset' => ['--dry-run', '--force'],
104-
'migrate:refresh' => ['--seed', '--dry-run', '--force'],
105-
'migrate:rollback' => ['--batch', '--take', '--dry-run', '--force'],
106-
'database:create' => ['--force'],
107-
'database:drop' => ['--force'],
108-
],
79+
'commands' => [
80+
'migrate' => 'Run migration (up)',
81+
'migrate:fresh' => 'Drop database and run migrations',
82+
'migrate:reset' => 'Rolling back all migrations (down)',
83+
'migrate:refresh' => 'Rolling back and run migration all',
84+
'migrate:rollback' => 'Rolling back last migrations (down)',
85+
'migrate:init' => 'Initialize migartion table',
86+
'migrate:status' => 'Show migartion status.',
87+
'database:create' => 'Create database',
88+
'database:drop' => 'Drop database',
89+
'database:show' => 'Show database table',
90+
],
91+
'options' => [
92+
'--take' => 'Number of migrations to be run.',
93+
'--batch' => 'Batch migration excution.',
94+
'--dry-run' => 'Excute migration but olny get query output.',
95+
'--force' => 'Force runing migration/database query in production.',
96+
'--seed' => 'Run seeder after migration.',
97+
'--seed-namespace' => 'Run seeder after migration using class namespace.',
98+
'--yes' => 'Accept it without having it ask any questions',
99+
],
100+
'relation' => [
101+
'migrate' => ['--take', '--seed', '--dry-run', '--force'],
102+
'migrate:fresh' => ['--seed', '--dry-run', '--force'],
103+
'migrate:reset' => ['--dry-run', '--force'],
104+
'migrate:refresh' => ['--seed', '--dry-run', '--force'],
105+
'migrate:rollback' => ['--batch', '--take', '--dry-run', '--force'],
106+
'database:create' => ['--force'],
107+
'database:drop' => ['--force'],
108+
],
109109
];
110110
}
111111

@@ -122,9 +122,9 @@ private function runInDev(): bool
122122

123123
/* @var bool */
124124
return (new Prompt(style('Runing migration/database in production?')->textRed(), [
125-
'yes' => fn () => true,
126-
'no' => fn () => false,
127-
], 'no'))
125+
'yes' => fn () => true,
126+
'no' => fn () => false,
127+
], 'no'))
128128
->selection([
129129
style('yes')->textDim(),
130130
' no',

src/System/Integrate/Console/RouteCommand.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ class RouteCommand extends Command
3636
public function printHelp()
3737
{
3838
return [
39-
'commands' => [
40-
'route:list' => 'Get route list information',
41-
],
42-
'options' => [],
43-
'relation' => [],
39+
'commands' => [
40+
'route:list' => 'Get route list information',
41+
],
42+
'options' => [],
43+
'relation' => [],
4444
];
4545
}
4646

src/System/Integrate/Console/SeedCommand.php

+14-14
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ class SeedCommand extends Command
4545
public function printHelp(): array
4646
{
4747
return [
48-
'commands' => [
49-
'db:seed' => 'Run seeding',
50-
'make:seed' => 'Create new seeder class',
51-
],
52-
'options' => [
53-
'--class' => 'Target class (will add `Database\\Seeders\\`)',
54-
'--name-space' => 'Target class with full namespace',
55-
],
56-
'relation' => [
57-
'db:seed' => ['--class', '--name-space'],
58-
],
48+
'commands' => [
49+
'db:seed' => 'Run seeding',
50+
'make:seed' => 'Create new seeder class',
51+
],
52+
'options' => [
53+
'--class' => 'Target class (will add `Database\\Seeders\\`)',
54+
'--name-space' => 'Target class with full namespace',
55+
],
56+
'relation' => [
57+
'db:seed' => ['--class', '--name-space'],
58+
],
5959
];
6060
}
6161

@@ -67,9 +67,9 @@ private function runInDev(): bool
6767

6868
/* @var bool */
6969
return (new Prompt(style('Runing seeder in production?')->textRed(), [
70-
'yes' => fn () => true,
71-
'no' => fn () => false,
72-
], 'no'))
70+
'yes' => fn () => true,
71+
'no' => fn () => false,
72+
], 'no'))
7373
->selection([
7474
style('yes')->textDim(),
7575
' no',

tests/DataBase/Query/Schema/Table/CreateTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ public function itCanGenerateQueryUsingColumns()
8585
{
8686
$schema = new Create('testing_db', 'test', $this->pdo_schame);
8787
$schema->collumns([
88-
(new Column())->raw('PersonID int'),
89-
(new Column())->raw('LastName varchar(255)'),
88+
(new Column())->raw('PersonID int'),
89+
(new Column())->raw('LastName varchar(255)'),
9090
]);
9191
$schema->primaryKey('PersonID');
9292

tests/Http/ResponseTest.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ protected function setUp(): void
2020
{
2121
$html = '<html><head></head><body></body></html>';
2222
$json = [
23-
'status' => 'ok',
24-
'code' => 200,
25-
'data' => null,
26-
];
23+
'status' => 'ok',
24+
'code' => 200,
25+
'data' => null,
26+
];
2727

2828
$this->response_html = new Response($html, 200, []);
2929
$this->response_json = new Response($json, 200, []);
@@ -56,9 +56,9 @@ public function itRenderJsonResponse()
5656
$this->assertJson($json);
5757
$this->assertEquals(
5858
[
59-
'status' => 'ok',
60-
'code' => 200,
61-
'data' => null,
59+
'status' => 'ok',
60+
'code' => 200,
61+
'data' => null,
6262
],
6363
json_decode($json, true)
6464
);

tests/Template/BasicTemplateTest.php

+13-13
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public function itCanGenerateClassWithTraitPropertyAndMethod()
5151
->extend(TestCase::class)
5252
->implement('testInterface')
5353
->traits([
54-
PhpParser\Builder\TraitUseAdaptation::class,
55-
PhpParser\Builder\TraitUse::class,
54+
PhpParser\Builder\TraitUseAdaptation::class,
55+
PhpParser\Builder\TraitUse::class,
5656
])
5757
->consts(NewConst::name('TEST'))
5858
->propertys(NewProperty::name('test'))
@@ -80,8 +80,8 @@ public function itCanGenerateClassWithTraitPropertyAndMethodFromTemplate()
8080
->extend(TestCase::class)
8181
->implement('testInterface')
8282
->traits([
83-
PhpParser\Builder\TraitUseAdaptation::class,
84-
PhpParser\Builder\TraitUse::class,
83+
PhpParser\Builder\TraitUseAdaptation::class,
84+
PhpParser\Builder\TraitUse::class,
8585
])
8686
->consts(NewConst::name('TEST'))
8787
->propertys(NewProperty::name('test'))
@@ -127,12 +127,12 @@ public function itCanGenerateClassWithComplexPropertys()
127127
->dataType('array')
128128
->expecting(
129129
[
130-
'= array(',
131-
' \'one\' => 1,',
132-
' \'two\' => 2,',
133-
' \'bool\' => false,',
134-
' \'string\' => \'string\'',
135-
')',
130+
'= array(',
131+
' \'one\' => 1,',
132+
' \'two\' => 2,',
133+
' \'bool\' => false,',
134+
' \'string\' => \'string\'',
135+
')',
136136
]
137137
)
138138
->addVaribaleComment('array');
@@ -193,8 +193,8 @@ public function itCanGenerateClassWithComplexMethods()
193193
->params(['string $case', 'int $number'])
194194
->setReturnType('bool')
195195
->body([
196-
'$bool = true;',
197-
'return $bool;',
196+
'$bool = true;',
197+
'return $bool;',
198198
])
199199
->addReturnComment('bool', 'true if true');
200200

@@ -207,7 +207,7 @@ public function itCanGenerateClassWithComplexMethods()
207207
->params(['string $param'])
208208
->setReturnType('string')
209209
->body([
210-
'return $param;',
210+
'return $param;',
211211
])
212212
->addParamComment('string', '$param', 'String param')
213213
->addReturnComment('string', 'Same as param')

0 commit comments

Comments
 (0)