@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | { |
62 | 62 | } |
63 | 63 | |
64 | - public function getShare(int $id, ?string $user = null): array|false |
|
64 | + public function getShare(int $id, ?string $user = null): array | false |
|
65 | 65 | { |
66 | 66 | } |
67 | 67 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @param string $token |
72 | 72 | * @return array|false |
73 | 73 | */ |
74 | - public function getShareByToken(string $token): array|false |
|
74 | + public function getShareByToken(string $token): array | false |
|
75 | 75 | { |
76 | 76 | } |
77 | 77 |
@@ -16,65 +16,65 @@ |
||
16 | 16 | /** @psalm-immutable */ |
17 | 17 | class Exception extends \Exception |
18 | 18 | { |
19 | - public static function notSupported(string $method): self |
|
20 | - { |
|
21 | - } |
|
22 | - |
|
23 | - /** @param mixed $invalidPlatform */ |
|
24 | - public static function invalidPlatformType($invalidPlatform): self |
|
25 | - { |
|
26 | - } |
|
27 | - |
|
28 | - /** |
|
29 | - * Returns a new instance for an invalid specified platform version. |
|
30 | - * |
|
31 | - * @param string $version The invalid platform version given. |
|
32 | - * @param string $expectedFormat The expected platform version format. |
|
33 | - */ |
|
34 | - public static function invalidPlatformVersionSpecified(string $version, string $expectedFormat): self |
|
35 | - { |
|
36 | - } |
|
37 | - |
|
38 | - /** @param string|null $url The URL that was provided in the connection parameters (if any). */ |
|
39 | - public static function driverRequired(#[SensitiveParameter] |
|
40 | - ?string $url = null): self |
|
41 | - { |
|
42 | - } |
|
43 | - |
|
44 | - /** @param string[] $knownDrivers */ |
|
45 | - public static function unknownDriver(string $unknownDriverName, array $knownDrivers): self |
|
46 | - { |
|
47 | - } |
|
48 | - |
|
49 | - public static function invalidWrapperClass(string $wrapperClass): self |
|
50 | - { |
|
51 | - } |
|
52 | - |
|
53 | - public static function invalidDriverClass(string $driverClass): self |
|
54 | - { |
|
55 | - } |
|
56 | - |
|
57 | - public static function noColumnsSpecifiedForTable(string $tableName): self |
|
58 | - { |
|
59 | - } |
|
60 | - |
|
61 | - public static function typeExists(string $name): self |
|
62 | - { |
|
63 | - } |
|
64 | - |
|
65 | - public static function unknownColumnType(string $name): self |
|
66 | - { |
|
67 | - } |
|
68 | - |
|
69 | - public static function typeNotFound(string $name): self |
|
70 | - { |
|
71 | - } |
|
72 | - |
|
73 | - public static function typeNotRegistered(Type $type): self |
|
74 | - { |
|
75 | - } |
|
76 | - |
|
77 | - public static function typeAlreadyRegistered(Type $type): self |
|
78 | - { |
|
79 | - } |
|
19 | + public static function notSupported(string $method): self |
|
20 | + { |
|
21 | + } |
|
22 | + |
|
23 | + /** @param mixed $invalidPlatform */ |
|
24 | + public static function invalidPlatformType($invalidPlatform): self |
|
25 | + { |
|
26 | + } |
|
27 | + |
|
28 | + /** |
|
29 | + * Returns a new instance for an invalid specified platform version. |
|
30 | + * |
|
31 | + * @param string $version The invalid platform version given. |
|
32 | + * @param string $expectedFormat The expected platform version format. |
|
33 | + */ |
|
34 | + public static function invalidPlatformVersionSpecified(string $version, string $expectedFormat): self |
|
35 | + { |
|
36 | + } |
|
37 | + |
|
38 | + /** @param string|null $url The URL that was provided in the connection parameters (if any). */ |
|
39 | + public static function driverRequired(#[SensitiveParameter] |
|
40 | + ?string $url = null): self |
|
41 | + { |
|
42 | + } |
|
43 | + |
|
44 | + /** @param string[] $knownDrivers */ |
|
45 | + public static function unknownDriver(string $unknownDriverName, array $knownDrivers): self |
|
46 | + { |
|
47 | + } |
|
48 | + |
|
49 | + public static function invalidWrapperClass(string $wrapperClass): self |
|
50 | + { |
|
51 | + } |
|
52 | + |
|
53 | + public static function invalidDriverClass(string $driverClass): self |
|
54 | + { |
|
55 | + } |
|
56 | + |
|
57 | + public static function noColumnsSpecifiedForTable(string $tableName): self |
|
58 | + { |
|
59 | + } |
|
60 | + |
|
61 | + public static function typeExists(string $name): self |
|
62 | + { |
|
63 | + } |
|
64 | + |
|
65 | + public static function unknownColumnType(string $name): self |
|
66 | + { |
|
67 | + } |
|
68 | + |
|
69 | + public static function typeNotFound(string $name): self |
|
70 | + { |
|
71 | + } |
|
72 | + |
|
73 | + public static function typeNotRegistered(Type $type): self |
|
74 | + { |
|
75 | + } |
|
76 | + |
|
77 | + public static function typeAlreadyRegistered(Type $type): self |
|
78 | + { |
|
79 | + } |
|
80 | 80 | } |
@@ -15,195 +15,195 @@ |
||
15 | 15 | |
16 | 16 | class Index extends AbstractAsset implements Constraint |
17 | 17 | { |
18 | - /** |
|
19 | - * Asset identifier instances of the column names the index is associated with. |
|
20 | - * array($columnName => Identifier) |
|
21 | - * |
|
22 | - * @var Identifier[] |
|
23 | - */ |
|
24 | - protected $_columns = []; |
|
25 | - |
|
26 | - /** @var bool */ |
|
27 | - protected $_isUnique = false; |
|
28 | - |
|
29 | - /** @var bool */ |
|
30 | - protected $_isPrimary = false; |
|
31 | - |
|
32 | - /** |
|
33 | - * Platform specific flags for indexes. |
|
34 | - * array($flagName => true) |
|
35 | - * |
|
36 | - * @var true[] |
|
37 | - */ |
|
38 | - protected $_flags = []; |
|
39 | - |
|
40 | - /** |
|
41 | - * @param string $name |
|
42 | - * @param string[] $columns |
|
43 | - * @param bool $isUnique |
|
44 | - * @param bool $isPrimary |
|
45 | - * @param string[] $flags |
|
46 | - * @param mixed[] $options |
|
47 | - */ |
|
48 | - public function __construct($name, array $columns, $isUnique = false, $isPrimary = false, array $flags = [], array $options = []) |
|
49 | - { |
|
50 | - } |
|
51 | - |
|
52 | - /** @throws InvalidArgumentException */ |
|
53 | - protected function _addColumn(string $column): void |
|
54 | - { |
|
55 | - } |
|
56 | - |
|
57 | - /** |
|
58 | - * {@inheritDoc} |
|
59 | - */ |
|
60 | - public function getColumns() |
|
61 | - { |
|
62 | - } |
|
63 | - |
|
64 | - /** |
|
65 | - * {@inheritDoc} |
|
66 | - */ |
|
67 | - public function getQuotedColumns(AbstractPlatform $platform) |
|
68 | - { |
|
69 | - } |
|
70 | - |
|
71 | - /** @return string[] */ |
|
72 | - public function getUnquotedColumns() |
|
73 | - { |
|
74 | - } |
|
75 | - |
|
76 | - /** |
|
77 | - * Is the index neither unique nor primary key? |
|
78 | - * |
|
79 | - * @return bool |
|
80 | - */ |
|
81 | - public function isSimpleIndex() |
|
82 | - { |
|
83 | - } |
|
84 | - |
|
85 | - /** @return bool */ |
|
86 | - public function isUnique() |
|
87 | - { |
|
88 | - } |
|
89 | - |
|
90 | - /** @return bool */ |
|
91 | - public function isPrimary() |
|
92 | - { |
|
93 | - } |
|
94 | - |
|
95 | - /** |
|
96 | - * @param string $name |
|
97 | - * @param int $pos |
|
98 | - * |
|
99 | - * @return bool |
|
100 | - */ |
|
101 | - public function hasColumnAtPosition($name, $pos = 0) |
|
102 | - { |
|
103 | - } |
|
104 | - |
|
105 | - /** |
|
106 | - * Checks if this index exactly spans the given column names in the correct order. |
|
107 | - * |
|
108 | - * @param string[] $columnNames |
|
109 | - * |
|
110 | - * @return bool |
|
111 | - */ |
|
112 | - public function spansColumns(array $columnNames) |
|
113 | - { |
|
114 | - } |
|
115 | - |
|
116 | - /** |
|
117 | - * Keeping misspelled function name for backwards compatibility |
|
118 | - * |
|
119 | - * @deprecated Use {@see isFulfilledBy()} instead. |
|
120 | - * |
|
121 | - * @return bool |
|
122 | - */ |
|
123 | - public function isFullfilledBy(Index $other) |
|
124 | - { |
|
125 | - } |
|
126 | - |
|
127 | - /** |
|
128 | - * Checks if the other index already fulfills all the indexing and constraint needs of the current one. |
|
129 | - */ |
|
130 | - public function isFulfilledBy(Index $other): bool |
|
131 | - { |
|
132 | - } |
|
133 | - |
|
134 | - /** |
|
135 | - * Detects if the other index is a non-unique, non primary index that can be overwritten by this one. |
|
136 | - * |
|
137 | - * @return bool |
|
138 | - */ |
|
139 | - public function overrules(Index $other) |
|
140 | - { |
|
141 | - } |
|
142 | - |
|
143 | - /** |
|
144 | - * Returns platform specific flags for indexes. |
|
145 | - * |
|
146 | - * @return string[] |
|
147 | - */ |
|
148 | - public function getFlags() |
|
149 | - { |
|
150 | - } |
|
151 | - |
|
152 | - /** |
|
153 | - * Adds Flag for an index that translates to platform specific handling. |
|
154 | - * |
|
155 | - * @param string $flag |
|
156 | - * |
|
157 | - * @return Index |
|
158 | - * |
|
159 | - * @example $index->addFlag('CLUSTERED') |
|
160 | - */ |
|
161 | - public function addFlag($flag) |
|
162 | - { |
|
163 | - } |
|
164 | - |
|
165 | - /** |
|
166 | - * Does this index have a specific flag? |
|
167 | - * |
|
168 | - * @param string $flag |
|
169 | - * |
|
170 | - * @return bool |
|
171 | - */ |
|
172 | - public function hasFlag($flag) |
|
173 | - { |
|
174 | - } |
|
175 | - |
|
176 | - /** |
|
177 | - * Removes a flag. |
|
178 | - * |
|
179 | - * @param string $flag |
|
180 | - * |
|
181 | - * @return void |
|
182 | - */ |
|
183 | - public function removeFlag($flag) |
|
184 | - { |
|
185 | - } |
|
186 | - |
|
187 | - /** |
|
188 | - * @param string $name |
|
189 | - * |
|
190 | - * @return bool |
|
191 | - */ |
|
192 | - public function hasOption($name) |
|
193 | - { |
|
194 | - } |
|
195 | - |
|
196 | - /** |
|
197 | - * @param string $name |
|
198 | - * |
|
199 | - * @return mixed |
|
200 | - */ |
|
201 | - public function getOption($name) |
|
202 | - { |
|
203 | - } |
|
204 | - |
|
205 | - /** @return mixed[] */ |
|
206 | - public function getOptions() |
|
207 | - { |
|
208 | - } |
|
18 | + /** |
|
19 | + * Asset identifier instances of the column names the index is associated with. |
|
20 | + * array($columnName => Identifier) |
|
21 | + * |
|
22 | + * @var Identifier[] |
|
23 | + */ |
|
24 | + protected $_columns = []; |
|
25 | + |
|
26 | + /** @var bool */ |
|
27 | + protected $_isUnique = false; |
|
28 | + |
|
29 | + /** @var bool */ |
|
30 | + protected $_isPrimary = false; |
|
31 | + |
|
32 | + /** |
|
33 | + * Platform specific flags for indexes. |
|
34 | + * array($flagName => true) |
|
35 | + * |
|
36 | + * @var true[] |
|
37 | + */ |
|
38 | + protected $_flags = []; |
|
39 | + |
|
40 | + /** |
|
41 | + * @param string $name |
|
42 | + * @param string[] $columns |
|
43 | + * @param bool $isUnique |
|
44 | + * @param bool $isPrimary |
|
45 | + * @param string[] $flags |
|
46 | + * @param mixed[] $options |
|
47 | + */ |
|
48 | + public function __construct($name, array $columns, $isUnique = false, $isPrimary = false, array $flags = [], array $options = []) |
|
49 | + { |
|
50 | + } |
|
51 | + |
|
52 | + /** @throws InvalidArgumentException */ |
|
53 | + protected function _addColumn(string $column): void |
|
54 | + { |
|
55 | + } |
|
56 | + |
|
57 | + /** |
|
58 | + * {@inheritDoc} |
|
59 | + */ |
|
60 | + public function getColumns() |
|
61 | + { |
|
62 | + } |
|
63 | + |
|
64 | + /** |
|
65 | + * {@inheritDoc} |
|
66 | + */ |
|
67 | + public function getQuotedColumns(AbstractPlatform $platform) |
|
68 | + { |
|
69 | + } |
|
70 | + |
|
71 | + /** @return string[] */ |
|
72 | + public function getUnquotedColumns() |
|
73 | + { |
|
74 | + } |
|
75 | + |
|
76 | + /** |
|
77 | + * Is the index neither unique nor primary key? |
|
78 | + * |
|
79 | + * @return bool |
|
80 | + */ |
|
81 | + public function isSimpleIndex() |
|
82 | + { |
|
83 | + } |
|
84 | + |
|
85 | + /** @return bool */ |
|
86 | + public function isUnique() |
|
87 | + { |
|
88 | + } |
|
89 | + |
|
90 | + /** @return bool */ |
|
91 | + public function isPrimary() |
|
92 | + { |
|
93 | + } |
|
94 | + |
|
95 | + /** |
|
96 | + * @param string $name |
|
97 | + * @param int $pos |
|
98 | + * |
|
99 | + * @return bool |
|
100 | + */ |
|
101 | + public function hasColumnAtPosition($name, $pos = 0) |
|
102 | + { |
|
103 | + } |
|
104 | + |
|
105 | + /** |
|
106 | + * Checks if this index exactly spans the given column names in the correct order. |
|
107 | + * |
|
108 | + * @param string[] $columnNames |
|
109 | + * |
|
110 | + * @return bool |
|
111 | + */ |
|
112 | + public function spansColumns(array $columnNames) |
|
113 | + { |
|
114 | + } |
|
115 | + |
|
116 | + /** |
|
117 | + * Keeping misspelled function name for backwards compatibility |
|
118 | + * |
|
119 | + * @deprecated Use {@see isFulfilledBy()} instead. |
|
120 | + * |
|
121 | + * @return bool |
|
122 | + */ |
|
123 | + public function isFullfilledBy(Index $other) |
|
124 | + { |
|
125 | + } |
|
126 | + |
|
127 | + /** |
|
128 | + * Checks if the other index already fulfills all the indexing and constraint needs of the current one. |
|
129 | + */ |
|
130 | + public function isFulfilledBy(Index $other): bool |
|
131 | + { |
|
132 | + } |
|
133 | + |
|
134 | + /** |
|
135 | + * Detects if the other index is a non-unique, non primary index that can be overwritten by this one. |
|
136 | + * |
|
137 | + * @return bool |
|
138 | + */ |
|
139 | + public function overrules(Index $other) |
|
140 | + { |
|
141 | + } |
|
142 | + |
|
143 | + /** |
|
144 | + * Returns platform specific flags for indexes. |
|
145 | + * |
|
146 | + * @return string[] |
|
147 | + */ |
|
148 | + public function getFlags() |
|
149 | + { |
|
150 | + } |
|
151 | + |
|
152 | + /** |
|
153 | + * Adds Flag for an index that translates to platform specific handling. |
|
154 | + * |
|
155 | + * @param string $flag |
|
156 | + * |
|
157 | + * @return Index |
|
158 | + * |
|
159 | + * @example $index->addFlag('CLUSTERED') |
|
160 | + */ |
|
161 | + public function addFlag($flag) |
|
162 | + { |
|
163 | + } |
|
164 | + |
|
165 | + /** |
|
166 | + * Does this index have a specific flag? |
|
167 | + * |
|
168 | + * @param string $flag |
|
169 | + * |
|
170 | + * @return bool |
|
171 | + */ |
|
172 | + public function hasFlag($flag) |
|
173 | + { |
|
174 | + } |
|
175 | + |
|
176 | + /** |
|
177 | + * Removes a flag. |
|
178 | + * |
|
179 | + * @param string $flag |
|
180 | + * |
|
181 | + * @return void |
|
182 | + */ |
|
183 | + public function removeFlag($flag) |
|
184 | + { |
|
185 | + } |
|
186 | + |
|
187 | + /** |
|
188 | + * @param string $name |
|
189 | + * |
|
190 | + * @return bool |
|
191 | + */ |
|
192 | + public function hasOption($name) |
|
193 | + { |
|
194 | + } |
|
195 | + |
|
196 | + /** |
|
197 | + * @param string $name |
|
198 | + * |
|
199 | + * @return mixed |
|
200 | + */ |
|
201 | + public function getOption($name) |
|
202 | + { |
|
203 | + } |
|
204 | + |
|
205 | + /** @return mixed[] */ |
|
206 | + public function getOptions() |
|
207 | + { |
|
208 | + } |
|
209 | 209 | } |
@@ -25,147 +25,147 @@ |
||
25 | 25 | */ |
26 | 26 | abstract class AbstractAsset |
27 | 27 | { |
28 | - /** @var string */ |
|
29 | - protected $_name = ''; |
|
30 | - |
|
31 | - /** |
|
32 | - * Namespace of the asset. If none isset the default namespace is assumed. |
|
33 | - * |
|
34 | - * @var string|null |
|
35 | - */ |
|
36 | - protected $_namespace; |
|
37 | - |
|
38 | - /** @var bool */ |
|
39 | - protected $_quoted = false; |
|
40 | - |
|
41 | - /** |
|
42 | - * Sets the name of this asset. |
|
43 | - * |
|
44 | - * @param string $name |
|
45 | - * |
|
46 | - * @return void |
|
47 | - */ |
|
48 | - protected function _setName($name) |
|
49 | - { |
|
50 | - } |
|
51 | - |
|
52 | - /** |
|
53 | - * Is this asset in the default namespace? |
|
54 | - * |
|
55 | - * @param string $defaultNamespaceName |
|
56 | - * |
|
57 | - * @return bool |
|
58 | - */ |
|
59 | - public function isInDefaultNamespace($defaultNamespaceName) |
|
60 | - { |
|
61 | - } |
|
62 | - |
|
63 | - /** |
|
64 | - * Gets the namespace name of this asset. |
|
65 | - * |
|
66 | - * If NULL is returned this means the default namespace is used. |
|
67 | - * |
|
68 | - * @return string|null |
|
69 | - */ |
|
70 | - public function getNamespaceName() |
|
71 | - { |
|
72 | - } |
|
73 | - |
|
74 | - /** |
|
75 | - * The shortest name is stripped of the default namespace. All other |
|
76 | - * namespaced elements are returned as full-qualified names. |
|
77 | - * |
|
78 | - * @param string|null $defaultNamespaceName |
|
79 | - * |
|
80 | - * @return string |
|
81 | - */ |
|
82 | - public function getShortestName($defaultNamespaceName) |
|
83 | - { |
|
84 | - } |
|
85 | - |
|
86 | - /** |
|
87 | - * The normalized name is full-qualified and lower-cased. Lower-casing is |
|
88 | - * actually wrong, but we have to do it to keep our sanity. If you are |
|
89 | - * using database objects that only differentiate in the casing (FOO vs |
|
90 | - * Foo) then you will NOT be able to use Doctrine Schema abstraction. |
|
91 | - * |
|
92 | - * Every non-namespaced element is prefixed with the default namespace |
|
93 | - * name which is passed as argument to this method. |
|
94 | - * |
|
95 | - * @deprecated Use {@see getNamespaceName()} and {@see getName()} instead. |
|
96 | - * |
|
97 | - * @param string $defaultNamespaceName |
|
98 | - * |
|
99 | - * @return string |
|
100 | - */ |
|
101 | - public function getFullQualifiedName($defaultNamespaceName) |
|
102 | - { |
|
103 | - } |
|
104 | - |
|
105 | - /** |
|
106 | - * Checks if this asset's name is quoted. |
|
107 | - * |
|
108 | - * @return bool |
|
109 | - */ |
|
110 | - public function isQuoted() |
|
111 | - { |
|
112 | - } |
|
113 | - |
|
114 | - /** |
|
115 | - * Checks if this identifier is quoted. |
|
116 | - * |
|
117 | - * @param string $identifier |
|
118 | - * |
|
119 | - * @return bool |
|
120 | - */ |
|
121 | - protected function isIdentifierQuoted($identifier) |
|
122 | - { |
|
123 | - } |
|
124 | - |
|
125 | - /** |
|
126 | - * Trim quotes from the identifier. |
|
127 | - * |
|
128 | - * @param string $identifier |
|
129 | - * |
|
130 | - * @return string |
|
131 | - */ |
|
132 | - protected function trimQuotes($identifier) |
|
133 | - { |
|
134 | - } |
|
135 | - |
|
136 | - /** |
|
137 | - * Returns the name of this schema asset. |
|
138 | - * |
|
139 | - * @return string |
|
140 | - */ |
|
141 | - public function getName() |
|
142 | - { |
|
143 | - } |
|
144 | - |
|
145 | - /** |
|
146 | - * Gets the quoted representation of this asset but only if it was defined with one. Otherwise |
|
147 | - * return the plain unquoted value as inserted. |
|
148 | - * |
|
149 | - * @return string |
|
150 | - */ |
|
151 | - public function getQuotedName(AbstractPlatform $platform) |
|
152 | - { |
|
153 | - } |
|
154 | - |
|
155 | - /** |
|
156 | - * Generates an identifier from a list of column names obeying a certain string length. |
|
157 | - * |
|
158 | - * This is especially important for Oracle, since it does not allow identifiers larger than 30 chars, |
|
159 | - * however building idents automatically for foreign keys, composite keys or such can easily create |
|
160 | - * very long names. |
|
161 | - * |
|
162 | - * @param string[] $columnNames |
|
163 | - * @param string $prefix |
|
164 | - * @param int $maxSize |
|
165 | - * |
|
166 | - * @return string |
|
167 | - */ |
|
168 | - protected function _generateIdentifierName($columnNames, $prefix = '', $maxSize = 30) |
|
169 | - { |
|
170 | - } |
|
28 | + /** @var string */ |
|
29 | + protected $_name = ''; |
|
30 | + |
|
31 | + /** |
|
32 | + * Namespace of the asset. If none isset the default namespace is assumed. |
|
33 | + * |
|
34 | + * @var string|null |
|
35 | + */ |
|
36 | + protected $_namespace; |
|
37 | + |
|
38 | + /** @var bool */ |
|
39 | + protected $_quoted = false; |
|
40 | + |
|
41 | + /** |
|
42 | + * Sets the name of this asset. |
|
43 | + * |
|
44 | + * @param string $name |
|
45 | + * |
|
46 | + * @return void |
|
47 | + */ |
|
48 | + protected function _setName($name) |
|
49 | + { |
|
50 | + } |
|
51 | + |
|
52 | + /** |
|
53 | + * Is this asset in the default namespace? |
|
54 | + * |
|
55 | + * @param string $defaultNamespaceName |
|
56 | + * |
|
57 | + * @return bool |
|
58 | + */ |
|
59 | + public function isInDefaultNamespace($defaultNamespaceName) |
|
60 | + { |
|
61 | + } |
|
62 | + |
|
63 | + /** |
|
64 | + * Gets the namespace name of this asset. |
|
65 | + * |
|
66 | + * If NULL is returned this means the default namespace is used. |
|
67 | + * |
|
68 | + * @return string|null |
|
69 | + */ |
|
70 | + public function getNamespaceName() |
|
71 | + { |
|
72 | + } |
|
73 | + |
|
74 | + /** |
|
75 | + * The shortest name is stripped of the default namespace. All other |
|
76 | + * namespaced elements are returned as full-qualified names. |
|
77 | + * |
|
78 | + * @param string|null $defaultNamespaceName |
|
79 | + * |
|
80 | + * @return string |
|
81 | + */ |
|
82 | + public function getShortestName($defaultNamespaceName) |
|
83 | + { |
|
84 | + } |
|
85 | + |
|
86 | + /** |
|
87 | + * The normalized name is full-qualified and lower-cased. Lower-casing is |
|
88 | + * actually wrong, but we have to do it to keep our sanity. If you are |
|
89 | + * using database objects that only differentiate in the casing (FOO vs |
|
90 | + * Foo) then you will NOT be able to use Doctrine Schema abstraction. |
|
91 | + * |
|
92 | + * Every non-namespaced element is prefixed with the default namespace |
|
93 | + * name which is passed as argument to this method. |
|
94 | + * |
|
95 | + * @deprecated Use {@see getNamespaceName()} and {@see getName()} instead. |
|
96 | + * |
|
97 | + * @param string $defaultNamespaceName |
|
98 | + * |
|
99 | + * @return string |
|
100 | + */ |
|
101 | + public function getFullQualifiedName($defaultNamespaceName) |
|
102 | + { |
|
103 | + } |
|
104 | + |
|
105 | + /** |
|
106 | + * Checks if this asset's name is quoted. |
|
107 | + * |
|
108 | + * @return bool |
|
109 | + */ |
|
110 | + public function isQuoted() |
|
111 | + { |
|
112 | + } |
|
113 | + |
|
114 | + /** |
|
115 | + * Checks if this identifier is quoted. |
|
116 | + * |
|
117 | + * @param string $identifier |
|
118 | + * |
|
119 | + * @return bool |
|
120 | + */ |
|
121 | + protected function isIdentifierQuoted($identifier) |
|
122 | + { |
|
123 | + } |
|
124 | + |
|
125 | + /** |
|
126 | + * Trim quotes from the identifier. |
|
127 | + * |
|
128 | + * @param string $identifier |
|
129 | + * |
|
130 | + * @return string |
|
131 | + */ |
|
132 | + protected function trimQuotes($identifier) |
|
133 | + { |
|
134 | + } |
|
135 | + |
|
136 | + /** |
|
137 | + * Returns the name of this schema asset. |
|
138 | + * |
|
139 | + * @return string |
|
140 | + */ |
|
141 | + public function getName() |
|
142 | + { |
|
143 | + } |
|
144 | + |
|
145 | + /** |
|
146 | + * Gets the quoted representation of this asset but only if it was defined with one. Otherwise |
|
147 | + * return the plain unquoted value as inserted. |
|
148 | + * |
|
149 | + * @return string |
|
150 | + */ |
|
151 | + public function getQuotedName(AbstractPlatform $platform) |
|
152 | + { |
|
153 | + } |
|
154 | + |
|
155 | + /** |
|
156 | + * Generates an identifier from a list of column names obeying a certain string length. |
|
157 | + * |
|
158 | + * This is especially important for Oracle, since it does not allow identifiers larger than 30 chars, |
|
159 | + * however building idents automatically for foreign keys, composite keys or such can easily create |
|
160 | + * very long names. |
|
161 | + * |
|
162 | + * @param string[] $columnNames |
|
163 | + * @param string $prefix |
|
164 | + * @param int $maxSize |
|
165 | + * |
|
166 | + * @return string |
|
167 | + */ |
|
168 | + protected function _generateIdentifierName($columnNames, $prefix = '', $maxSize = 30) |
|
169 | + { |
|
170 | + } |
|
171 | 171 | } |
@@ -34,409 +34,409 @@ |
||
34 | 34 | */ |
35 | 35 | class Command |
36 | 36 | { |
37 | - // see https://tldp.org/LDP/abs/html/exitcodes.html |
|
38 | - public const SUCCESS = 0; |
|
39 | - public const FAILURE = 1; |
|
40 | - public const INVALID = 2; |
|
41 | - |
|
42 | - /** |
|
43 | - * @var string|null The default command name |
|
44 | - * |
|
45 | - * @deprecated since Symfony 6.1, use the AsCommand attribute instead |
|
46 | - */ |
|
47 | - protected static $defaultName; |
|
48 | - |
|
49 | - /** |
|
50 | - * @var string|null The default command description |
|
51 | - * |
|
52 | - * @deprecated since Symfony 6.1, use the AsCommand attribute instead |
|
53 | - */ |
|
54 | - protected static $defaultDescription; |
|
55 | - |
|
56 | - public static function getDefaultName(): ?string |
|
57 | - { |
|
58 | - } |
|
59 | - |
|
60 | - public static function getDefaultDescription(): ?string |
|
61 | - { |
|
62 | - } |
|
63 | - |
|
64 | - /** |
|
65 | - * @param string|null $name The name of the command; passing null means it must be set in configure() |
|
66 | - * |
|
67 | - * @throws LogicException When the command name is empty |
|
68 | - */ |
|
69 | - public function __construct(?string $name = null) |
|
70 | - { |
|
71 | - } |
|
72 | - |
|
73 | - /** |
|
74 | - * Ignores validation errors. |
|
75 | - * |
|
76 | - * This is mainly useful for the help command. |
|
77 | - * |
|
78 | - * @return void |
|
79 | - */ |
|
80 | - public function ignoreValidationErrors() |
|
81 | - { |
|
82 | - } |
|
83 | - |
|
84 | - /** |
|
85 | - * @return void |
|
86 | - */ |
|
87 | - public function setApplication(?Application $application = null) |
|
88 | - { |
|
89 | - } |
|
90 | - |
|
91 | - /** |
|
92 | - * @return void |
|
93 | - */ |
|
94 | - public function setHelperSet(HelperSet $helperSet) |
|
95 | - { |
|
96 | - } |
|
97 | - |
|
98 | - /** |
|
99 | - * Gets the helper set. |
|
100 | - */ |
|
101 | - public function getHelperSet(): ?HelperSet |
|
102 | - { |
|
103 | - } |
|
104 | - |
|
105 | - /** |
|
106 | - * Gets the application instance for this command. |
|
107 | - */ |
|
108 | - public function getApplication(): ?Application |
|
109 | - { |
|
110 | - } |
|
111 | - |
|
112 | - /** |
|
113 | - * Checks whether the command is enabled or not in the current environment. |
|
114 | - * |
|
115 | - * Override this to check for x or y and return false if the command cannot |
|
116 | - * run properly under the current conditions. |
|
117 | - * |
|
118 | - * @return bool |
|
119 | - */ |
|
120 | - public function isEnabled() |
|
121 | - { |
|
122 | - } |
|
123 | - |
|
124 | - /** |
|
125 | - * Configures the current command. |
|
126 | - * |
|
127 | - * @return void |
|
128 | - */ |
|
129 | - protected function configure() |
|
130 | - { |
|
131 | - } |
|
132 | - |
|
133 | - /** |
|
134 | - * Executes the current command. |
|
135 | - * |
|
136 | - * This method is not abstract because you can use this class |
|
137 | - * as a concrete class. In this case, instead of defining the |
|
138 | - * execute() method, you set the code to execute by passing |
|
139 | - * a Closure to the setCode() method. |
|
140 | - * |
|
141 | - * @return int 0 if everything went fine, or an exit code |
|
142 | - * |
|
143 | - * @throws LogicException When this abstract method is not implemented |
|
144 | - * |
|
145 | - * @see setCode() |
|
146 | - */ |
|
147 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
148 | - { |
|
149 | - } |
|
150 | - |
|
151 | - /** |
|
152 | - * Interacts with the user. |
|
153 | - * |
|
154 | - * This method is executed before the InputDefinition is validated. |
|
155 | - * This means that this is the only place where the command can |
|
156 | - * interactively ask for values of missing required arguments. |
|
157 | - * |
|
158 | - * @return void |
|
159 | - */ |
|
160 | - protected function interact(InputInterface $input, OutputInterface $output) |
|
161 | - { |
|
162 | - } |
|
163 | - |
|
164 | - /** |
|
165 | - * Initializes the command after the input has been bound and before the input |
|
166 | - * is validated. |
|
167 | - * |
|
168 | - * This is mainly useful when a lot of commands extends one main command |
|
169 | - * where some things need to be initialized based on the input arguments and options. |
|
170 | - * |
|
171 | - * @see InputInterface::bind() |
|
172 | - * @see InputInterface::validate() |
|
173 | - * |
|
174 | - * @return void |
|
175 | - */ |
|
176 | - protected function initialize(InputInterface $input, OutputInterface $output) |
|
177 | - { |
|
178 | - } |
|
179 | - |
|
180 | - /** |
|
181 | - * Runs the command. |
|
182 | - * |
|
183 | - * The code to execute is either defined directly with the |
|
184 | - * setCode() method or by overriding the execute() method |
|
185 | - * in a sub-class. |
|
186 | - * |
|
187 | - * @return int The command exit code |
|
188 | - * |
|
189 | - * @throws ExceptionInterface When input binding fails. Bypass this by calling {@link ignoreValidationErrors()}. |
|
190 | - * |
|
191 | - * @see setCode() |
|
192 | - * @see execute() |
|
193 | - */ |
|
194 | - public function run(InputInterface $input, OutputInterface $output): int |
|
195 | - { |
|
196 | - } |
|
197 | - |
|
198 | - /** |
|
199 | - * Adds suggestions to $suggestions for the current completion input (e.g. option or argument). |
|
200 | - */ |
|
201 | - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void |
|
202 | - { |
|
203 | - } |
|
204 | - |
|
205 | - /** |
|
206 | - * Sets the code to execute when running this command. |
|
207 | - * |
|
208 | - * If this method is used, it overrides the code defined |
|
209 | - * in the execute() method. |
|
210 | - * |
|
211 | - * @param callable $code A callable(InputInterface $input, OutputInterface $output) |
|
212 | - * |
|
213 | - * @return $this |
|
214 | - * |
|
215 | - * @throws InvalidArgumentException |
|
216 | - * |
|
217 | - * @see execute() |
|
218 | - */ |
|
219 | - public function setCode(callable $code): static |
|
220 | - { |
|
221 | - } |
|
222 | - |
|
223 | - /** |
|
224 | - * Merges the application definition with the command definition. |
|
225 | - * |
|
226 | - * This method is not part of public API and should not be used directly. |
|
227 | - * |
|
228 | - * @param bool $mergeArgs Whether to merge or not the Application definition arguments to Command definition arguments |
|
229 | - * |
|
230 | - * @internal |
|
231 | - */ |
|
232 | - public function mergeApplicationDefinition(bool $mergeArgs = true): void |
|
233 | - { |
|
234 | - } |
|
235 | - |
|
236 | - /** |
|
237 | - * Sets an array of argument and option instances. |
|
238 | - * |
|
239 | - * @return $this |
|
240 | - */ |
|
241 | - public function setDefinition(array|InputDefinition $definition): static |
|
242 | - { |
|
243 | - } |
|
244 | - |
|
245 | - /** |
|
246 | - * Gets the InputDefinition attached to this Command. |
|
247 | - */ |
|
248 | - public function getDefinition(): InputDefinition |
|
249 | - { |
|
250 | - } |
|
251 | - |
|
252 | - /** |
|
253 | - * Gets the InputDefinition to be used to create representations of this Command. |
|
254 | - * |
|
255 | - * Can be overridden to provide the original command representation when it would otherwise |
|
256 | - * be changed by merging with the application InputDefinition. |
|
257 | - * |
|
258 | - * This method is not part of public API and should not be used directly. |
|
259 | - */ |
|
260 | - public function getNativeDefinition(): InputDefinition |
|
261 | - { |
|
262 | - } |
|
263 | - |
|
264 | - /** |
|
265 | - * Adds an argument. |
|
266 | - * |
|
267 | - * @param $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL |
|
268 | - * @param $default The default value (for InputArgument::OPTIONAL mode only) |
|
269 | - * @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion |
|
270 | - * |
|
271 | - * @return $this |
|
272 | - * |
|
273 | - * @throws InvalidArgumentException When argument mode is not valid |
|
274 | - */ |
|
275 | - public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null): static |
|
276 | - { |
|
277 | - } |
|
278 | - |
|
279 | - /** |
|
280 | - * Adds an option. |
|
281 | - * |
|
282 | - * @param $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts |
|
283 | - * @param $mode The option mode: One of the InputOption::VALUE_* constants |
|
284 | - * @param $default The default value (must be null for InputOption::VALUE_NONE) |
|
285 | - * @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion |
|
286 | - * |
|
287 | - * @return $this |
|
288 | - * |
|
289 | - * @throws InvalidArgumentException If option mode is invalid or incompatible |
|
290 | - */ |
|
291 | - public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null): static |
|
292 | - { |
|
293 | - } |
|
294 | - |
|
295 | - /** |
|
296 | - * Sets the name of the command. |
|
297 | - * |
|
298 | - * This method can set both the namespace and the name if |
|
299 | - * you separate them by a colon (:) |
|
300 | - * |
|
301 | - * $command->setName('foo:bar'); |
|
302 | - * |
|
303 | - * @return $this |
|
304 | - * |
|
305 | - * @throws InvalidArgumentException When the name is invalid |
|
306 | - */ |
|
307 | - public function setName(string $name): static |
|
308 | - { |
|
309 | - } |
|
310 | - |
|
311 | - /** |
|
312 | - * Sets the process title of the command. |
|
313 | - * |
|
314 | - * This feature should be used only when creating a long process command, |
|
315 | - * like a daemon. |
|
316 | - * |
|
317 | - * @return $this |
|
318 | - */ |
|
319 | - public function setProcessTitle(string $title): static |
|
320 | - { |
|
321 | - } |
|
322 | - |
|
323 | - /** |
|
324 | - * Returns the command name. |
|
325 | - */ |
|
326 | - public function getName(): ?string |
|
327 | - { |
|
328 | - } |
|
329 | - |
|
330 | - /** |
|
331 | - * @param bool $hidden Whether or not the command should be hidden from the list of commands |
|
332 | - * |
|
333 | - * @return $this |
|
334 | - */ |
|
335 | - public function setHidden(bool $hidden = true): static |
|
336 | - { |
|
337 | - } |
|
338 | - |
|
339 | - /** |
|
340 | - * @return bool whether the command should be publicly shown or not |
|
341 | - */ |
|
342 | - public function isHidden(): bool |
|
343 | - { |
|
344 | - } |
|
345 | - |
|
346 | - /** |
|
347 | - * Sets the description for the command. |
|
348 | - * |
|
349 | - * @return $this |
|
350 | - */ |
|
351 | - public function setDescription(string $description): static |
|
352 | - { |
|
353 | - } |
|
354 | - |
|
355 | - /** |
|
356 | - * Returns the description for the command. |
|
357 | - */ |
|
358 | - public function getDescription(): string |
|
359 | - { |
|
360 | - } |
|
361 | - |
|
362 | - /** |
|
363 | - * Sets the help for the command. |
|
364 | - * |
|
365 | - * @return $this |
|
366 | - */ |
|
367 | - public function setHelp(string $help): static |
|
368 | - { |
|
369 | - } |
|
370 | - |
|
371 | - /** |
|
372 | - * Returns the help for the command. |
|
373 | - */ |
|
374 | - public function getHelp(): string |
|
375 | - { |
|
376 | - } |
|
377 | - |
|
378 | - /** |
|
379 | - * Returns the processed help for the command replacing the %command.name% and |
|
380 | - * %command.full_name% patterns with the real values dynamically. |
|
381 | - */ |
|
382 | - public function getProcessedHelp(): string |
|
383 | - { |
|
384 | - } |
|
385 | - |
|
386 | - /** |
|
387 | - * Sets the aliases for the command. |
|
388 | - * |
|
389 | - * @param string[] $aliases An array of aliases for the command |
|
390 | - * |
|
391 | - * @return $this |
|
392 | - * |
|
393 | - * @throws InvalidArgumentException When an alias is invalid |
|
394 | - */ |
|
395 | - public function setAliases(iterable $aliases): static |
|
396 | - { |
|
397 | - } |
|
398 | - |
|
399 | - /** |
|
400 | - * Returns the aliases for the command. |
|
401 | - */ |
|
402 | - public function getAliases(): array |
|
403 | - { |
|
404 | - } |
|
405 | - |
|
406 | - /** |
|
407 | - * Returns the synopsis for the command. |
|
408 | - * |
|
409 | - * @param bool $short Whether to show the short version of the synopsis (with options folded) or not |
|
410 | - */ |
|
411 | - public function getSynopsis(bool $short = false): string |
|
412 | - { |
|
413 | - } |
|
414 | - |
|
415 | - /** |
|
416 | - * Add a command usage example, it'll be prefixed with the command name. |
|
417 | - * |
|
418 | - * @return $this |
|
419 | - */ |
|
420 | - public function addUsage(string $usage): static |
|
421 | - { |
|
422 | - } |
|
423 | - |
|
424 | - /** |
|
425 | - * Returns alternative usages of the command. |
|
426 | - */ |
|
427 | - public function getUsages(): array |
|
428 | - { |
|
429 | - } |
|
430 | - |
|
431 | - /** |
|
432 | - * Gets a helper instance by name. |
|
433 | - * |
|
434 | - * @return HelperInterface |
|
435 | - * |
|
436 | - * @throws LogicException if no HelperSet is defined |
|
437 | - * @throws InvalidArgumentException if the helper is not defined |
|
438 | - */ |
|
439 | - public function getHelper(string $name): mixed |
|
440 | - { |
|
441 | - } |
|
37 | + // see https://tldp.org/LDP/abs/html/exitcodes.html |
|
38 | + public const SUCCESS = 0; |
|
39 | + public const FAILURE = 1; |
|
40 | + public const INVALID = 2; |
|
41 | + |
|
42 | + /** |
|
43 | + * @var string|null The default command name |
|
44 | + * |
|
45 | + * @deprecated since Symfony 6.1, use the AsCommand attribute instead |
|
46 | + */ |
|
47 | + protected static $defaultName; |
|
48 | + |
|
49 | + /** |
|
50 | + * @var string|null The default command description |
|
51 | + * |
|
52 | + * @deprecated since Symfony 6.1, use the AsCommand attribute instead |
|
53 | + */ |
|
54 | + protected static $defaultDescription; |
|
55 | + |
|
56 | + public static function getDefaultName(): ?string |
|
57 | + { |
|
58 | + } |
|
59 | + |
|
60 | + public static function getDefaultDescription(): ?string |
|
61 | + { |
|
62 | + } |
|
63 | + |
|
64 | + /** |
|
65 | + * @param string|null $name The name of the command; passing null means it must be set in configure() |
|
66 | + * |
|
67 | + * @throws LogicException When the command name is empty |
|
68 | + */ |
|
69 | + public function __construct(?string $name = null) |
|
70 | + { |
|
71 | + } |
|
72 | + |
|
73 | + /** |
|
74 | + * Ignores validation errors. |
|
75 | + * |
|
76 | + * This is mainly useful for the help command. |
|
77 | + * |
|
78 | + * @return void |
|
79 | + */ |
|
80 | + public function ignoreValidationErrors() |
|
81 | + { |
|
82 | + } |
|
83 | + |
|
84 | + /** |
|
85 | + * @return void |
|
86 | + */ |
|
87 | + public function setApplication(?Application $application = null) |
|
88 | + { |
|
89 | + } |
|
90 | + |
|
91 | + /** |
|
92 | + * @return void |
|
93 | + */ |
|
94 | + public function setHelperSet(HelperSet $helperSet) |
|
95 | + { |
|
96 | + } |
|
97 | + |
|
98 | + /** |
|
99 | + * Gets the helper set. |
|
100 | + */ |
|
101 | + public function getHelperSet(): ?HelperSet |
|
102 | + { |
|
103 | + } |
|
104 | + |
|
105 | + /** |
|
106 | + * Gets the application instance for this command. |
|
107 | + */ |
|
108 | + public function getApplication(): ?Application |
|
109 | + { |
|
110 | + } |
|
111 | + |
|
112 | + /** |
|
113 | + * Checks whether the command is enabled or not in the current environment. |
|
114 | + * |
|
115 | + * Override this to check for x or y and return false if the command cannot |
|
116 | + * run properly under the current conditions. |
|
117 | + * |
|
118 | + * @return bool |
|
119 | + */ |
|
120 | + public function isEnabled() |
|
121 | + { |
|
122 | + } |
|
123 | + |
|
124 | + /** |
|
125 | + * Configures the current command. |
|
126 | + * |
|
127 | + * @return void |
|
128 | + */ |
|
129 | + protected function configure() |
|
130 | + { |
|
131 | + } |
|
132 | + |
|
133 | + /** |
|
134 | + * Executes the current command. |
|
135 | + * |
|
136 | + * This method is not abstract because you can use this class |
|
137 | + * as a concrete class. In this case, instead of defining the |
|
138 | + * execute() method, you set the code to execute by passing |
|
139 | + * a Closure to the setCode() method. |
|
140 | + * |
|
141 | + * @return int 0 if everything went fine, or an exit code |
|
142 | + * |
|
143 | + * @throws LogicException When this abstract method is not implemented |
|
144 | + * |
|
145 | + * @see setCode() |
|
146 | + */ |
|
147 | + protected function execute(InputInterface $input, OutputInterface $output) |
|
148 | + { |
|
149 | + } |
|
150 | + |
|
151 | + /** |
|
152 | + * Interacts with the user. |
|
153 | + * |
|
154 | + * This method is executed before the InputDefinition is validated. |
|
155 | + * This means that this is the only place where the command can |
|
156 | + * interactively ask for values of missing required arguments. |
|
157 | + * |
|
158 | + * @return void |
|
159 | + */ |
|
160 | + protected function interact(InputInterface $input, OutputInterface $output) |
|
161 | + { |
|
162 | + } |
|
163 | + |
|
164 | + /** |
|
165 | + * Initializes the command after the input has been bound and before the input |
|
166 | + * is validated. |
|
167 | + * |
|
168 | + * This is mainly useful when a lot of commands extends one main command |
|
169 | + * where some things need to be initialized based on the input arguments and options. |
|
170 | + * |
|
171 | + * @see InputInterface::bind() |
|
172 | + * @see InputInterface::validate() |
|
173 | + * |
|
174 | + * @return void |
|
175 | + */ |
|
176 | + protected function initialize(InputInterface $input, OutputInterface $output) |
|
177 | + { |
|
178 | + } |
|
179 | + |
|
180 | + /** |
|
181 | + * Runs the command. |
|
182 | + * |
|
183 | + * The code to execute is either defined directly with the |
|
184 | + * setCode() method or by overriding the execute() method |
|
185 | + * in a sub-class. |
|
186 | + * |
|
187 | + * @return int The command exit code |
|
188 | + * |
|
189 | + * @throws ExceptionInterface When input binding fails. Bypass this by calling {@link ignoreValidationErrors()}. |
|
190 | + * |
|
191 | + * @see setCode() |
|
192 | + * @see execute() |
|
193 | + */ |
|
194 | + public function run(InputInterface $input, OutputInterface $output): int |
|
195 | + { |
|
196 | + } |
|
197 | + |
|
198 | + /** |
|
199 | + * Adds suggestions to $suggestions for the current completion input (e.g. option or argument). |
|
200 | + */ |
|
201 | + public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void |
|
202 | + { |
|
203 | + } |
|
204 | + |
|
205 | + /** |
|
206 | + * Sets the code to execute when running this command. |
|
207 | + * |
|
208 | + * If this method is used, it overrides the code defined |
|
209 | + * in the execute() method. |
|
210 | + * |
|
211 | + * @param callable $code A callable(InputInterface $input, OutputInterface $output) |
|
212 | + * |
|
213 | + * @return $this |
|
214 | + * |
|
215 | + * @throws InvalidArgumentException |
|
216 | + * |
|
217 | + * @see execute() |
|
218 | + */ |
|
219 | + public function setCode(callable $code): static |
|
220 | + { |
|
221 | + } |
|
222 | + |
|
223 | + /** |
|
224 | + * Merges the application definition with the command definition. |
|
225 | + * |
|
226 | + * This method is not part of public API and should not be used directly. |
|
227 | + * |
|
228 | + * @param bool $mergeArgs Whether to merge or not the Application definition arguments to Command definition arguments |
|
229 | + * |
|
230 | + * @internal |
|
231 | + */ |
|
232 | + public function mergeApplicationDefinition(bool $mergeArgs = true): void |
|
233 | + { |
|
234 | + } |
|
235 | + |
|
236 | + /** |
|
237 | + * Sets an array of argument and option instances. |
|
238 | + * |
|
239 | + * @return $this |
|
240 | + */ |
|
241 | + public function setDefinition(array|InputDefinition $definition): static |
|
242 | + { |
|
243 | + } |
|
244 | + |
|
245 | + /** |
|
246 | + * Gets the InputDefinition attached to this Command. |
|
247 | + */ |
|
248 | + public function getDefinition(): InputDefinition |
|
249 | + { |
|
250 | + } |
|
251 | + |
|
252 | + /** |
|
253 | + * Gets the InputDefinition to be used to create representations of this Command. |
|
254 | + * |
|
255 | + * Can be overridden to provide the original command representation when it would otherwise |
|
256 | + * be changed by merging with the application InputDefinition. |
|
257 | + * |
|
258 | + * This method is not part of public API and should not be used directly. |
|
259 | + */ |
|
260 | + public function getNativeDefinition(): InputDefinition |
|
261 | + { |
|
262 | + } |
|
263 | + |
|
264 | + /** |
|
265 | + * Adds an argument. |
|
266 | + * |
|
267 | + * @param $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL |
|
268 | + * @param $default The default value (for InputArgument::OPTIONAL mode only) |
|
269 | + * @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion |
|
270 | + * |
|
271 | + * @return $this |
|
272 | + * |
|
273 | + * @throws InvalidArgumentException When argument mode is not valid |
|
274 | + */ |
|
275 | + public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null): static |
|
276 | + { |
|
277 | + } |
|
278 | + |
|
279 | + /** |
|
280 | + * Adds an option. |
|
281 | + * |
|
282 | + * @param $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts |
|
283 | + * @param $mode The option mode: One of the InputOption::VALUE_* constants |
|
284 | + * @param $default The default value (must be null for InputOption::VALUE_NONE) |
|
285 | + * @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion |
|
286 | + * |
|
287 | + * @return $this |
|
288 | + * |
|
289 | + * @throws InvalidArgumentException If option mode is invalid or incompatible |
|
290 | + */ |
|
291 | + public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null): static |
|
292 | + { |
|
293 | + } |
|
294 | + |
|
295 | + /** |
|
296 | + * Sets the name of the command. |
|
297 | + * |
|
298 | + * This method can set both the namespace and the name if |
|
299 | + * you separate them by a colon (:) |
|
300 | + * |
|
301 | + * $command->setName('foo:bar'); |
|
302 | + * |
|
303 | + * @return $this |
|
304 | + * |
|
305 | + * @throws InvalidArgumentException When the name is invalid |
|
306 | + */ |
|
307 | + public function setName(string $name): static |
|
308 | + { |
|
309 | + } |
|
310 | + |
|
311 | + /** |
|
312 | + * Sets the process title of the command. |
|
313 | + * |
|
314 | + * This feature should be used only when creating a long process command, |
|
315 | + * like a daemon. |
|
316 | + * |
|
317 | + * @return $this |
|
318 | + */ |
|
319 | + public function setProcessTitle(string $title): static |
|
320 | + { |
|
321 | + } |
|
322 | + |
|
323 | + /** |
|
324 | + * Returns the command name. |
|
325 | + */ |
|
326 | + public function getName(): ?string |
|
327 | + { |
|
328 | + } |
|
329 | + |
|
330 | + /** |
|
331 | + * @param bool $hidden Whether or not the command should be hidden from the list of commands |
|
332 | + * |
|
333 | + * @return $this |
|
334 | + */ |
|
335 | + public function setHidden(bool $hidden = true): static |
|
336 | + { |
|
337 | + } |
|
338 | + |
|
339 | + /** |
|
340 | + * @return bool whether the command should be publicly shown or not |
|
341 | + */ |
|
342 | + public function isHidden(): bool |
|
343 | + { |
|
344 | + } |
|
345 | + |
|
346 | + /** |
|
347 | + * Sets the description for the command. |
|
348 | + * |
|
349 | + * @return $this |
|
350 | + */ |
|
351 | + public function setDescription(string $description): static |
|
352 | + { |
|
353 | + } |
|
354 | + |
|
355 | + /** |
|
356 | + * Returns the description for the command. |
|
357 | + */ |
|
358 | + public function getDescription(): string |
|
359 | + { |
|
360 | + } |
|
361 | + |
|
362 | + /** |
|
363 | + * Sets the help for the command. |
|
364 | + * |
|
365 | + * @return $this |
|
366 | + */ |
|
367 | + public function setHelp(string $help): static |
|
368 | + { |
|
369 | + } |
|
370 | + |
|
371 | + /** |
|
372 | + * Returns the help for the command. |
|
373 | + */ |
|
374 | + public function getHelp(): string |
|
375 | + { |
|
376 | + } |
|
377 | + |
|
378 | + /** |
|
379 | + * Returns the processed help for the command replacing the %command.name% and |
|
380 | + * %command.full_name% patterns with the real values dynamically. |
|
381 | + */ |
|
382 | + public function getProcessedHelp(): string |
|
383 | + { |
|
384 | + } |
|
385 | + |
|
386 | + /** |
|
387 | + * Sets the aliases for the command. |
|
388 | + * |
|
389 | + * @param string[] $aliases An array of aliases for the command |
|
390 | + * |
|
391 | + * @return $this |
|
392 | + * |
|
393 | + * @throws InvalidArgumentException When an alias is invalid |
|
394 | + */ |
|
395 | + public function setAliases(iterable $aliases): static |
|
396 | + { |
|
397 | + } |
|
398 | + |
|
399 | + /** |
|
400 | + * Returns the aliases for the command. |
|
401 | + */ |
|
402 | + public function getAliases(): array |
|
403 | + { |
|
404 | + } |
|
405 | + |
|
406 | + /** |
|
407 | + * Returns the synopsis for the command. |
|
408 | + * |
|
409 | + * @param bool $short Whether to show the short version of the synopsis (with options folded) or not |
|
410 | + */ |
|
411 | + public function getSynopsis(bool $short = false): string |
|
412 | + { |
|
413 | + } |
|
414 | + |
|
415 | + /** |
|
416 | + * Add a command usage example, it'll be prefixed with the command name. |
|
417 | + * |
|
418 | + * @return $this |
|
419 | + */ |
|
420 | + public function addUsage(string $usage): static |
|
421 | + { |
|
422 | + } |
|
423 | + |
|
424 | + /** |
|
425 | + * Returns alternative usages of the command. |
|
426 | + */ |
|
427 | + public function getUsages(): array |
|
428 | + { |
|
429 | + } |
|
430 | + |
|
431 | + /** |
|
432 | + * Gets a helper instance by name. |
|
433 | + * |
|
434 | + * @return HelperInterface |
|
435 | + * |
|
436 | + * @throws LogicException if no HelperSet is defined |
|
437 | + * @throws InvalidArgumentException if the helper is not defined |
|
438 | + */ |
|
439 | + public function getHelper(string $name): mixed |
|
440 | + { |
|
441 | + } |
|
442 | 442 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | * |
239 | 239 | * @return $this |
240 | 240 | */ |
241 | - public function setDefinition(array|InputDefinition $definition): static |
|
241 | + public function setDefinition(array | InputDefinition $definition): static |
|
242 | 242 | { |
243 | 243 | } |
244 | 244 | |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | * |
289 | 289 | * @throws InvalidArgumentException If option mode is invalid or incompatible |
290 | 290 | */ |
291 | - public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null): static |
|
291 | + public function addOption(string $name, string | array | null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null): static |
|
292 | 292 | { |
293 | 293 | } |
294 | 294 |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * @param string $search |
99 | 99 | * @return int|bool |
100 | 100 | */ |
101 | - public function count($search = ''): int|bool |
|
101 | + public function count($search = ''): int | bool |
|
102 | 102 | { |
103 | 103 | } |
104 | 104 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * |
108 | 108 | * @return int|bool |
109 | 109 | */ |
110 | - public function countDisabled(): int|bool |
|
110 | + public function countDisabled(): int | bool |
|
111 | 111 | { |
112 | 112 | } |
113 | 113 |
@@ -18,28 +18,28 @@ |
||
18 | 18 | */ |
19 | 19 | interface HelperInterface |
20 | 20 | { |
21 | - /** |
|
22 | - * Sets the helper set associated with this helper. |
|
23 | - * |
|
24 | - * @return void |
|
25 | - */ |
|
26 | - public function setHelperSet(?HelperSet $helperSet) |
|
27 | - { |
|
28 | - } |
|
21 | + /** |
|
22 | + * Sets the helper set associated with this helper. |
|
23 | + * |
|
24 | + * @return void |
|
25 | + */ |
|
26 | + public function setHelperSet(?HelperSet $helperSet) |
|
27 | + { |
|
28 | + } |
|
29 | 29 | |
30 | - /** |
|
31 | - * Gets the helper set associated with this helper. |
|
32 | - */ |
|
33 | - public function getHelperSet(): ?HelperSet |
|
34 | - { |
|
35 | - } |
|
30 | + /** |
|
31 | + * Gets the helper set associated with this helper. |
|
32 | + */ |
|
33 | + public function getHelperSet(): ?HelperSet |
|
34 | + { |
|
35 | + } |
|
36 | 36 | |
37 | - /** |
|
38 | - * Returns the canonical name of this helper. |
|
39 | - * |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function getName() |
|
43 | - { |
|
44 | - } |
|
37 | + /** |
|
38 | + * Returns the canonical name of this helper. |
|
39 | + * |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function getName() |
|
43 | + { |
|
44 | + } |
|
45 | 45 | } |
@@ -15,24 +15,24 @@ |
||
15 | 15 | */ |
16 | 16 | class DriverException extends Exception implements TheDriverException |
17 | 17 | { |
18 | - /** |
|
19 | - * @internal |
|
20 | - * |
|
21 | - * @param TheDriverException $driverException The DBAL driver exception to chain. |
|
22 | - * @param Query|null $query The SQL query that triggered the exception, if any. |
|
23 | - */ |
|
24 | - public function __construct(TheDriverException $driverException, ?Query $query) |
|
25 | - { |
|
26 | - } |
|
18 | + /** |
|
19 | + * @internal |
|
20 | + * |
|
21 | + * @param TheDriverException $driverException The DBAL driver exception to chain. |
|
22 | + * @param Query|null $query The SQL query that triggered the exception, if any. |
|
23 | + */ |
|
24 | + public function __construct(TheDriverException $driverException, ?Query $query) |
|
25 | + { |
|
26 | + } |
|
27 | 27 | |
28 | - /** |
|
29 | - * {@inheritDoc} |
|
30 | - */ |
|
31 | - public function getSQLState() |
|
32 | - { |
|
33 | - } |
|
28 | + /** |
|
29 | + * {@inheritDoc} |
|
30 | + */ |
|
31 | + public function getSQLState() |
|
32 | + { |
|
33 | + } |
|
34 | 34 | |
35 | - public function getQuery(): ?Query |
|
36 | - { |
|
37 | - } |
|
35 | + public function getQuery(): ?Query |
|
36 | + { |
|
37 | + } |
|
38 | 38 | } |
@@ -22,167 +22,167 @@ |
||
22 | 22 | /** @psalm-immutable */ |
23 | 23 | class SchemaException extends Exception |
24 | 24 | { |
25 | - /** @deprecated Use {@see TableDoesNotExist} instead. */ |
|
26 | - public const TABLE_DOESNT_EXIST = 10; |
|
27 | - |
|
28 | - /** @deprecated Use {@see TableAlreadyExists} instead. */ |
|
29 | - public const TABLE_ALREADY_EXISTS = 20; |
|
30 | - |
|
31 | - /** @deprecated Use {@see ColumnDoesNotExist} instead. */ |
|
32 | - public const COLUMN_DOESNT_EXIST = 30; |
|
33 | - |
|
34 | - /** @deprecated Use {@see ColumnAlreadyExists} instead. */ |
|
35 | - public const COLUMN_ALREADY_EXISTS = 40; |
|
36 | - |
|
37 | - /** @deprecated Use {@see IndexDoesNotExist} instead. */ |
|
38 | - public const INDEX_DOESNT_EXIST = 50; |
|
39 | - |
|
40 | - /** @deprecated Use {@see IndexAlreadyExists} instead. */ |
|
41 | - public const INDEX_ALREADY_EXISTS = 60; |
|
42 | - |
|
43 | - /** @deprecated Use {@see SequenceDoesNotExist} instead. */ |
|
44 | - public const SEQUENCE_DOENST_EXIST = 70; |
|
45 | - |
|
46 | - /** @deprecated Use {@see SequenceAlreadyExists} instead. */ |
|
47 | - public const SEQUENCE_ALREADY_EXISTS = 80; |
|
48 | - |
|
49 | - /** @deprecated Use {@see IndexNameInvalid} instead. */ |
|
50 | - public const INDEX_INVALID_NAME = 90; |
|
51 | - |
|
52 | - /** @deprecated Use {@see ForeignKeyDoesNotExist} instead. */ |
|
53 | - public const FOREIGNKEY_DOESNT_EXIST = 100; |
|
54 | - |
|
55 | - /** @deprecated Use {@see UniqueConstraintDoesNotExist} instead. */ |
|
56 | - public const CONSTRAINT_DOESNT_EXIST = 110; |
|
57 | - |
|
58 | - /** @deprecated Use {@see NamespaceAlreadyExists} instead. */ |
|
59 | - public const NAMESPACE_ALREADY_EXISTS = 120; |
|
60 | - |
|
61 | - /** |
|
62 | - * @param string $tableName |
|
63 | - * |
|
64 | - * @return SchemaException |
|
65 | - */ |
|
66 | - public static function tableDoesNotExist($tableName) |
|
67 | - { |
|
68 | - } |
|
69 | - |
|
70 | - /** |
|
71 | - * @param string $indexName |
|
72 | - * |
|
73 | - * @return SchemaException |
|
74 | - */ |
|
75 | - public static function indexNameInvalid($indexName) |
|
76 | - { |
|
77 | - } |
|
78 | - |
|
79 | - /** |
|
80 | - * @param string $indexName |
|
81 | - * @param string $table |
|
82 | - * |
|
83 | - * @return SchemaException |
|
84 | - */ |
|
85 | - public static function indexDoesNotExist($indexName, $table) |
|
86 | - { |
|
87 | - } |
|
88 | - |
|
89 | - /** |
|
90 | - * @param string $indexName |
|
91 | - * @param string $table |
|
92 | - * |
|
93 | - * @return SchemaException |
|
94 | - */ |
|
95 | - public static function indexAlreadyExists($indexName, $table) |
|
96 | - { |
|
97 | - } |
|
98 | - |
|
99 | - /** |
|
100 | - * @param string $columnName |
|
101 | - * @param string $table |
|
102 | - * |
|
103 | - * @return SchemaException |
|
104 | - */ |
|
105 | - public static function columnDoesNotExist($columnName, $table) |
|
106 | - { |
|
107 | - } |
|
108 | - |
|
109 | - /** |
|
110 | - * @param string $namespaceName |
|
111 | - * |
|
112 | - * @return SchemaException |
|
113 | - */ |
|
114 | - public static function namespaceAlreadyExists($namespaceName) |
|
115 | - { |
|
116 | - } |
|
117 | - |
|
118 | - /** |
|
119 | - * @param string $tableName |
|
120 | - * |
|
121 | - * @return SchemaException |
|
122 | - */ |
|
123 | - public static function tableAlreadyExists($tableName) |
|
124 | - { |
|
125 | - } |
|
126 | - |
|
127 | - /** |
|
128 | - * @param string $tableName |
|
129 | - * @param string $columnName |
|
130 | - * |
|
131 | - * @return SchemaException |
|
132 | - */ |
|
133 | - public static function columnAlreadyExists($tableName, $columnName) |
|
134 | - { |
|
135 | - } |
|
136 | - |
|
137 | - /** |
|
138 | - * @param string $name |
|
139 | - * |
|
140 | - * @return SchemaException |
|
141 | - */ |
|
142 | - public static function sequenceAlreadyExists($name) |
|
143 | - { |
|
144 | - } |
|
145 | - |
|
146 | - /** |
|
147 | - * @param string $name |
|
148 | - * |
|
149 | - * @return SchemaException |
|
150 | - */ |
|
151 | - public static function sequenceDoesNotExist($name) |
|
152 | - { |
|
153 | - } |
|
154 | - |
|
155 | - /** |
|
156 | - * @param string $constraintName |
|
157 | - * @param string $table |
|
158 | - * |
|
159 | - * @return SchemaException |
|
160 | - */ |
|
161 | - public static function uniqueConstraintDoesNotExist($constraintName, $table) |
|
162 | - { |
|
163 | - } |
|
164 | - |
|
165 | - /** |
|
166 | - * @param string $fkName |
|
167 | - * @param string $table |
|
168 | - * |
|
169 | - * @return SchemaException |
|
170 | - */ |
|
171 | - public static function foreignKeyDoesNotExist($fkName, $table) |
|
172 | - { |
|
173 | - } |
|
174 | - |
|
175 | - /** @return SchemaException */ |
|
176 | - public static function namedForeignKeyRequired(Table $localTable, ForeignKeyConstraint $foreignKey) |
|
177 | - { |
|
178 | - } |
|
179 | - |
|
180 | - /** |
|
181 | - * @param string $changeName |
|
182 | - * |
|
183 | - * @return SchemaException |
|
184 | - */ |
|
185 | - public static function alterTableChangeNotSupported($changeName) |
|
186 | - { |
|
187 | - } |
|
25 | + /** @deprecated Use {@see TableDoesNotExist} instead. */ |
|
26 | + public const TABLE_DOESNT_EXIST = 10; |
|
27 | + |
|
28 | + /** @deprecated Use {@see TableAlreadyExists} instead. */ |
|
29 | + public const TABLE_ALREADY_EXISTS = 20; |
|
30 | + |
|
31 | + /** @deprecated Use {@see ColumnDoesNotExist} instead. */ |
|
32 | + public const COLUMN_DOESNT_EXIST = 30; |
|
33 | + |
|
34 | + /** @deprecated Use {@see ColumnAlreadyExists} instead. */ |
|
35 | + public const COLUMN_ALREADY_EXISTS = 40; |
|
36 | + |
|
37 | + /** @deprecated Use {@see IndexDoesNotExist} instead. */ |
|
38 | + public const INDEX_DOESNT_EXIST = 50; |
|
39 | + |
|
40 | + /** @deprecated Use {@see IndexAlreadyExists} instead. */ |
|
41 | + public const INDEX_ALREADY_EXISTS = 60; |
|
42 | + |
|
43 | + /** @deprecated Use {@see SequenceDoesNotExist} instead. */ |
|
44 | + public const SEQUENCE_DOENST_EXIST = 70; |
|
45 | + |
|
46 | + /** @deprecated Use {@see SequenceAlreadyExists} instead. */ |
|
47 | + public const SEQUENCE_ALREADY_EXISTS = 80; |
|
48 | + |
|
49 | + /** @deprecated Use {@see IndexNameInvalid} instead. */ |
|
50 | + public const INDEX_INVALID_NAME = 90; |
|
51 | + |
|
52 | + /** @deprecated Use {@see ForeignKeyDoesNotExist} instead. */ |
|
53 | + public const FOREIGNKEY_DOESNT_EXIST = 100; |
|
54 | + |
|
55 | + /** @deprecated Use {@see UniqueConstraintDoesNotExist} instead. */ |
|
56 | + public const CONSTRAINT_DOESNT_EXIST = 110; |
|
57 | + |
|
58 | + /** @deprecated Use {@see NamespaceAlreadyExists} instead. */ |
|
59 | + public const NAMESPACE_ALREADY_EXISTS = 120; |
|
60 | + |
|
61 | + /** |
|
62 | + * @param string $tableName |
|
63 | + * |
|
64 | + * @return SchemaException |
|
65 | + */ |
|
66 | + public static function tableDoesNotExist($tableName) |
|
67 | + { |
|
68 | + } |
|
69 | + |
|
70 | + /** |
|
71 | + * @param string $indexName |
|
72 | + * |
|
73 | + * @return SchemaException |
|
74 | + */ |
|
75 | + public static function indexNameInvalid($indexName) |
|
76 | + { |
|
77 | + } |
|
78 | + |
|
79 | + /** |
|
80 | + * @param string $indexName |
|
81 | + * @param string $table |
|
82 | + * |
|
83 | + * @return SchemaException |
|
84 | + */ |
|
85 | + public static function indexDoesNotExist($indexName, $table) |
|
86 | + { |
|
87 | + } |
|
88 | + |
|
89 | + /** |
|
90 | + * @param string $indexName |
|
91 | + * @param string $table |
|
92 | + * |
|
93 | + * @return SchemaException |
|
94 | + */ |
|
95 | + public static function indexAlreadyExists($indexName, $table) |
|
96 | + { |
|
97 | + } |
|
98 | + |
|
99 | + /** |
|
100 | + * @param string $columnName |
|
101 | + * @param string $table |
|
102 | + * |
|
103 | + * @return SchemaException |
|
104 | + */ |
|
105 | + public static function columnDoesNotExist($columnName, $table) |
|
106 | + { |
|
107 | + } |
|
108 | + |
|
109 | + /** |
|
110 | + * @param string $namespaceName |
|
111 | + * |
|
112 | + * @return SchemaException |
|
113 | + */ |
|
114 | + public static function namespaceAlreadyExists($namespaceName) |
|
115 | + { |
|
116 | + } |
|
117 | + |
|
118 | + /** |
|
119 | + * @param string $tableName |
|
120 | + * |
|
121 | + * @return SchemaException |
|
122 | + */ |
|
123 | + public static function tableAlreadyExists($tableName) |
|
124 | + { |
|
125 | + } |
|
126 | + |
|
127 | + /** |
|
128 | + * @param string $tableName |
|
129 | + * @param string $columnName |
|
130 | + * |
|
131 | + * @return SchemaException |
|
132 | + */ |
|
133 | + public static function columnAlreadyExists($tableName, $columnName) |
|
134 | + { |
|
135 | + } |
|
136 | + |
|
137 | + /** |
|
138 | + * @param string $name |
|
139 | + * |
|
140 | + * @return SchemaException |
|
141 | + */ |
|
142 | + public static function sequenceAlreadyExists($name) |
|
143 | + { |
|
144 | + } |
|
145 | + |
|
146 | + /** |
|
147 | + * @param string $name |
|
148 | + * |
|
149 | + * @return SchemaException |
|
150 | + */ |
|
151 | + public static function sequenceDoesNotExist($name) |
|
152 | + { |
|
153 | + } |
|
154 | + |
|
155 | + /** |
|
156 | + * @param string $constraintName |
|
157 | + * @param string $table |
|
158 | + * |
|
159 | + * @return SchemaException |
|
160 | + */ |
|
161 | + public static function uniqueConstraintDoesNotExist($constraintName, $table) |
|
162 | + { |
|
163 | + } |
|
164 | + |
|
165 | + /** |
|
166 | + * @param string $fkName |
|
167 | + * @param string $table |
|
168 | + * |
|
169 | + * @return SchemaException |
|
170 | + */ |
|
171 | + public static function foreignKeyDoesNotExist($fkName, $table) |
|
172 | + { |
|
173 | + } |
|
174 | + |
|
175 | + /** @return SchemaException */ |
|
176 | + public static function namedForeignKeyRequired(Table $localTable, ForeignKeyConstraint $foreignKey) |
|
177 | + { |
|
178 | + } |
|
179 | + |
|
180 | + /** |
|
181 | + * @param string $changeName |
|
182 | + * |
|
183 | + * @return SchemaException |
|
184 | + */ |
|
185 | + public static function alterTableChangeNotSupported($changeName) |
|
186 | + { |
|
187 | + } |
|
188 | 188 | } |