@@ -7,15 +7,15 @@ |
||
7 | 7 | /** |
8 | 8 | * @return string |
9 | 9 | */ |
10 | - public function getName(): string; |
|
10 | + public function getName (): string; |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * @return string |
14 | 14 | */ |
15 | - public function getPhpName(): string; |
|
15 | + public function getPhpName (): string; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @return DmsTableInterface[] |
19 | 19 | */ |
20 | - public function getDmsTables(): array; |
|
20 | + public function getDmsTables (): array; |
|
21 | 21 | } |
@@ -7,45 +7,45 @@ |
||
7 | 7 | /** |
8 | 8 | * @return string |
9 | 9 | */ |
10 | - public function getName(): string; |
|
10 | + public function getName (): string; |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * @return string |
14 | 14 | */ |
15 | - public function getPhpName(): string; |
|
15 | + public function getPhpName (): string; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @return string |
19 | 19 | */ |
20 | - public function getType(): string; |
|
20 | + public function getType (): string; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * @return string |
24 | 24 | */ |
25 | - public function getPhpType(): string; |
|
25 | + public function getPhpType (): string; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * @return bool |
29 | 29 | */ |
30 | - public function isNullable(): bool; |
|
30 | + public function isNullable (): bool; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * @return string |
34 | 34 | */ |
35 | - public function getKey(): string; |
|
35 | + public function getKey (): string; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * @return string |
39 | 39 | */ |
40 | - public function getDefault(): string; |
|
40 | + public function getDefault (): string; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * @return string |
44 | 44 | */ |
45 | - public function getPhpDefaultType(): string; |
|
45 | + public function getPhpDefaultType (): string; |
|
46 | 46 | |
47 | 47 | /** |
48 | 48 | * @return null|string |
49 | 49 | */ |
50 | - public function getExtra(): ?string; |
|
50 | + public function getExtra (): ?string; |
|
51 | 51 | } |
@@ -7,15 +7,15 @@ |
||
7 | 7 | /** |
8 | 8 | * @return string |
9 | 9 | */ |
10 | - public function getName(): string; |
|
10 | + public function getName (): string; |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * @return string |
14 | 14 | */ |
15 | - public function getPhpName(): string; |
|
15 | + public function getPhpName (): string; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @return DmsColumnInterface[] |
19 | 19 | */ |
20 | - public function getDmsColumns(): array; |
|
20 | + public function getDmsColumns (): array; |
|
21 | 21 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * |
18 | 18 | * @return string |
19 | 19 | */ |
20 | - public function generateNamespace(DmsDatabaseInterface $dmsDatabase) |
|
20 | + public function generateNamespace (DmsDatabaseInterface $dmsDatabase) |
|
21 | 21 | { |
22 | 22 | return \rtrim( |
23 | 23 | \sprintf( |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @return string |
38 | 38 | */ |
39 | - public function generateClassName(DmsTableInterface $dmsTable): string |
|
39 | + public function generateClassName (DmsTableInterface $dmsTable): string |
|
40 | 40 | { |
41 | 41 | return \implode( |
42 | 42 | '', |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * |
55 | 55 | * @return string |
56 | 56 | */ |
57 | - public function generateFQDN(DmsDatabaseInterface $dmsDatabase, DmsTableInterface $dmsTable): string |
|
57 | + public function generateFQDN (DmsDatabaseInterface $dmsDatabase, DmsTableInterface $dmsTable): string |
|
58 | 58 | { |
59 | 59 | return \sprintf('%s\\%s', $this->generateNamespace($dmsDatabase), $this->generateClassName($dmsTable)); |
60 | 60 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * |
65 | 65 | * @return string[] |
66 | 66 | */ |
67 | - public function read(DmsDatabaseInterface $dmsDatabase): array |
|
67 | + public function read (DmsDatabaseInterface $dmsDatabase): array |
|
68 | 68 | { |
69 | 69 | $fileDirectory = $this->generateFileDirectory($dmsDatabase); |
70 | 70 | $handle = @\opendir($fileDirectory); |
@@ -100,14 +100,14 @@ discard block |
||
100 | 100 | /** |
101 | 101 | * @return WriterConfigInterface |
102 | 102 | */ |
103 | - abstract protected function getWriterConfig(): WriterConfigInterface; |
|
103 | + abstract protected function getWriterConfig (): WriterConfigInterface; |
|
104 | 104 | |
105 | 105 | /** |
106 | 106 | * @param DmsDatabaseInterface $dmsDatabase |
107 | 107 | * |
108 | 108 | * @return string |
109 | 109 | */ |
110 | - protected function generateFileDirectory(DmsDatabaseInterface $dmsDatabase): string |
|
110 | + protected function generateFileDirectory (DmsDatabaseInterface $dmsDatabase): string |
|
111 | 111 | { |
112 | 112 | return \rtrim( |
113 | 113 | \implode( |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | * |
132 | 132 | * @return string |
133 | 133 | */ |
134 | - protected function generateFileName(DmsDatabaseInterface $dmsDatabase, DmsTableInterface $dmsTable): string |
|
134 | + protected function generateFileName (DmsDatabaseInterface $dmsDatabase, DmsTableInterface $dmsTable): string |
|
135 | 135 | { |
136 | 136 | return \sprintf( |
137 | 137 | '%s.php', |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | * |
156 | 156 | * @return $this |
157 | 157 | */ |
158 | - protected function writeFile(string $fileName, string $fileContent, $skipIfExists = false): AbstractWriter |
|
158 | + protected function writeFile (string $fileName, string $fileContent, $skipIfExists = false): AbstractWriter |
|
159 | 159 | { |
160 | 160 | if (true === $skipIfExists && \file_exists($fileName)) { |
161 | 161 | return $this; |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | * |
180 | 180 | * @return $this |
181 | 181 | */ |
182 | - protected function removeFileFromExistingFiles(string $fileName, array &$existingFiles): AbstractWriter |
|
182 | + protected function removeFileFromExistingFiles (string $fileName, array &$existingFiles): AbstractWriter |
|
183 | 183 | { |
184 | 184 | foreach ($existingFiles as $i => $existingFile) { |
185 | 185 | if (\basename($fileName) === \basename($existingFile)) { |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * |
18 | 18 | * @return $this |
19 | 19 | */ |
20 | - public function write( |
|
20 | + public function write ( |
|
21 | 21 | DmsDatabaseInterface $dmsDatabase, |
22 | 22 | DmsTableInterface $dmsTable, |
23 | 23 | array &$existingFiles |
@@ -28,5 +28,5 @@ discard block |
||
28 | 28 | * |
29 | 29 | * @return string[] |
30 | 30 | */ |
31 | - public function read(DmsDatabaseInterface $dmsDatabase): array; |
|
31 | + public function read (DmsDatabaseInterface $dmsDatabase): array; |
|
32 | 32 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * @return string |
29 | 29 | */ |
30 | - public function getDirectory(): string |
|
30 | + public function getDirectory (): string |
|
31 | 31 | { |
32 | 32 | return \rtrim($this->directory, DIRECTORY_SEPARATOR); |
33 | 33 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | /** |
36 | 36 | * @return null|string |
37 | 37 | */ |
38 | - public function getNamespace(): ?string |
|
38 | + public function getNamespace (): ?string |
|
39 | 39 | { |
40 | 40 | return \trim($this->namespace, '\\'); |
41 | 41 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | /** |
44 | 44 | * @return null|string |
45 | 45 | */ |
46 | - public function getClassPrefix(): ?string |
|
46 | + public function getClassPrefix (): ?string |
|
47 | 47 | { |
48 | 48 | return \mb_convert_case(\trim($this->classPrefix), MB_CASE_TITLE); |
49 | 49 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | /** |
52 | 52 | * @return null|string |
53 | 53 | */ |
54 | - public function getClassSuffix(): ?string |
|
54 | + public function getClassSuffix (): ?string |
|
55 | 55 | { |
56 | 56 | return \mb_convert_case(\trim($this->classSuffix), MB_CASE_TITLE); |
57 | 57 | } |
@@ -7,20 +7,20 @@ |
||
7 | 7 | /** |
8 | 8 | * @return string |
9 | 9 | */ |
10 | - public function getDirectory(): string; |
|
10 | + public function getDirectory (): string; |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * @return null|string |
14 | 14 | */ |
15 | - public function getNamespace(): ?string; |
|
15 | + public function getNamespace (): ?string; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @return null|string |
19 | 19 | */ |
20 | - public function getClassPrefix(): ?string; |
|
20 | + public function getClassPrefix (): ?string; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * @return null|string |
24 | 24 | */ |
25 | - public function getClassSuffix(): ?string; |
|
25 | + public function getClassSuffix (): ?string; |
|
26 | 26 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | * @param string $passwd |
14 | 14 | * @param array $options |
15 | 15 | */ |
16 | - public function __construct(string $dsn, string $username, string $passwd, array $options = []) |
|
16 | + public function __construct (string $dsn, string $username, string $passwd, array $options = []) |
|
17 | 17 | { |
18 | 18 | $options = \array_merge( |
19 | 19 | $options, |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * @return $this |
34 | 34 | * @throws ConnectionPDOException |
35 | 35 | */ |
36 | - public function beginTransaction(): Connection |
|
36 | + public function beginTransaction (): Connection |
|
37 | 37 | { |
38 | 38 | if (false === $this->inTransaction()) { |
39 | 39 | if (false === $this->parentBeginTransaction()) { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | /** |
48 | 48 | * @return $this |
49 | 49 | */ |
50 | - public function setSqlSafeUpdates(): Connection |
|
50 | + public function setSqlSafeUpdates (): Connection |
|
51 | 51 | { |
52 | 52 | $this->exec('SET SESSION SQL_SAFE_UPDATES = 1;'); |
53 | 53 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | /** |
58 | 58 | * @return $this |
59 | 59 | */ |
60 | - public function unsetSqlSafeUpdates(): Connection |
|
60 | + public function unsetSqlSafeUpdates (): Connection |
|
61 | 61 | { |
62 | 62 | $this->exec('SET SESSION SQL_SAFE_UPDATES = 0;'); |
63 | 63 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * |
72 | 72 | * @return bool |
73 | 73 | */ |
74 | - protected function parentBeginTransaction(): bool |
|
74 | + protected function parentBeginTransaction (): bool |
|
75 | 75 | { |
76 | 76 | return parent::beginTransaction(); |
77 | 77 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @param string $dbname |
16 | 16 | * @param int $port |
17 | 17 | */ |
18 | - public function __construct(string $host, string $username, string $password, string $dbname, int $port = 3306) |
|
18 | + public function __construct (string $host, string $username, string $password, string $dbname, int $port = 3306) |
|
19 | 19 | { |
20 | 20 | parent::__construct($host, $username, $password, $dbname, static::ADAPTER, $port); |
21 | 21 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | /** |
24 | 24 | * @return string |
25 | 25 | */ |
26 | - public function generateDsn(): string |
|
26 | + public function generateDsn (): string |
|
27 | 27 | { |
28 | 28 | return \sprintf( |
29 | 29 | '%s:host=%s;dbname=%s;charset=utf8mb4;port=%d', |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | /** |
38 | 38 | * @return string |
39 | 39 | */ |
40 | - public function getAdapterConnectionClass(): string |
|
40 | + public function getAdapterConnectionClass (): string |
|
41 | 41 | { |
42 | 42 | return Connection::class; |
43 | 43 | } |