Skip to content

Commit b4262b0

Browse files
committed
fixed: Code style fix
1 parent 44db2ae commit b4262b0

File tree

102 files changed

+156
-118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+156
-118
lines changed

example/code/image.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
use Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Connection\ConnectionCollection;
46
use Pongee\DatabaseSchemaVisualization\Export\Plantuml;

example/code/json.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
use Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Connection\ConnectionCollection;
46
use Pongee\DatabaseSchemaVisualization\Export\Json;

example/code/plantuml.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
use Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Connection\ConnectionCollection;
46
use Pongee\DatabaseSchemaVisualization\Export\Plantuml;

phpcs.xml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
<?xml version="1.0"?>
22
<ruleset>
3-
<config name="testVersion" value="7.1-"/>
43
<arg name="colors"/>
54

65
<file>src</file>
76
<file>test</file>
7+
<file>example</file>
88

9-
<rule ref="PSR2"/>
10-
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"/>
11-
12-
<config name="installed_paths" value="../../slevomat/coding-standard"/>
13-
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
14-
</rule>
15-
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
16-
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"/>
9+
<rule ref="PSR12"></rule>
1710
</ruleset>

rector.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
use Rector\Config\RectorConfig;
5+
use Rector\Php80\Rector\Catch_\RemoveUnusedVariableInCatchRector;
6+
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
7+
use Rector\Php81\Rector\Array_\FirstClassCallableRector;
8+
use Rector\Php81\Rector\Class_\MyCLabsClassToEnumRector;
9+
use Rector\Php81\Rector\Class_\SpatieEnumClassToEnumRector;
10+
use Rector\Php81\Rector\ClassMethod\NewInInitializerRector;
11+
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
12+
use Rector\Php81\Rector\MethodCall\MyCLabsMethodCallToEnumConstRector;
13+
use Rector\Php81\Rector\MethodCall\SpatieEnumMethodCallToEnumConstRector;
14+
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
15+
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector;
16+
17+
return static function (RectorConfig $rectorConfig): void {
18+
// register single rule
19+
$rectorConfig->rule(ReadOnlyPropertyRector::class);
20+
//$rectorConfig->rule(NewInInitializerRector::class);
21+
$rectorConfig->rule(ClassPropertyAssignToConstructorPromotionRector::class);
22+
$rectorConfig->rule(RemoveUnusedVariableInCatchRector::class);
23+
$rectorConfig->rule(MyCLabsMethodCallToEnumConstRector::class);
24+
$rectorConfig->rule(SpatieEnumMethodCallToEnumConstRector::class);
25+
$rectorConfig->rule(NullToStrictStringFuncCallArgRector::class);
26+
$rectorConfig->rule(ReadOnlyPropertyRector::class);
27+
$rectorConfig->rule(FirstClassCallableRector::class);
28+
$rectorConfig->rule(SpatieEnumClassToEnumRector::class);
29+
$rectorConfig->rule(MyCLabsClassToEnumRector::class);
30+
$rectorConfig->rule(NewInInitializerRector::class);
31+
$rectorConfig->rule(ReturnNeverTypeRector::class);
32+
};

src/Command/Mysql/MysqlCommandAbstract.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\Command\Mysql;
66

@@ -103,7 +103,8 @@ protected function getForcedConnections(array $connections): ConnectionCollectio
103103
$
104104
#x', (string) $connection, $matches);
105105

106-
if (!empty($matches['childTableName'])
106+
if (
107+
!empty($matches['childTableName'])
107108
&& !empty($matches['childTableColumns'])
108109
&& !empty($matches['parentTableName'])
109110
&& !empty($matches['parentTableColumns'])

src/Command/Mysql/MysqlImageCommand.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\Command\Mysql;
66

src/Command/Mysql/MysqlJsonCommand.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\Command\Mysql;
66

src/Command/Mysql/MysqlPlantumlCommand.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\Command\Mysql;
66

src/DataObject/Sql/Database/Connection/ConnectionAbstract.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Connection;
66

src/DataObject/Sql/Database/Connection/ConnectionCollection.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Connection;
66

src/DataObject/Sql/Database/Connection/ConnectionCollectionInterface.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Connection;
66

src/DataObject/Sql/Database/Connection/ConnectionInterface.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Connection;
66

src/DataObject/Sql/Database/Connection/ConnectionIterator.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Connection;
66

src/DataObject/Sql/Database/Connection/NotDefinedConnection.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Connection;
66

src/DataObject/Sql/Database/Connection/OneToManyConnection.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Connection;
66

src/DataObject/Sql/Database/Connection/OneToOneConnection.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Connection;
66

src/DataObject/Sql/Database/Table.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database;
66

src/DataObject/Sql/Database/Table/Column.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table;
66

src/DataObject/Sql/Database/Table/ColumnCollection.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table;
66

src/DataObject/Sql/Database/Table/ColumnCollectionInterface.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table;
66

src/DataObject/Sql/Database/Table/ColumnInterface.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table;
66

src/DataObject/Sql/Database/Table/ColumnIterator.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table;
66

src/DataObject/Sql/Database/Table/Index/FulltextIndex.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/FulltextIndexCollection.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/FulltextIndexCollectionInterface.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/FulltextIndexInterface.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/FulltextIndexIterator.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/IndexAbstract.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/IndexInterface.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/NamedIndexAbstract.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/NamedIndexInterface.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/PrimaryKey.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/PrimaryKeyInterface.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/SimpleIndex.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/SimpleIndexCollection.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/SimpleIndexCollectionInterface.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/SimpleIndexInterface.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/SimpleIndexIterator.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/SpatialIndex.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/SpatialIndexCollection.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/SpatialIndexCollectionInterface.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/SpatialIndexInterface.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

src/DataObject/Sql/Database/Table/Index/SpatialIndexIterator.php

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

3-
declare(strict_types = 1);
3+
declare(strict_types=1);
44

55
namespace Pongee\DatabaseSchemaVisualization\DataObject\Sql\Database\Table\Index;
66

0 commit comments

Comments
 (0)