@@ -19,21 +19,21 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | interface ConsoleOutputInterface extends OutputInterface |
| 21 | 21 | { |
| 22 | - /** |
|
| 23 | - * Gets the OutputInterface for errors. |
|
| 24 | - */ |
|
| 25 | - public function getErrorOutput(): OutputInterface |
|
| 26 | - { |
|
| 27 | - } |
|
| 22 | + /** |
|
| 23 | + * Gets the OutputInterface for errors. |
|
| 24 | + */ |
|
| 25 | + public function getErrorOutput(): OutputInterface |
|
| 26 | + { |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * @return void |
|
| 31 | - */ |
|
| 32 | - public function setErrorOutput(OutputInterface $error) |
|
| 33 | - { |
|
| 34 | - } |
|
| 29 | + /** |
|
| 30 | + * @return void |
|
| 31 | + */ |
|
| 32 | + public function setErrorOutput(OutputInterface $error) |
|
| 33 | + { |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | - public function section(): ConsoleSectionOutput |
|
| 37 | - { |
|
| 38 | - } |
|
| 36 | + public function section(): ConsoleSectionOutput |
|
| 37 | + { |
|
| 38 | + } |
|
| 39 | 39 | } |
@@ -20,116 +20,116 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | interface OutputInterface |
| 22 | 22 | { |
| 23 | - public const VERBOSITY_QUIET = 16; |
|
| 24 | - public const VERBOSITY_NORMAL = 32; |
|
| 25 | - public const VERBOSITY_VERBOSE = 64; |
|
| 26 | - public const VERBOSITY_VERY_VERBOSE = 128; |
|
| 27 | - public const VERBOSITY_DEBUG = 256; |
|
| 28 | - |
|
| 29 | - public const OUTPUT_NORMAL = 1; |
|
| 30 | - public const OUTPUT_RAW = 2; |
|
| 31 | - public const OUTPUT_PLAIN = 4; |
|
| 32 | - |
|
| 33 | - /** |
|
| 34 | - * Writes a message to the output. |
|
| 35 | - * |
|
| 36 | - * @param bool $newline Whether to add a newline |
|
| 37 | - * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), |
|
| 38 | - * 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL |
|
| 39 | - * |
|
| 40 | - * @return void |
|
| 41 | - */ |
|
| 42 | - public function write(string|iterable $messages, bool $newline = false, int $options = 0) |
|
| 43 | - { |
|
| 44 | - } |
|
| 45 | - |
|
| 46 | - /** |
|
| 47 | - * Writes a message to the output and adds a newline at the end. |
|
| 48 | - * |
|
| 49 | - * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), |
|
| 50 | - * 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL |
|
| 51 | - * |
|
| 52 | - * @return void |
|
| 53 | - */ |
|
| 54 | - public function writeln(string|iterable $messages, int $options = 0) |
|
| 55 | - { |
|
| 56 | - } |
|
| 57 | - |
|
| 58 | - /** |
|
| 59 | - * Sets the verbosity of the output. |
|
| 60 | - * |
|
| 61 | - * @param self::VERBOSITY_* $level |
|
| 62 | - * |
|
| 63 | - * @return void |
|
| 64 | - */ |
|
| 65 | - public function setVerbosity(int $level) |
|
| 66 | - { |
|
| 67 | - } |
|
| 68 | - |
|
| 69 | - /** |
|
| 70 | - * Gets the current verbosity of the output. |
|
| 71 | - * |
|
| 72 | - * @return self::VERBOSITY_* |
|
| 73 | - */ |
|
| 74 | - public function getVerbosity(): int |
|
| 75 | - { |
|
| 76 | - } |
|
| 77 | - |
|
| 78 | - /** |
|
| 79 | - * Returns whether verbosity is quiet (-q). |
|
| 80 | - */ |
|
| 81 | - public function isQuiet(): bool |
|
| 82 | - { |
|
| 83 | - } |
|
| 84 | - |
|
| 85 | - /** |
|
| 86 | - * Returns whether verbosity is verbose (-v). |
|
| 87 | - */ |
|
| 88 | - public function isVerbose(): bool |
|
| 89 | - { |
|
| 90 | - } |
|
| 91 | - |
|
| 92 | - /** |
|
| 93 | - * Returns whether verbosity is very verbose (-vv). |
|
| 94 | - */ |
|
| 95 | - public function isVeryVerbose(): bool |
|
| 96 | - { |
|
| 97 | - } |
|
| 98 | - |
|
| 99 | - /** |
|
| 100 | - * Returns whether verbosity is debug (-vvv). |
|
| 101 | - */ |
|
| 102 | - public function isDebug(): bool |
|
| 103 | - { |
|
| 104 | - } |
|
| 105 | - |
|
| 106 | - /** |
|
| 107 | - * Sets the decorated flag. |
|
| 108 | - * |
|
| 109 | - * @return void |
|
| 110 | - */ |
|
| 111 | - public function setDecorated(bool $decorated) |
|
| 112 | - { |
|
| 113 | - } |
|
| 114 | - |
|
| 115 | - /** |
|
| 116 | - * Gets the decorated flag. |
|
| 117 | - */ |
|
| 118 | - public function isDecorated(): bool |
|
| 119 | - { |
|
| 120 | - } |
|
| 121 | - |
|
| 122 | - /** |
|
| 123 | - * @return void |
|
| 124 | - */ |
|
| 125 | - public function setFormatter(OutputFormatterInterface $formatter) |
|
| 126 | - { |
|
| 127 | - } |
|
| 128 | - |
|
| 129 | - /** |
|
| 130 | - * Returns current output formatter instance. |
|
| 131 | - */ |
|
| 132 | - public function getFormatter(): OutputFormatterInterface |
|
| 133 | - { |
|
| 134 | - } |
|
| 23 | + public const VERBOSITY_QUIET = 16; |
|
| 24 | + public const VERBOSITY_NORMAL = 32; |
|
| 25 | + public const VERBOSITY_VERBOSE = 64; |
|
| 26 | + public const VERBOSITY_VERY_VERBOSE = 128; |
|
| 27 | + public const VERBOSITY_DEBUG = 256; |
|
| 28 | + |
|
| 29 | + public const OUTPUT_NORMAL = 1; |
|
| 30 | + public const OUTPUT_RAW = 2; |
|
| 31 | + public const OUTPUT_PLAIN = 4; |
|
| 32 | + |
|
| 33 | + /** |
|
| 34 | + * Writes a message to the output. |
|
| 35 | + * |
|
| 36 | + * @param bool $newline Whether to add a newline |
|
| 37 | + * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), |
|
| 38 | + * 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL |
|
| 39 | + * |
|
| 40 | + * @return void |
|
| 41 | + */ |
|
| 42 | + public function write(string|iterable $messages, bool $newline = false, int $options = 0) |
|
| 43 | + { |
|
| 44 | + } |
|
| 45 | + |
|
| 46 | + /** |
|
| 47 | + * Writes a message to the output and adds a newline at the end. |
|
| 48 | + * |
|
| 49 | + * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), |
|
| 50 | + * 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL |
|
| 51 | + * |
|
| 52 | + * @return void |
|
| 53 | + */ |
|
| 54 | + public function writeln(string|iterable $messages, int $options = 0) |
|
| 55 | + { |
|
| 56 | + } |
|
| 57 | + |
|
| 58 | + /** |
|
| 59 | + * Sets the verbosity of the output. |
|
| 60 | + * |
|
| 61 | + * @param self::VERBOSITY_* $level |
|
| 62 | + * |
|
| 63 | + * @return void |
|
| 64 | + */ |
|
| 65 | + public function setVerbosity(int $level) |
|
| 66 | + { |
|
| 67 | + } |
|
| 68 | + |
|
| 69 | + /** |
|
| 70 | + * Gets the current verbosity of the output. |
|
| 71 | + * |
|
| 72 | + * @return self::VERBOSITY_* |
|
| 73 | + */ |
|
| 74 | + public function getVerbosity(): int |
|
| 75 | + { |
|
| 76 | + } |
|
| 77 | + |
|
| 78 | + /** |
|
| 79 | + * Returns whether verbosity is quiet (-q). |
|
| 80 | + */ |
|
| 81 | + public function isQuiet(): bool |
|
| 82 | + { |
|
| 83 | + } |
|
| 84 | + |
|
| 85 | + /** |
|
| 86 | + * Returns whether verbosity is verbose (-v). |
|
| 87 | + */ |
|
| 88 | + public function isVerbose(): bool |
|
| 89 | + { |
|
| 90 | + } |
|
| 91 | + |
|
| 92 | + /** |
|
| 93 | + * Returns whether verbosity is very verbose (-vv). |
|
| 94 | + */ |
|
| 95 | + public function isVeryVerbose(): bool |
|
| 96 | + { |
|
| 97 | + } |
|
| 98 | + |
|
| 99 | + /** |
|
| 100 | + * Returns whether verbosity is debug (-vvv). |
|
| 101 | + */ |
|
| 102 | + public function isDebug(): bool |
|
| 103 | + { |
|
| 104 | + } |
|
| 105 | + |
|
| 106 | + /** |
|
| 107 | + * Sets the decorated flag. |
|
| 108 | + * |
|
| 109 | + * @return void |
|
| 110 | + */ |
|
| 111 | + public function setDecorated(bool $decorated) |
|
| 112 | + { |
|
| 113 | + } |
|
| 114 | + |
|
| 115 | + /** |
|
| 116 | + * Gets the decorated flag. |
|
| 117 | + */ |
|
| 118 | + public function isDecorated(): bool |
|
| 119 | + { |
|
| 120 | + } |
|
| 121 | + |
|
| 122 | + /** |
|
| 123 | + * @return void |
|
| 124 | + */ |
|
| 125 | + public function setFormatter(OutputFormatterInterface $formatter) |
|
| 126 | + { |
|
| 127 | + } |
|
| 128 | + |
|
| 129 | + /** |
|
| 130 | + * Returns current output formatter instance. |
|
| 131 | + */ |
|
| 132 | + public function getFormatter(): OutputFormatterInterface |
|
| 133 | + { |
|
| 134 | + } |
|
| 135 | 135 | } |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * |
| 40 | 40 | * @return void |
| 41 | 41 | */ |
| 42 | - public function write(string|iterable $messages, bool $newline = false, int $options = 0) |
|
| 42 | + public function write(string | iterable $messages, bool $newline = false, int $options = 0) |
|
| 43 | 43 | { |
| 44 | 44 | } |
| 45 | 45 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * |
| 52 | 52 | * @return void |
| 53 | 53 | */ |
| 54 | - public function writeln(string|iterable $messages, int $options = 0) |
|
| 54 | + public function writeln(string | iterable $messages, int $options = 0) |
|
| 55 | 55 | { |
| 56 | 56 | } |
| 57 | 57 | |
@@ -44,1047 +44,1047 @@ |
||
| 44 | 44 | */ |
| 45 | 45 | class QueryBuilder |
| 46 | 46 | { |
| 47 | - /** @deprecated */ |
|
| 48 | - public const SELECT = 0; |
|
| 47 | + /** @deprecated */ |
|
| 48 | + public const SELECT = 0; |
|
| 49 | 49 | |
| 50 | - /** @deprecated */ |
|
| 51 | - public const DELETE = 1; |
|
| 50 | + /** @deprecated */ |
|
| 51 | + public const DELETE = 1; |
|
| 52 | 52 | |
| 53 | - /** @deprecated */ |
|
| 54 | - public const UPDATE = 2; |
|
| 53 | + /** @deprecated */ |
|
| 54 | + public const UPDATE = 2; |
|
| 55 | 55 | |
| 56 | - /** @deprecated */ |
|
| 57 | - public const INSERT = 3; |
|
| 56 | + /** @deprecated */ |
|
| 57 | + public const INSERT = 3; |
|
| 58 | 58 | |
| 59 | - /** @deprecated */ |
|
| 60 | - public const STATE_DIRTY = 0; |
|
| 59 | + /** @deprecated */ |
|
| 60 | + public const STATE_DIRTY = 0; |
|
| 61 | 61 | |
| 62 | - /** @deprecated */ |
|
| 63 | - public const STATE_CLEAN = 1; |
|
| 62 | + /** @deprecated */ |
|
| 63 | + public const STATE_CLEAN = 1; |
|
| 64 | 64 | |
| 65 | - /* |
|
| 65 | + /* |
|
| 66 | 66 | * The default values of SQL parts collection |
| 67 | 67 | */ |
| 68 | - private const SQL_PARTS_DEFAULTS = [ |
|
| 69 | - 'select' => [], |
|
| 70 | - 'distinct' => false, |
|
| 71 | - 'from' => [], |
|
| 72 | - 'join' => [], |
|
| 73 | - 'set' => [], |
|
| 74 | - 'where' => null, |
|
| 75 | - 'groupBy' => [], |
|
| 76 | - 'having' => null, |
|
| 77 | - 'orderBy' => [], |
|
| 78 | - 'values' => [], |
|
| 79 | - 'for_update' => null, |
|
| 80 | - ]; |
|
| 81 | - |
|
| 82 | - /** |
|
| 83 | - * Initializes a new <tt>QueryBuilder</tt>. |
|
| 84 | - * |
|
| 85 | - * @param Connection $connection The DBAL Connection. |
|
| 86 | - */ |
|
| 87 | - public function __construct(Connection $connection) |
|
| 88 | - { |
|
| 89 | - } |
|
| 90 | - |
|
| 91 | - /** |
|
| 92 | - * Gets an ExpressionBuilder used for object-oriented construction of query expressions. |
|
| 93 | - * This producer method is intended for convenient inline usage. Example: |
|
| 94 | - * |
|
| 95 | - * <code> |
|
| 96 | - * $qb = $conn->createQueryBuilder() |
|
| 97 | - * ->select('u') |
|
| 98 | - * ->from('users', 'u') |
|
| 99 | - * ->where($qb->expr()->eq('u.id', 1)); |
|
| 100 | - * </code> |
|
| 101 | - * |
|
| 102 | - * For more complex expression construction, consider storing the expression |
|
| 103 | - * builder object in a local variable. |
|
| 104 | - * |
|
| 105 | - * @return ExpressionBuilder |
|
| 106 | - */ |
|
| 107 | - public function expr() |
|
| 108 | - { |
|
| 109 | - } |
|
| 110 | - |
|
| 111 | - /** |
|
| 112 | - * Gets the type of the currently built query. |
|
| 113 | - * |
|
| 114 | - * @deprecated If necessary, track the type of the query being built outside of the builder. |
|
| 115 | - * |
|
| 116 | - * @return int |
|
| 117 | - */ |
|
| 118 | - public function getType() |
|
| 119 | - { |
|
| 120 | - } |
|
| 121 | - |
|
| 122 | - /** |
|
| 123 | - * Gets the associated DBAL Connection for this query builder. |
|
| 124 | - * |
|
| 125 | - * @deprecated Use the connection used to instantiate the builder instead. |
|
| 126 | - * |
|
| 127 | - * @return Connection |
|
| 128 | - */ |
|
| 129 | - public function getConnection() |
|
| 130 | - { |
|
| 131 | - } |
|
| 132 | - |
|
| 133 | - /** |
|
| 134 | - * Gets the state of this query builder instance. |
|
| 135 | - * |
|
| 136 | - * @deprecated The builder state is an internal concern. |
|
| 137 | - * |
|
| 138 | - * @return int Either QueryBuilder::STATE_DIRTY or QueryBuilder::STATE_CLEAN. |
|
| 139 | - * @psalm-return self::STATE_* |
|
| 140 | - */ |
|
| 141 | - public function getState() |
|
| 142 | - { |
|
| 143 | - } |
|
| 144 | - |
|
| 145 | - /** |
|
| 146 | - * Prepares and executes an SQL query and returns the first row of the result |
|
| 147 | - * as an associative array. |
|
| 148 | - * |
|
| 149 | - * @return array<string, mixed>|false False is returned if no rows are found. |
|
| 150 | - * |
|
| 151 | - * @throws Exception |
|
| 152 | - */ |
|
| 153 | - public function fetchAssociative() |
|
| 154 | - { |
|
| 155 | - } |
|
| 156 | - |
|
| 157 | - /** |
|
| 158 | - * Prepares and executes an SQL query and returns the first row of the result |
|
| 159 | - * as a numerically indexed array. |
|
| 160 | - * |
|
| 161 | - * @return array<int, mixed>|false False is returned if no rows are found. |
|
| 162 | - * |
|
| 163 | - * @throws Exception |
|
| 164 | - */ |
|
| 165 | - public function fetchNumeric() |
|
| 166 | - { |
|
| 167 | - } |
|
| 168 | - |
|
| 169 | - /** |
|
| 170 | - * Prepares and executes an SQL query and returns the value of a single column |
|
| 171 | - * of the first row of the result. |
|
| 172 | - * |
|
| 173 | - * @return mixed|false False is returned if no rows are found. |
|
| 174 | - * |
|
| 175 | - * @throws Exception |
|
| 176 | - */ |
|
| 177 | - public function fetchOne() |
|
| 178 | - { |
|
| 179 | - } |
|
| 180 | - |
|
| 181 | - /** |
|
| 182 | - * Prepares and executes an SQL query and returns the result as an array of numeric arrays. |
|
| 183 | - * |
|
| 184 | - * @return array<int,array<int,mixed>> |
|
| 185 | - * |
|
| 186 | - * @throws Exception |
|
| 187 | - */ |
|
| 188 | - public function fetchAllNumeric(): array |
|
| 189 | - { |
|
| 190 | - } |
|
| 191 | - |
|
| 192 | - /** |
|
| 193 | - * Prepares and executes an SQL query and returns the result as an array of associative arrays. |
|
| 194 | - * |
|
| 195 | - * @return array<int,array<string,mixed>> |
|
| 196 | - * |
|
| 197 | - * @throws Exception |
|
| 198 | - */ |
|
| 199 | - public function fetchAllAssociative(): array |
|
| 200 | - { |
|
| 201 | - } |
|
| 202 | - |
|
| 203 | - /** |
|
| 204 | - * Prepares and executes an SQL query and returns the result as an associative array with the keys |
|
| 205 | - * mapped to the first column and the values mapped to the second column. |
|
| 206 | - * |
|
| 207 | - * @return array<mixed,mixed> |
|
| 208 | - * |
|
| 209 | - * @throws Exception |
|
| 210 | - */ |
|
| 211 | - public function fetchAllKeyValue(): array |
|
| 212 | - { |
|
| 213 | - } |
|
| 214 | - |
|
| 215 | - /** |
|
| 216 | - * Prepares and executes an SQL query and returns the result as an associative array with the keys mapped |
|
| 217 | - * to the first column and the values being an associative array representing the rest of the columns |
|
| 218 | - * and their values. |
|
| 219 | - * |
|
| 220 | - * @return array<mixed,array<string,mixed>> |
|
| 221 | - * |
|
| 222 | - * @throws Exception |
|
| 223 | - */ |
|
| 224 | - public function fetchAllAssociativeIndexed(): array |
|
| 225 | - { |
|
| 226 | - } |
|
| 227 | - |
|
| 228 | - /** |
|
| 229 | - * Prepares and executes an SQL query and returns the result as an array of the first column values. |
|
| 230 | - * |
|
| 231 | - * @return array<int,mixed> |
|
| 232 | - * |
|
| 233 | - * @throws Exception |
|
| 234 | - */ |
|
| 235 | - public function fetchFirstColumn(): array |
|
| 236 | - { |
|
| 237 | - } |
|
| 238 | - |
|
| 239 | - /** |
|
| 240 | - * Executes an SQL query (SELECT) and returns a Result. |
|
| 241 | - * |
|
| 242 | - * @throws Exception |
|
| 243 | - */ |
|
| 244 | - public function executeQuery(): Result |
|
| 245 | - { |
|
| 246 | - } |
|
| 247 | - |
|
| 248 | - /** |
|
| 249 | - * Executes an SQL statement and returns the number of affected rows. |
|
| 250 | - * |
|
| 251 | - * Should be used for INSERT, UPDATE and DELETE |
|
| 252 | - * |
|
| 253 | - * @return int The number of affected rows. |
|
| 254 | - * |
|
| 255 | - * @throws Exception |
|
| 256 | - */ |
|
| 257 | - public function executeStatement(): int |
|
| 258 | - { |
|
| 259 | - } |
|
| 260 | - |
|
| 261 | - /** |
|
| 262 | - * Executes this query using the bound parameters and their types. |
|
| 263 | - * |
|
| 264 | - * @deprecated Use {@see executeQuery()} or {@see executeStatement()} instead. |
|
| 265 | - * |
|
| 266 | - * @return Result|int|string |
|
| 267 | - * |
|
| 268 | - * @throws Exception |
|
| 269 | - */ |
|
| 270 | - public function execute() |
|
| 271 | - { |
|
| 272 | - } |
|
| 273 | - |
|
| 274 | - /** |
|
| 275 | - * Gets the complete SQL string formed by the current specifications of this QueryBuilder. |
|
| 276 | - * |
|
| 277 | - * <code> |
|
| 278 | - * $qb = $em->createQueryBuilder() |
|
| 279 | - * ->select('u') |
|
| 280 | - * ->from('User', 'u') |
|
| 281 | - * echo $qb->getSQL(); // SELECT u FROM User u |
|
| 282 | - * </code> |
|
| 283 | - * |
|
| 284 | - * @return string The SQL query string. |
|
| 285 | - */ |
|
| 286 | - public function getSQL() |
|
| 287 | - { |
|
| 288 | - } |
|
| 289 | - |
|
| 290 | - /** |
|
| 291 | - * Sets a query parameter for the query being constructed. |
|
| 292 | - * |
|
| 293 | - * <code> |
|
| 294 | - * $qb = $conn->createQueryBuilder() |
|
| 295 | - * ->select('u') |
|
| 296 | - * ->from('users', 'u') |
|
| 297 | - * ->where('u.id = :user_id') |
|
| 298 | - * ->setParameter('user_id', 1); |
|
| 299 | - * </code> |
|
| 300 | - * |
|
| 301 | - * @param int|string $key Parameter position or name |
|
| 302 | - * @param mixed $value Parameter value |
|
| 303 | - * @param int|string|Type|null $type Parameter type |
|
| 304 | - * |
|
| 305 | - * @return $this This QueryBuilder instance. |
|
| 306 | - */ |
|
| 307 | - public function setParameter($key, $value, $type = ParameterType::STRING) |
|
| 308 | - { |
|
| 309 | - } |
|
| 310 | - |
|
| 311 | - /** |
|
| 312 | - * Sets a collection of query parameters for the query being constructed. |
|
| 313 | - * |
|
| 314 | - * <code> |
|
| 315 | - * $qb = $conn->createQueryBuilder() |
|
| 316 | - * ->select('u') |
|
| 317 | - * ->from('users', 'u') |
|
| 318 | - * ->where('u.id = :user_id1 OR u.id = :user_id2') |
|
| 319 | - * ->setParameters(array( |
|
| 320 | - * 'user_id1' => 1, |
|
| 321 | - * 'user_id2' => 2 |
|
| 322 | - * )); |
|
| 323 | - * </code> |
|
| 324 | - * |
|
| 325 | - * @param list<mixed>|array<string, mixed> $params Parameters to set |
|
| 326 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
| 327 | - * |
|
| 328 | - * @return $this This QueryBuilder instance. |
|
| 329 | - */ |
|
| 330 | - public function setParameters(array $params, array $types = []) |
|
| 331 | - { |
|
| 332 | - } |
|
| 333 | - |
|
| 334 | - /** |
|
| 335 | - * Gets all defined query parameters for the query being constructed indexed by parameter index or name. |
|
| 336 | - * |
|
| 337 | - * @return list<mixed>|array<string, mixed> The currently defined query parameters |
|
| 338 | - */ |
|
| 339 | - public function getParameters() |
|
| 340 | - { |
|
| 341 | - } |
|
| 342 | - |
|
| 343 | - /** |
|
| 344 | - * Gets a (previously set) query parameter of the query being constructed. |
|
| 345 | - * |
|
| 346 | - * @param mixed $key The key (index or name) of the bound parameter. |
|
| 347 | - * |
|
| 348 | - * @return mixed The value of the bound parameter. |
|
| 349 | - */ |
|
| 350 | - public function getParameter($key) |
|
| 351 | - { |
|
| 352 | - } |
|
| 353 | - |
|
| 354 | - /** |
|
| 355 | - * Gets all defined query parameter types for the query being constructed indexed by parameter index or name. |
|
| 356 | - * |
|
| 357 | - * @return array<int, int|string|Type|null>|array<string, int|string|Type|null> The currently defined |
|
| 358 | - * query parameter types |
|
| 359 | - */ |
|
| 360 | - public function getParameterTypes() |
|
| 361 | - { |
|
| 362 | - } |
|
| 363 | - |
|
| 364 | - /** |
|
| 365 | - * Gets a (previously set) query parameter type of the query being constructed. |
|
| 366 | - * |
|
| 367 | - * @param int|string $key The key of the bound parameter type |
|
| 368 | - * |
|
| 369 | - * @return int|string|Type The value of the bound parameter type |
|
| 370 | - */ |
|
| 371 | - public function getParameterType($key) |
|
| 372 | - { |
|
| 373 | - } |
|
| 374 | - |
|
| 375 | - /** |
|
| 376 | - * Sets the position of the first result to retrieve (the "offset"). |
|
| 377 | - * |
|
| 378 | - * @param int $firstResult The first result to return. |
|
| 379 | - * |
|
| 380 | - * @return $this This QueryBuilder instance. |
|
| 381 | - */ |
|
| 382 | - public function setFirstResult($firstResult) |
|
| 383 | - { |
|
| 384 | - } |
|
| 385 | - |
|
| 386 | - /** |
|
| 387 | - * Gets the position of the first result the query object was set to retrieve (the "offset"). |
|
| 388 | - * |
|
| 389 | - * @return int The position of the first result. |
|
| 390 | - */ |
|
| 391 | - public function getFirstResult() |
|
| 392 | - { |
|
| 393 | - } |
|
| 394 | - |
|
| 395 | - /** |
|
| 396 | - * Sets the maximum number of results to retrieve (the "limit"). |
|
| 397 | - * |
|
| 398 | - * @param int|null $maxResults The maximum number of results to retrieve or NULL to retrieve all results. |
|
| 399 | - * |
|
| 400 | - * @return $this This QueryBuilder instance. |
|
| 401 | - */ |
|
| 402 | - public function setMaxResults($maxResults) |
|
| 403 | - { |
|
| 404 | - } |
|
| 405 | - |
|
| 406 | - /** |
|
| 407 | - * Gets the maximum number of results the query object was set to retrieve (the "limit"). |
|
| 408 | - * Returns NULL if all results will be returned. |
|
| 409 | - * |
|
| 410 | - * @return int|null The maximum number of results. |
|
| 411 | - */ |
|
| 412 | - public function getMaxResults() |
|
| 413 | - { |
|
| 414 | - } |
|
| 415 | - |
|
| 416 | - /** |
|
| 417 | - * Locks the queried rows for a subsequent update. |
|
| 418 | - * |
|
| 419 | - * @return $this |
|
| 420 | - */ |
|
| 421 | - public function forUpdate(int $conflictResolutionMode = ConflictResolutionMode::ORDINARY): self |
|
| 422 | - { |
|
| 423 | - } |
|
| 424 | - |
|
| 425 | - /** |
|
| 426 | - * Either appends to or replaces a single, generic query part. |
|
| 427 | - * |
|
| 428 | - * The available parts are: 'select', 'from', 'set', 'where', |
|
| 429 | - * 'groupBy', 'having' and 'orderBy'. |
|
| 430 | - * |
|
| 431 | - * @param string $sqlPartName |
|
| 432 | - * @param mixed $sqlPart |
|
| 433 | - * @param bool $append |
|
| 434 | - * |
|
| 435 | - * @return $this This QueryBuilder instance. |
|
| 436 | - */ |
|
| 437 | - public function add($sqlPartName, $sqlPart, $append = false) |
|
| 438 | - { |
|
| 439 | - } |
|
| 440 | - |
|
| 441 | - /** |
|
| 442 | - * Specifies an item that is to be returned in the query result. |
|
| 443 | - * Replaces any previously specified selections, if any. |
|
| 444 | - * |
|
| 445 | - * USING AN ARRAY ARGUMENT IS DEPRECATED. Pass each value as an individual argument. |
|
| 446 | - * |
|
| 447 | - * <code> |
|
| 448 | - * $qb = $conn->createQueryBuilder() |
|
| 449 | - * ->select('u.id', 'p.id') |
|
| 450 | - * ->from('users', 'u') |
|
| 451 | - * ->leftJoin('u', 'phonenumbers', 'p', 'u.id = p.user_id'); |
|
| 452 | - * </code> |
|
| 453 | - * |
|
| 454 | - * @param string|string[]|null $select The selection expression. USING AN ARRAY OR NULL IS DEPRECATED. |
|
| 455 | - * Pass each value as an individual argument. |
|
| 456 | - * |
|
| 457 | - * @return $this This QueryBuilder instance. |
|
| 458 | - */ |
|
| 459 | - public function select($select = null) |
|
| 460 | - { |
|
| 461 | - } |
|
| 462 | - |
|
| 463 | - /** |
|
| 464 | - * Adds or removes DISTINCT to/from the query. |
|
| 465 | - * |
|
| 466 | - * <code> |
|
| 467 | - * $qb = $conn->createQueryBuilder() |
|
| 468 | - * ->select('u.id') |
|
| 469 | - * ->distinct() |
|
| 470 | - * ->from('users', 'u') |
|
| 471 | - * </code> |
|
| 472 | - * |
|
| 473 | - * @return $this This QueryBuilder instance. |
|
| 474 | - */ |
|
| 475 | - public function distinct(): self |
|
| 476 | - { |
|
| 477 | - } |
|
| 478 | - |
|
| 479 | - /** |
|
| 480 | - * Adds an item that is to be returned in the query result. |
|
| 481 | - * |
|
| 482 | - * USING AN ARRAY ARGUMENT IS DEPRECATED. Pass each value as an individual argument. |
|
| 483 | - * |
|
| 484 | - * <code> |
|
| 485 | - * $qb = $conn->createQueryBuilder() |
|
| 486 | - * ->select('u.id') |
|
| 487 | - * ->addSelect('p.id') |
|
| 488 | - * ->from('users', 'u') |
|
| 489 | - * ->leftJoin('u', 'phonenumbers', 'u.id = p.user_id'); |
|
| 490 | - * </code> |
|
| 491 | - * |
|
| 492 | - * @param string|string[]|null $select The selection expression. USING AN ARRAY OR NULL IS DEPRECATED. |
|
| 493 | - * Pass each value as an individual argument. |
|
| 494 | - * |
|
| 495 | - * @return $this This QueryBuilder instance. |
|
| 496 | - */ |
|
| 497 | - public function addSelect($select = null) |
|
| 498 | - { |
|
| 499 | - } |
|
| 500 | - |
|
| 501 | - /** |
|
| 502 | - * Turns the query being built into a bulk delete query that ranges over |
|
| 503 | - * a certain table. |
|
| 504 | - * |
|
| 505 | - * <code> |
|
| 506 | - * $qb = $conn->createQueryBuilder() |
|
| 507 | - * ->delete('users', 'u') |
|
| 508 | - * ->where('u.id = :user_id') |
|
| 509 | - * ->setParameter(':user_id', 1); |
|
| 510 | - * </code> |
|
| 511 | - * |
|
| 512 | - * @param string $delete The table whose rows are subject to the deletion. |
|
| 513 | - * @param string $alias The table alias used in the constructed query. |
|
| 514 | - * |
|
| 515 | - * @return $this This QueryBuilder instance. |
|
| 516 | - */ |
|
| 517 | - public function delete($delete = null, $alias = null) |
|
| 518 | - { |
|
| 519 | - } |
|
| 520 | - |
|
| 521 | - /** |
|
| 522 | - * Turns the query being built into a bulk update query that ranges over |
|
| 523 | - * a certain table |
|
| 524 | - * |
|
| 525 | - * <code> |
|
| 526 | - * $qb = $conn->createQueryBuilder() |
|
| 527 | - * ->update('counters', 'c') |
|
| 528 | - * ->set('c.value', 'c.value + 1') |
|
| 529 | - * ->where('c.id = ?'); |
|
| 530 | - * </code> |
|
| 531 | - * |
|
| 532 | - * @param string $update The table whose rows are subject to the update. |
|
| 533 | - * @param string $alias The table alias used in the constructed query. |
|
| 534 | - * |
|
| 535 | - * @return $this This QueryBuilder instance. |
|
| 536 | - */ |
|
| 537 | - public function update($update = null, $alias = null) |
|
| 538 | - { |
|
| 539 | - } |
|
| 540 | - |
|
| 541 | - /** |
|
| 542 | - * Turns the query being built into an insert query that inserts into |
|
| 543 | - * a certain table |
|
| 544 | - * |
|
| 545 | - * <code> |
|
| 546 | - * $qb = $conn->createQueryBuilder() |
|
| 547 | - * ->insert('users') |
|
| 548 | - * ->values( |
|
| 549 | - * array( |
|
| 550 | - * 'name' => '?', |
|
| 551 | - * 'password' => '?' |
|
| 552 | - * ) |
|
| 553 | - * ); |
|
| 554 | - * </code> |
|
| 555 | - * |
|
| 556 | - * @param string $insert The table into which the rows should be inserted. |
|
| 557 | - * |
|
| 558 | - * @return $this This QueryBuilder instance. |
|
| 559 | - */ |
|
| 560 | - public function insert($insert = null) |
|
| 561 | - { |
|
| 562 | - } |
|
| 563 | - |
|
| 564 | - /** |
|
| 565 | - * Creates and adds a query root corresponding to the table identified by the |
|
| 566 | - * given alias, forming a cartesian product with any existing query roots. |
|
| 567 | - * |
|
| 568 | - * <code> |
|
| 569 | - * $qb = $conn->createQueryBuilder() |
|
| 570 | - * ->select('u.id') |
|
| 571 | - * ->from('users', 'u') |
|
| 572 | - * </code> |
|
| 573 | - * |
|
| 574 | - * @param string $from The table. |
|
| 575 | - * @param string|null $alias The alias of the table. |
|
| 576 | - * |
|
| 577 | - * @return $this This QueryBuilder instance. |
|
| 578 | - */ |
|
| 579 | - public function from($from, $alias = null) |
|
| 580 | - { |
|
| 581 | - } |
|
| 582 | - |
|
| 583 | - /** |
|
| 584 | - * Creates and adds a join to the query. |
|
| 585 | - * |
|
| 586 | - * <code> |
|
| 587 | - * $qb = $conn->createQueryBuilder() |
|
| 588 | - * ->select('u.name') |
|
| 589 | - * ->from('users', 'u') |
|
| 590 | - * ->join('u', 'phonenumbers', 'p', 'p.is_primary = 1'); |
|
| 591 | - * </code> |
|
| 592 | - * |
|
| 593 | - * @param string $fromAlias The alias that points to a from clause. |
|
| 594 | - * @param string $join The table name to join. |
|
| 595 | - * @param string $alias The alias of the join table. |
|
| 596 | - * @param string $condition The condition for the join. |
|
| 597 | - * |
|
| 598 | - * @return $this This QueryBuilder instance. |
|
| 599 | - */ |
|
| 600 | - public function join($fromAlias, $join, $alias, $condition = null) |
|
| 601 | - { |
|
| 602 | - } |
|
| 603 | - |
|
| 604 | - /** |
|
| 605 | - * Creates and adds a join to the query. |
|
| 606 | - * |
|
| 607 | - * <code> |
|
| 608 | - * $qb = $conn->createQueryBuilder() |
|
| 609 | - * ->select('u.name') |
|
| 610 | - * ->from('users', 'u') |
|
| 611 | - * ->innerJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1'); |
|
| 612 | - * </code> |
|
| 613 | - * |
|
| 614 | - * @param string $fromAlias The alias that points to a from clause. |
|
| 615 | - * @param string $join The table name to join. |
|
| 616 | - * @param string $alias The alias of the join table. |
|
| 617 | - * @param string $condition The condition for the join. |
|
| 618 | - * |
|
| 619 | - * @return $this This QueryBuilder instance. |
|
| 620 | - */ |
|
| 621 | - public function innerJoin($fromAlias, $join, $alias, $condition = null) |
|
| 622 | - { |
|
| 623 | - } |
|
| 624 | - |
|
| 625 | - /** |
|
| 626 | - * Creates and adds a left join to the query. |
|
| 627 | - * |
|
| 628 | - * <code> |
|
| 629 | - * $qb = $conn->createQueryBuilder() |
|
| 630 | - * ->select('u.name') |
|
| 631 | - * ->from('users', 'u') |
|
| 632 | - * ->leftJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1'); |
|
| 633 | - * </code> |
|
| 634 | - * |
|
| 635 | - * @param string $fromAlias The alias that points to a from clause. |
|
| 636 | - * @param string $join The table name to join. |
|
| 637 | - * @param string $alias The alias of the join table. |
|
| 638 | - * @param string $condition The condition for the join. |
|
| 639 | - * |
|
| 640 | - * @return $this This QueryBuilder instance. |
|
| 641 | - */ |
|
| 642 | - public function leftJoin($fromAlias, $join, $alias, $condition = null) |
|
| 643 | - { |
|
| 644 | - } |
|
| 645 | - |
|
| 646 | - /** |
|
| 647 | - * Creates and adds a right join to the query. |
|
| 648 | - * |
|
| 649 | - * <code> |
|
| 650 | - * $qb = $conn->createQueryBuilder() |
|
| 651 | - * ->select('u.name') |
|
| 652 | - * ->from('users', 'u') |
|
| 653 | - * ->rightJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1'); |
|
| 654 | - * </code> |
|
| 655 | - * |
|
| 656 | - * @param string $fromAlias The alias that points to a from clause. |
|
| 657 | - * @param string $join The table name to join. |
|
| 658 | - * @param string $alias The alias of the join table. |
|
| 659 | - * @param string $condition The condition for the join. |
|
| 660 | - * |
|
| 661 | - * @return $this This QueryBuilder instance. |
|
| 662 | - */ |
|
| 663 | - public function rightJoin($fromAlias, $join, $alias, $condition = null) |
|
| 664 | - { |
|
| 665 | - } |
|
| 666 | - |
|
| 667 | - /** |
|
| 668 | - * Sets a new value for a column in a bulk update query. |
|
| 669 | - * |
|
| 670 | - * <code> |
|
| 671 | - * $qb = $conn->createQueryBuilder() |
|
| 672 | - * ->update('counters', 'c') |
|
| 673 | - * ->set('c.value', 'c.value + 1') |
|
| 674 | - * ->where('c.id = ?'); |
|
| 675 | - * </code> |
|
| 676 | - * |
|
| 677 | - * @param string $key The column to set. |
|
| 678 | - * @param string $value The value, expression, placeholder, etc. |
|
| 679 | - * |
|
| 680 | - * @return $this This QueryBuilder instance. |
|
| 681 | - */ |
|
| 682 | - public function set($key, $value) |
|
| 683 | - { |
|
| 684 | - } |
|
| 685 | - |
|
| 686 | - /** |
|
| 687 | - * Specifies one or more restrictions to the query result. |
|
| 688 | - * Replaces any previously specified restrictions, if any. |
|
| 689 | - * |
|
| 690 | - * <code> |
|
| 691 | - * $qb = $conn->createQueryBuilder() |
|
| 692 | - * ->select('c.value') |
|
| 693 | - * ->from('counters', 'c') |
|
| 694 | - * ->where('c.id = ?'); |
|
| 695 | - * |
|
| 696 | - * // You can optionally programmatically build and/or expressions |
|
| 697 | - * $qb = $conn->createQueryBuilder(); |
|
| 698 | - * |
|
| 699 | - * $or = $qb->expr()->orx(); |
|
| 700 | - * $or->add($qb->expr()->eq('c.id', 1)); |
|
| 701 | - * $or->add($qb->expr()->eq('c.id', 2)); |
|
| 702 | - * |
|
| 703 | - * $qb->update('counters', 'c') |
|
| 704 | - * ->set('c.value', 'c.value + 1') |
|
| 705 | - * ->where($or); |
|
| 706 | - * </code> |
|
| 707 | - * |
|
| 708 | - * @param mixed $predicates The restriction predicates. |
|
| 709 | - * |
|
| 710 | - * @return $this This QueryBuilder instance. |
|
| 711 | - */ |
|
| 712 | - public function where($predicates) |
|
| 713 | - { |
|
| 714 | - } |
|
| 715 | - |
|
| 716 | - /** |
|
| 717 | - * Adds one or more restrictions to the query results, forming a logical |
|
| 718 | - * conjunction with any previously specified restrictions. |
|
| 719 | - * |
|
| 720 | - * <code> |
|
| 721 | - * $qb = $conn->createQueryBuilder() |
|
| 722 | - * ->select('u') |
|
| 723 | - * ->from('users', 'u') |
|
| 724 | - * ->where('u.username LIKE ?') |
|
| 725 | - * ->andWhere('u.is_active = 1'); |
|
| 726 | - * </code> |
|
| 727 | - * |
|
| 728 | - * @see where() |
|
| 729 | - * |
|
| 730 | - * @param mixed $where The query restrictions. |
|
| 731 | - * |
|
| 732 | - * @return $this This QueryBuilder instance. |
|
| 733 | - */ |
|
| 734 | - public function andWhere($where) |
|
| 735 | - { |
|
| 736 | - } |
|
| 737 | - |
|
| 738 | - /** |
|
| 739 | - * Adds one or more restrictions to the query results, forming a logical |
|
| 740 | - * disjunction with any previously specified restrictions. |
|
| 741 | - * |
|
| 742 | - * <code> |
|
| 743 | - * $qb = $em->createQueryBuilder() |
|
| 744 | - * ->select('u.name') |
|
| 745 | - * ->from('users', 'u') |
|
| 746 | - * ->where('u.id = 1') |
|
| 747 | - * ->orWhere('u.id = 2'); |
|
| 748 | - * </code> |
|
| 749 | - * |
|
| 750 | - * @see where() |
|
| 751 | - * |
|
| 752 | - * @param mixed $where The WHERE statement. |
|
| 753 | - * |
|
| 754 | - * @return $this This QueryBuilder instance. |
|
| 755 | - */ |
|
| 756 | - public function orWhere($where) |
|
| 757 | - { |
|
| 758 | - } |
|
| 759 | - |
|
| 760 | - /** |
|
| 761 | - * Specifies a grouping over the results of the query. |
|
| 762 | - * Replaces any previously specified groupings, if any. |
|
| 763 | - * |
|
| 764 | - * USING AN ARRAY ARGUMENT IS DEPRECATED. Pass each value as an individual argument. |
|
| 765 | - * |
|
| 766 | - * <code> |
|
| 767 | - * $qb = $conn->createQueryBuilder() |
|
| 768 | - * ->select('u.name') |
|
| 769 | - * ->from('users', 'u') |
|
| 770 | - * ->groupBy('u.id'); |
|
| 771 | - * </code> |
|
| 772 | - * |
|
| 773 | - * @param string|string[] $groupBy The grouping expression. USING AN ARRAY IS DEPRECATED. |
|
| 774 | - * Pass each value as an individual argument. |
|
| 775 | - * |
|
| 776 | - * @return $this This QueryBuilder instance. |
|
| 777 | - */ |
|
| 778 | - public function groupBy($groupBy) |
|
| 779 | - { |
|
| 780 | - } |
|
| 781 | - |
|
| 782 | - /** |
|
| 783 | - * Adds a grouping expression to the query. |
|
| 784 | - * |
|
| 785 | - * USING AN ARRAY ARGUMENT IS DEPRECATED. Pass each value as an individual argument. |
|
| 786 | - * |
|
| 787 | - * <code> |
|
| 788 | - * $qb = $conn->createQueryBuilder() |
|
| 789 | - * ->select('u.name') |
|
| 790 | - * ->from('users', 'u') |
|
| 791 | - * ->groupBy('u.lastLogin') |
|
| 792 | - * ->addGroupBy('u.createdAt'); |
|
| 793 | - * </code> |
|
| 794 | - * |
|
| 795 | - * @param string|string[] $groupBy The grouping expression. USING AN ARRAY IS DEPRECATED. |
|
| 796 | - * Pass each value as an individual argument. |
|
| 797 | - * |
|
| 798 | - * @return $this This QueryBuilder instance. |
|
| 799 | - */ |
|
| 800 | - public function addGroupBy($groupBy) |
|
| 801 | - { |
|
| 802 | - } |
|
| 803 | - |
|
| 804 | - /** |
|
| 805 | - * Sets a value for a column in an insert query. |
|
| 806 | - * |
|
| 807 | - * <code> |
|
| 808 | - * $qb = $conn->createQueryBuilder() |
|
| 809 | - * ->insert('users') |
|
| 810 | - * ->values( |
|
| 811 | - * array( |
|
| 812 | - * 'name' => '?' |
|
| 813 | - * ) |
|
| 814 | - * ) |
|
| 815 | - * ->setValue('password', '?'); |
|
| 816 | - * </code> |
|
| 817 | - * |
|
| 818 | - * @param string $column The column into which the value should be inserted. |
|
| 819 | - * @param string $value The value that should be inserted into the column. |
|
| 820 | - * |
|
| 821 | - * @return $this This QueryBuilder instance. |
|
| 822 | - */ |
|
| 823 | - public function setValue($column, $value) |
|
| 824 | - { |
|
| 825 | - } |
|
| 826 | - |
|
| 827 | - /** |
|
| 828 | - * Specifies values for an insert query indexed by column names. |
|
| 829 | - * Replaces any previous values, if any. |
|
| 830 | - * |
|
| 831 | - * <code> |
|
| 832 | - * $qb = $conn->createQueryBuilder() |
|
| 833 | - * ->insert('users') |
|
| 834 | - * ->values( |
|
| 835 | - * array( |
|
| 836 | - * 'name' => '?', |
|
| 837 | - * 'password' => '?' |
|
| 838 | - * ) |
|
| 839 | - * ); |
|
| 840 | - * </code> |
|
| 841 | - * |
|
| 842 | - * @param mixed[] $values The values to specify for the insert query indexed by column names. |
|
| 843 | - * |
|
| 844 | - * @return $this This QueryBuilder instance. |
|
| 845 | - */ |
|
| 846 | - public function values(array $values) |
|
| 847 | - { |
|
| 848 | - } |
|
| 849 | - |
|
| 850 | - /** |
|
| 851 | - * Specifies a restriction over the groups of the query. |
|
| 852 | - * Replaces any previous having restrictions, if any. |
|
| 853 | - * |
|
| 854 | - * @param mixed $having The restriction over the groups. |
|
| 855 | - * |
|
| 856 | - * @return $this This QueryBuilder instance. |
|
| 857 | - */ |
|
| 858 | - public function having($having) |
|
| 859 | - { |
|
| 860 | - } |
|
| 861 | - |
|
| 862 | - /** |
|
| 863 | - * Adds a restriction over the groups of the query, forming a logical |
|
| 864 | - * conjunction with any existing having restrictions. |
|
| 865 | - * |
|
| 866 | - * @param mixed $having The restriction to append. |
|
| 867 | - * |
|
| 868 | - * @return $this This QueryBuilder instance. |
|
| 869 | - */ |
|
| 870 | - public function andHaving($having) |
|
| 871 | - { |
|
| 872 | - } |
|
| 873 | - |
|
| 874 | - /** |
|
| 875 | - * Adds a restriction over the groups of the query, forming a logical |
|
| 876 | - * disjunction with any existing having restrictions. |
|
| 877 | - * |
|
| 878 | - * @param mixed $having The restriction to add. |
|
| 879 | - * |
|
| 880 | - * @return $this This QueryBuilder instance. |
|
| 881 | - */ |
|
| 882 | - public function orHaving($having) |
|
| 883 | - { |
|
| 884 | - } |
|
| 885 | - |
|
| 886 | - /** |
|
| 887 | - * Specifies an ordering for the query results. |
|
| 888 | - * Replaces any previously specified orderings, if any. |
|
| 889 | - * |
|
| 890 | - * @param string $sort The ordering expression. |
|
| 891 | - * @param string $order The ordering direction. |
|
| 892 | - * |
|
| 893 | - * @return $this This QueryBuilder instance. |
|
| 894 | - */ |
|
| 895 | - public function orderBy($sort, $order = null) |
|
| 896 | - { |
|
| 897 | - } |
|
| 898 | - |
|
| 899 | - /** |
|
| 900 | - * Adds an ordering to the query results. |
|
| 901 | - * |
|
| 902 | - * @param string $sort The ordering expression. |
|
| 903 | - * @param string $order The ordering direction. |
|
| 904 | - * |
|
| 905 | - * @return $this This QueryBuilder instance. |
|
| 906 | - */ |
|
| 907 | - public function addOrderBy($sort, $order = null) |
|
| 908 | - { |
|
| 909 | - } |
|
| 910 | - |
|
| 911 | - /** |
|
| 912 | - * Gets a query part by its name. |
|
| 913 | - * |
|
| 914 | - * @deprecated The query parts are implementation details and should not be relied upon. |
|
| 915 | - * |
|
| 916 | - * @param string $queryPartName |
|
| 917 | - * |
|
| 918 | - * @return mixed |
|
| 919 | - */ |
|
| 920 | - public function getQueryPart($queryPartName) |
|
| 921 | - { |
|
| 922 | - } |
|
| 923 | - |
|
| 924 | - /** |
|
| 925 | - * Gets all query parts. |
|
| 926 | - * |
|
| 927 | - * @deprecated The query parts are implementation details and should not be relied upon. |
|
| 928 | - * |
|
| 929 | - * @return mixed[] |
|
| 930 | - */ |
|
| 931 | - public function getQueryParts() |
|
| 932 | - { |
|
| 933 | - } |
|
| 934 | - |
|
| 935 | - /** |
|
| 936 | - * Resets SQL parts. |
|
| 937 | - * |
|
| 938 | - * @deprecated Use the dedicated reset*() methods instead. |
|
| 939 | - * |
|
| 940 | - * @param string[]|null $queryPartNames |
|
| 941 | - * |
|
| 942 | - * @return $this This QueryBuilder instance. |
|
| 943 | - */ |
|
| 944 | - public function resetQueryParts($queryPartNames = null) |
|
| 945 | - { |
|
| 946 | - } |
|
| 947 | - |
|
| 948 | - /** |
|
| 949 | - * Resets a single SQL part. |
|
| 950 | - * |
|
| 951 | - * @deprecated Use the dedicated reset*() methods instead. |
|
| 952 | - * |
|
| 953 | - * @param string $queryPartName |
|
| 954 | - * |
|
| 955 | - * @return $this This QueryBuilder instance. |
|
| 956 | - */ |
|
| 957 | - public function resetQueryPart($queryPartName) |
|
| 958 | - { |
|
| 959 | - } |
|
| 960 | - |
|
| 961 | - /** |
|
| 962 | - * Resets the WHERE conditions for the query. |
|
| 963 | - * |
|
| 964 | - * @return $this This QueryBuilder instance. |
|
| 965 | - */ |
|
| 966 | - public function resetWhere(): self |
|
| 967 | - { |
|
| 968 | - } |
|
| 969 | - |
|
| 970 | - /** |
|
| 971 | - * Resets the grouping for the query. |
|
| 972 | - * |
|
| 973 | - * @return $this This QueryBuilder instance. |
|
| 974 | - */ |
|
| 975 | - public function resetGroupBy(): self |
|
| 976 | - { |
|
| 977 | - } |
|
| 978 | - |
|
| 979 | - /** |
|
| 980 | - * Resets the HAVING conditions for the query. |
|
| 981 | - * |
|
| 982 | - * @return $this This QueryBuilder instance. |
|
| 983 | - */ |
|
| 984 | - public function resetHaving(): self |
|
| 985 | - { |
|
| 986 | - } |
|
| 987 | - |
|
| 988 | - /** |
|
| 989 | - * Resets the ordering for the query. |
|
| 990 | - * |
|
| 991 | - * @return $this This QueryBuilder instance. |
|
| 992 | - */ |
|
| 993 | - public function resetOrderBy(): self |
|
| 994 | - { |
|
| 995 | - } |
|
| 996 | - |
|
| 997 | - /** |
|
| 998 | - * Gets a string representation of this QueryBuilder which corresponds to |
|
| 999 | - * the final SQL query being constructed. |
|
| 1000 | - * |
|
| 1001 | - * @return string The string representation of this QueryBuilder. |
|
| 1002 | - */ |
|
| 1003 | - public function __toString() |
|
| 1004 | - { |
|
| 1005 | - } |
|
| 1006 | - |
|
| 1007 | - /** |
|
| 1008 | - * Creates a new named parameter and bind the value $value to it. |
|
| 1009 | - * |
|
| 1010 | - * This method provides a shortcut for {@see Statement::bindValue()} |
|
| 1011 | - * when using prepared statements. |
|
| 1012 | - * |
|
| 1013 | - * The parameter $value specifies the value that you want to bind. If |
|
| 1014 | - * $placeholder is not provided createNamedParameter() will automatically |
|
| 1015 | - * create a placeholder for you. An automatic placeholder will be of the |
|
| 1016 | - * name ':dcValue1', ':dcValue2' etc. |
|
| 1017 | - * |
|
| 1018 | - * Example: |
|
| 1019 | - * <code> |
|
| 1020 | - * $value = 2; |
|
| 1021 | - * $q->eq( 'id', $q->createNamedParameter( $value ) ); |
|
| 1022 | - * $stmt = $q->executeQuery(); // executed with 'id = 2' |
|
| 1023 | - * </code> |
|
| 1024 | - * |
|
| 1025 | - * @link http://www.zetacomponents.org |
|
| 1026 | - * |
|
| 1027 | - * @param mixed $value |
|
| 1028 | - * @param int|string|Type|null $type |
|
| 1029 | - * @param string $placeHolder The name to bind with. The string must start with a colon ':'. |
|
| 1030 | - * |
|
| 1031 | - * @return string the placeholder name used. |
|
| 1032 | - */ |
|
| 1033 | - public function createNamedParameter($value, $type = ParameterType::STRING, $placeHolder = null) |
|
| 1034 | - { |
|
| 1035 | - } |
|
| 1036 | - |
|
| 1037 | - /** |
|
| 1038 | - * Creates a new positional parameter and bind the given value to it. |
|
| 1039 | - * |
|
| 1040 | - * Attention: If you are using positional parameters with the query builder you have |
|
| 1041 | - * to be very careful to bind all parameters in the order they appear in the SQL |
|
| 1042 | - * statement , otherwise they get bound in the wrong order which can lead to serious |
|
| 1043 | - * bugs in your code. |
|
| 1044 | - * |
|
| 1045 | - * Example: |
|
| 1046 | - * <code> |
|
| 1047 | - * $qb = $conn->createQueryBuilder(); |
|
| 1048 | - * $qb->select('u.*') |
|
| 1049 | - * ->from('users', 'u') |
|
| 1050 | - * ->where('u.username = ' . $qb->createPositionalParameter('Foo', ParameterType::STRING)) |
|
| 1051 | - * ->orWhere('u.username = ' . $qb->createPositionalParameter('Bar', ParameterType::STRING)) |
|
| 1052 | - * </code> |
|
| 1053 | - * |
|
| 1054 | - * @param mixed $value |
|
| 1055 | - * @param int|string|Type|null $type |
|
| 1056 | - * |
|
| 1057 | - * @return string |
|
| 1058 | - */ |
|
| 1059 | - public function createPositionalParameter($value, $type = ParameterType::STRING) |
|
| 1060 | - { |
|
| 1061 | - } |
|
| 1062 | - |
|
| 1063 | - /** |
|
| 1064 | - * Deep clone of all expression objects in the SQL parts. |
|
| 1065 | - * |
|
| 1066 | - * @return void |
|
| 1067 | - */ |
|
| 1068 | - public function __clone() |
|
| 1069 | - { |
|
| 1070 | - } |
|
| 1071 | - |
|
| 1072 | - /** |
|
| 1073 | - * Enables caching of the results of this query, for given amount of seconds |
|
| 1074 | - * and optionally specified which key to use for the cache entry. |
|
| 1075 | - * |
|
| 1076 | - * @return $this |
|
| 1077 | - */ |
|
| 1078 | - public function enableResultCache(QueryCacheProfile $cacheProfile): self |
|
| 1079 | - { |
|
| 1080 | - } |
|
| 1081 | - |
|
| 1082 | - /** |
|
| 1083 | - * Disables caching of the results of this query. |
|
| 1084 | - * |
|
| 1085 | - * @return $this |
|
| 1086 | - */ |
|
| 1087 | - public function disableResultCache(): self |
|
| 1088 | - { |
|
| 1089 | - } |
|
| 68 | + private const SQL_PARTS_DEFAULTS = [ |
|
| 69 | + 'select' => [], |
|
| 70 | + 'distinct' => false, |
|
| 71 | + 'from' => [], |
|
| 72 | + 'join' => [], |
|
| 73 | + 'set' => [], |
|
| 74 | + 'where' => null, |
|
| 75 | + 'groupBy' => [], |
|
| 76 | + 'having' => null, |
|
| 77 | + 'orderBy' => [], |
|
| 78 | + 'values' => [], |
|
| 79 | + 'for_update' => null, |
|
| 80 | + ]; |
|
| 81 | + |
|
| 82 | + /** |
|
| 83 | + * Initializes a new <tt>QueryBuilder</tt>. |
|
| 84 | + * |
|
| 85 | + * @param Connection $connection The DBAL Connection. |
|
| 86 | + */ |
|
| 87 | + public function __construct(Connection $connection) |
|
| 88 | + { |
|
| 89 | + } |
|
| 90 | + |
|
| 91 | + /** |
|
| 92 | + * Gets an ExpressionBuilder used for object-oriented construction of query expressions. |
|
| 93 | + * This producer method is intended for convenient inline usage. Example: |
|
| 94 | + * |
|
| 95 | + * <code> |
|
| 96 | + * $qb = $conn->createQueryBuilder() |
|
| 97 | + * ->select('u') |
|
| 98 | + * ->from('users', 'u') |
|
| 99 | + * ->where($qb->expr()->eq('u.id', 1)); |
|
| 100 | + * </code> |
|
| 101 | + * |
|
| 102 | + * For more complex expression construction, consider storing the expression |
|
| 103 | + * builder object in a local variable. |
|
| 104 | + * |
|
| 105 | + * @return ExpressionBuilder |
|
| 106 | + */ |
|
| 107 | + public function expr() |
|
| 108 | + { |
|
| 109 | + } |
|
| 110 | + |
|
| 111 | + /** |
|
| 112 | + * Gets the type of the currently built query. |
|
| 113 | + * |
|
| 114 | + * @deprecated If necessary, track the type of the query being built outside of the builder. |
|
| 115 | + * |
|
| 116 | + * @return int |
|
| 117 | + */ |
|
| 118 | + public function getType() |
|
| 119 | + { |
|
| 120 | + } |
|
| 121 | + |
|
| 122 | + /** |
|
| 123 | + * Gets the associated DBAL Connection for this query builder. |
|
| 124 | + * |
|
| 125 | + * @deprecated Use the connection used to instantiate the builder instead. |
|
| 126 | + * |
|
| 127 | + * @return Connection |
|
| 128 | + */ |
|
| 129 | + public function getConnection() |
|
| 130 | + { |
|
| 131 | + } |
|
| 132 | + |
|
| 133 | + /** |
|
| 134 | + * Gets the state of this query builder instance. |
|
| 135 | + * |
|
| 136 | + * @deprecated The builder state is an internal concern. |
|
| 137 | + * |
|
| 138 | + * @return int Either QueryBuilder::STATE_DIRTY or QueryBuilder::STATE_CLEAN. |
|
| 139 | + * @psalm-return self::STATE_* |
|
| 140 | + */ |
|
| 141 | + public function getState() |
|
| 142 | + { |
|
| 143 | + } |
|
| 144 | + |
|
| 145 | + /** |
|
| 146 | + * Prepares and executes an SQL query and returns the first row of the result |
|
| 147 | + * as an associative array. |
|
| 148 | + * |
|
| 149 | + * @return array<string, mixed>|false False is returned if no rows are found. |
|
| 150 | + * |
|
| 151 | + * @throws Exception |
|
| 152 | + */ |
|
| 153 | + public function fetchAssociative() |
|
| 154 | + { |
|
| 155 | + } |
|
| 156 | + |
|
| 157 | + /** |
|
| 158 | + * Prepares and executes an SQL query and returns the first row of the result |
|
| 159 | + * as a numerically indexed array. |
|
| 160 | + * |
|
| 161 | + * @return array<int, mixed>|false False is returned if no rows are found. |
|
| 162 | + * |
|
| 163 | + * @throws Exception |
|
| 164 | + */ |
|
| 165 | + public function fetchNumeric() |
|
| 166 | + { |
|
| 167 | + } |
|
| 168 | + |
|
| 169 | + /** |
|
| 170 | + * Prepares and executes an SQL query and returns the value of a single column |
|
| 171 | + * of the first row of the result. |
|
| 172 | + * |
|
| 173 | + * @return mixed|false False is returned if no rows are found. |
|
| 174 | + * |
|
| 175 | + * @throws Exception |
|
| 176 | + */ |
|
| 177 | + public function fetchOne() |
|
| 178 | + { |
|
| 179 | + } |
|
| 180 | + |
|
| 181 | + /** |
|
| 182 | + * Prepares and executes an SQL query and returns the result as an array of numeric arrays. |
|
| 183 | + * |
|
| 184 | + * @return array<int,array<int,mixed>> |
|
| 185 | + * |
|
| 186 | + * @throws Exception |
|
| 187 | + */ |
|
| 188 | + public function fetchAllNumeric(): array |
|
| 189 | + { |
|
| 190 | + } |
|
| 191 | + |
|
| 192 | + /** |
|
| 193 | + * Prepares and executes an SQL query and returns the result as an array of associative arrays. |
|
| 194 | + * |
|
| 195 | + * @return array<int,array<string,mixed>> |
|
| 196 | + * |
|
| 197 | + * @throws Exception |
|
| 198 | + */ |
|
| 199 | + public function fetchAllAssociative(): array |
|
| 200 | + { |
|
| 201 | + } |
|
| 202 | + |
|
| 203 | + /** |
|
| 204 | + * Prepares and executes an SQL query and returns the result as an associative array with the keys |
|
| 205 | + * mapped to the first column and the values mapped to the second column. |
|
| 206 | + * |
|
| 207 | + * @return array<mixed,mixed> |
|
| 208 | + * |
|
| 209 | + * @throws Exception |
|
| 210 | + */ |
|
| 211 | + public function fetchAllKeyValue(): array |
|
| 212 | + { |
|
| 213 | + } |
|
| 214 | + |
|
| 215 | + /** |
|
| 216 | + * Prepares and executes an SQL query and returns the result as an associative array with the keys mapped |
|
| 217 | + * to the first column and the values being an associative array representing the rest of the columns |
|
| 218 | + * and their values. |
|
| 219 | + * |
|
| 220 | + * @return array<mixed,array<string,mixed>> |
|
| 221 | + * |
|
| 222 | + * @throws Exception |
|
| 223 | + */ |
|
| 224 | + public function fetchAllAssociativeIndexed(): array |
|
| 225 | + { |
|
| 226 | + } |
|
| 227 | + |
|
| 228 | + /** |
|
| 229 | + * Prepares and executes an SQL query and returns the result as an array of the first column values. |
|
| 230 | + * |
|
| 231 | + * @return array<int,mixed> |
|
| 232 | + * |
|
| 233 | + * @throws Exception |
|
| 234 | + */ |
|
| 235 | + public function fetchFirstColumn(): array |
|
| 236 | + { |
|
| 237 | + } |
|
| 238 | + |
|
| 239 | + /** |
|
| 240 | + * Executes an SQL query (SELECT) and returns a Result. |
|
| 241 | + * |
|
| 242 | + * @throws Exception |
|
| 243 | + */ |
|
| 244 | + public function executeQuery(): Result |
|
| 245 | + { |
|
| 246 | + } |
|
| 247 | + |
|
| 248 | + /** |
|
| 249 | + * Executes an SQL statement and returns the number of affected rows. |
|
| 250 | + * |
|
| 251 | + * Should be used for INSERT, UPDATE and DELETE |
|
| 252 | + * |
|
| 253 | + * @return int The number of affected rows. |
|
| 254 | + * |
|
| 255 | + * @throws Exception |
|
| 256 | + */ |
|
| 257 | + public function executeStatement(): int |
|
| 258 | + { |
|
| 259 | + } |
|
| 260 | + |
|
| 261 | + /** |
|
| 262 | + * Executes this query using the bound parameters and their types. |
|
| 263 | + * |
|
| 264 | + * @deprecated Use {@see executeQuery()} or {@see executeStatement()} instead. |
|
| 265 | + * |
|
| 266 | + * @return Result|int|string |
|
| 267 | + * |
|
| 268 | + * @throws Exception |
|
| 269 | + */ |
|
| 270 | + public function execute() |
|
| 271 | + { |
|
| 272 | + } |
|
| 273 | + |
|
| 274 | + /** |
|
| 275 | + * Gets the complete SQL string formed by the current specifications of this QueryBuilder. |
|
| 276 | + * |
|
| 277 | + * <code> |
|
| 278 | + * $qb = $em->createQueryBuilder() |
|
| 279 | + * ->select('u') |
|
| 280 | + * ->from('User', 'u') |
|
| 281 | + * echo $qb->getSQL(); // SELECT u FROM User u |
|
| 282 | + * </code> |
|
| 283 | + * |
|
| 284 | + * @return string The SQL query string. |
|
| 285 | + */ |
|
| 286 | + public function getSQL() |
|
| 287 | + { |
|
| 288 | + } |
|
| 289 | + |
|
| 290 | + /** |
|
| 291 | + * Sets a query parameter for the query being constructed. |
|
| 292 | + * |
|
| 293 | + * <code> |
|
| 294 | + * $qb = $conn->createQueryBuilder() |
|
| 295 | + * ->select('u') |
|
| 296 | + * ->from('users', 'u') |
|
| 297 | + * ->where('u.id = :user_id') |
|
| 298 | + * ->setParameter('user_id', 1); |
|
| 299 | + * </code> |
|
| 300 | + * |
|
| 301 | + * @param int|string $key Parameter position or name |
|
| 302 | + * @param mixed $value Parameter value |
|
| 303 | + * @param int|string|Type|null $type Parameter type |
|
| 304 | + * |
|
| 305 | + * @return $this This QueryBuilder instance. |
|
| 306 | + */ |
|
| 307 | + public function setParameter($key, $value, $type = ParameterType::STRING) |
|
| 308 | + { |
|
| 309 | + } |
|
| 310 | + |
|
| 311 | + /** |
|
| 312 | + * Sets a collection of query parameters for the query being constructed. |
|
| 313 | + * |
|
| 314 | + * <code> |
|
| 315 | + * $qb = $conn->createQueryBuilder() |
|
| 316 | + * ->select('u') |
|
| 317 | + * ->from('users', 'u') |
|
| 318 | + * ->where('u.id = :user_id1 OR u.id = :user_id2') |
|
| 319 | + * ->setParameters(array( |
|
| 320 | + * 'user_id1' => 1, |
|
| 321 | + * 'user_id2' => 2 |
|
| 322 | + * )); |
|
| 323 | + * </code> |
|
| 324 | + * |
|
| 325 | + * @param list<mixed>|array<string, mixed> $params Parameters to set |
|
| 326 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
| 327 | + * |
|
| 328 | + * @return $this This QueryBuilder instance. |
|
| 329 | + */ |
|
| 330 | + public function setParameters(array $params, array $types = []) |
|
| 331 | + { |
|
| 332 | + } |
|
| 333 | + |
|
| 334 | + /** |
|
| 335 | + * Gets all defined query parameters for the query being constructed indexed by parameter index or name. |
|
| 336 | + * |
|
| 337 | + * @return list<mixed>|array<string, mixed> The currently defined query parameters |
|
| 338 | + */ |
|
| 339 | + public function getParameters() |
|
| 340 | + { |
|
| 341 | + } |
|
| 342 | + |
|
| 343 | + /** |
|
| 344 | + * Gets a (previously set) query parameter of the query being constructed. |
|
| 345 | + * |
|
| 346 | + * @param mixed $key The key (index or name) of the bound parameter. |
|
| 347 | + * |
|
| 348 | + * @return mixed The value of the bound parameter. |
|
| 349 | + */ |
|
| 350 | + public function getParameter($key) |
|
| 351 | + { |
|
| 352 | + } |
|
| 353 | + |
|
| 354 | + /** |
|
| 355 | + * Gets all defined query parameter types for the query being constructed indexed by parameter index or name. |
|
| 356 | + * |
|
| 357 | + * @return array<int, int|string|Type|null>|array<string, int|string|Type|null> The currently defined |
|
| 358 | + * query parameter types |
|
| 359 | + */ |
|
| 360 | + public function getParameterTypes() |
|
| 361 | + { |
|
| 362 | + } |
|
| 363 | + |
|
| 364 | + /** |
|
| 365 | + * Gets a (previously set) query parameter type of the query being constructed. |
|
| 366 | + * |
|
| 367 | + * @param int|string $key The key of the bound parameter type |
|
| 368 | + * |
|
| 369 | + * @return int|string|Type The value of the bound parameter type |
|
| 370 | + */ |
|
| 371 | + public function getParameterType($key) |
|
| 372 | + { |
|
| 373 | + } |
|
| 374 | + |
|
| 375 | + /** |
|
| 376 | + * Sets the position of the first result to retrieve (the "offset"). |
|
| 377 | + * |
|
| 378 | + * @param int $firstResult The first result to return. |
|
| 379 | + * |
|
| 380 | + * @return $this This QueryBuilder instance. |
|
| 381 | + */ |
|
| 382 | + public function setFirstResult($firstResult) |
|
| 383 | + { |
|
| 384 | + } |
|
| 385 | + |
|
| 386 | + /** |
|
| 387 | + * Gets the position of the first result the query object was set to retrieve (the "offset"). |
|
| 388 | + * |
|
| 389 | + * @return int The position of the first result. |
|
| 390 | + */ |
|
| 391 | + public function getFirstResult() |
|
| 392 | + { |
|
| 393 | + } |
|
| 394 | + |
|
| 395 | + /** |
|
| 396 | + * Sets the maximum number of results to retrieve (the "limit"). |
|
| 397 | + * |
|
| 398 | + * @param int|null $maxResults The maximum number of results to retrieve or NULL to retrieve all results. |
|
| 399 | + * |
|
| 400 | + * @return $this This QueryBuilder instance. |
|
| 401 | + */ |
|
| 402 | + public function setMaxResults($maxResults) |
|
| 403 | + { |
|
| 404 | + } |
|
| 405 | + |
|
| 406 | + /** |
|
| 407 | + * Gets the maximum number of results the query object was set to retrieve (the "limit"). |
|
| 408 | + * Returns NULL if all results will be returned. |
|
| 409 | + * |
|
| 410 | + * @return int|null The maximum number of results. |
|
| 411 | + */ |
|
| 412 | + public function getMaxResults() |
|
| 413 | + { |
|
| 414 | + } |
|
| 415 | + |
|
| 416 | + /** |
|
| 417 | + * Locks the queried rows for a subsequent update. |
|
| 418 | + * |
|
| 419 | + * @return $this |
|
| 420 | + */ |
|
| 421 | + public function forUpdate(int $conflictResolutionMode = ConflictResolutionMode::ORDINARY): self |
|
| 422 | + { |
|
| 423 | + } |
|
| 424 | + |
|
| 425 | + /** |
|
| 426 | + * Either appends to or replaces a single, generic query part. |
|
| 427 | + * |
|
| 428 | + * The available parts are: 'select', 'from', 'set', 'where', |
|
| 429 | + * 'groupBy', 'having' and 'orderBy'. |
|
| 430 | + * |
|
| 431 | + * @param string $sqlPartName |
|
| 432 | + * @param mixed $sqlPart |
|
| 433 | + * @param bool $append |
|
| 434 | + * |
|
| 435 | + * @return $this This QueryBuilder instance. |
|
| 436 | + */ |
|
| 437 | + public function add($sqlPartName, $sqlPart, $append = false) |
|
| 438 | + { |
|
| 439 | + } |
|
| 440 | + |
|
| 441 | + /** |
|
| 442 | + * Specifies an item that is to be returned in the query result. |
|
| 443 | + * Replaces any previously specified selections, if any. |
|
| 444 | + * |
|
| 445 | + * USING AN ARRAY ARGUMENT IS DEPRECATED. Pass each value as an individual argument. |
|
| 446 | + * |
|
| 447 | + * <code> |
|
| 448 | + * $qb = $conn->createQueryBuilder() |
|
| 449 | + * ->select('u.id', 'p.id') |
|
| 450 | + * ->from('users', 'u') |
|
| 451 | + * ->leftJoin('u', 'phonenumbers', 'p', 'u.id = p.user_id'); |
|
| 452 | + * </code> |
|
| 453 | + * |
|
| 454 | + * @param string|string[]|null $select The selection expression. USING AN ARRAY OR NULL IS DEPRECATED. |
|
| 455 | + * Pass each value as an individual argument. |
|
| 456 | + * |
|
| 457 | + * @return $this This QueryBuilder instance. |
|
| 458 | + */ |
|
| 459 | + public function select($select = null) |
|
| 460 | + { |
|
| 461 | + } |
|
| 462 | + |
|
| 463 | + /** |
|
| 464 | + * Adds or removes DISTINCT to/from the query. |
|
| 465 | + * |
|
| 466 | + * <code> |
|
| 467 | + * $qb = $conn->createQueryBuilder() |
|
| 468 | + * ->select('u.id') |
|
| 469 | + * ->distinct() |
|
| 470 | + * ->from('users', 'u') |
|
| 471 | + * </code> |
|
| 472 | + * |
|
| 473 | + * @return $this This QueryBuilder instance. |
|
| 474 | + */ |
|
| 475 | + public function distinct(): self |
|
| 476 | + { |
|
| 477 | + } |
|
| 478 | + |
|
| 479 | + /** |
|
| 480 | + * Adds an item that is to be returned in the query result. |
|
| 481 | + * |
|
| 482 | + * USING AN ARRAY ARGUMENT IS DEPRECATED. Pass each value as an individual argument. |
|
| 483 | + * |
|
| 484 | + * <code> |
|
| 485 | + * $qb = $conn->createQueryBuilder() |
|
| 486 | + * ->select('u.id') |
|
| 487 | + * ->addSelect('p.id') |
|
| 488 | + * ->from('users', 'u') |
|
| 489 | + * ->leftJoin('u', 'phonenumbers', 'u.id = p.user_id'); |
|
| 490 | + * </code> |
|
| 491 | + * |
|
| 492 | + * @param string|string[]|null $select The selection expression. USING AN ARRAY OR NULL IS DEPRECATED. |
|
| 493 | + * Pass each value as an individual argument. |
|
| 494 | + * |
|
| 495 | + * @return $this This QueryBuilder instance. |
|
| 496 | + */ |
|
| 497 | + public function addSelect($select = null) |
|
| 498 | + { |
|
| 499 | + } |
|
| 500 | + |
|
| 501 | + /** |
|
| 502 | + * Turns the query being built into a bulk delete query that ranges over |
|
| 503 | + * a certain table. |
|
| 504 | + * |
|
| 505 | + * <code> |
|
| 506 | + * $qb = $conn->createQueryBuilder() |
|
| 507 | + * ->delete('users', 'u') |
|
| 508 | + * ->where('u.id = :user_id') |
|
| 509 | + * ->setParameter(':user_id', 1); |
|
| 510 | + * </code> |
|
| 511 | + * |
|
| 512 | + * @param string $delete The table whose rows are subject to the deletion. |
|
| 513 | + * @param string $alias The table alias used in the constructed query. |
|
| 514 | + * |
|
| 515 | + * @return $this This QueryBuilder instance. |
|
| 516 | + */ |
|
| 517 | + public function delete($delete = null, $alias = null) |
|
| 518 | + { |
|
| 519 | + } |
|
| 520 | + |
|
| 521 | + /** |
|
| 522 | + * Turns the query being built into a bulk update query that ranges over |
|
| 523 | + * a certain table |
|
| 524 | + * |
|
| 525 | + * <code> |
|
| 526 | + * $qb = $conn->createQueryBuilder() |
|
| 527 | + * ->update('counters', 'c') |
|
| 528 | + * ->set('c.value', 'c.value + 1') |
|
| 529 | + * ->where('c.id = ?'); |
|
| 530 | + * </code> |
|
| 531 | + * |
|
| 532 | + * @param string $update The table whose rows are subject to the update. |
|
| 533 | + * @param string $alias The table alias used in the constructed query. |
|
| 534 | + * |
|
| 535 | + * @return $this This QueryBuilder instance. |
|
| 536 | + */ |
|
| 537 | + public function update($update = null, $alias = null) |
|
| 538 | + { |
|
| 539 | + } |
|
| 540 | + |
|
| 541 | + /** |
|
| 542 | + * Turns the query being built into an insert query that inserts into |
|
| 543 | + * a certain table |
|
| 544 | + * |
|
| 545 | + * <code> |
|
| 546 | + * $qb = $conn->createQueryBuilder() |
|
| 547 | + * ->insert('users') |
|
| 548 | + * ->values( |
|
| 549 | + * array( |
|
| 550 | + * 'name' => '?', |
|
| 551 | + * 'password' => '?' |
|
| 552 | + * ) |
|
| 553 | + * ); |
|
| 554 | + * </code> |
|
| 555 | + * |
|
| 556 | + * @param string $insert The table into which the rows should be inserted. |
|
| 557 | + * |
|
| 558 | + * @return $this This QueryBuilder instance. |
|
| 559 | + */ |
|
| 560 | + public function insert($insert = null) |
|
| 561 | + { |
|
| 562 | + } |
|
| 563 | + |
|
| 564 | + /** |
|
| 565 | + * Creates and adds a query root corresponding to the table identified by the |
|
| 566 | + * given alias, forming a cartesian product with any existing query roots. |
|
| 567 | + * |
|
| 568 | + * <code> |
|
| 569 | + * $qb = $conn->createQueryBuilder() |
|
| 570 | + * ->select('u.id') |
|
| 571 | + * ->from('users', 'u') |
|
| 572 | + * </code> |
|
| 573 | + * |
|
| 574 | + * @param string $from The table. |
|
| 575 | + * @param string|null $alias The alias of the table. |
|
| 576 | + * |
|
| 577 | + * @return $this This QueryBuilder instance. |
|
| 578 | + */ |
|
| 579 | + public function from($from, $alias = null) |
|
| 580 | + { |
|
| 581 | + } |
|
| 582 | + |
|
| 583 | + /** |
|
| 584 | + * Creates and adds a join to the query. |
|
| 585 | + * |
|
| 586 | + * <code> |
|
| 587 | + * $qb = $conn->createQueryBuilder() |
|
| 588 | + * ->select('u.name') |
|
| 589 | + * ->from('users', 'u') |
|
| 590 | + * ->join('u', 'phonenumbers', 'p', 'p.is_primary = 1'); |
|
| 591 | + * </code> |
|
| 592 | + * |
|
| 593 | + * @param string $fromAlias The alias that points to a from clause. |
|
| 594 | + * @param string $join The table name to join. |
|
| 595 | + * @param string $alias The alias of the join table. |
|
| 596 | + * @param string $condition The condition for the join. |
|
| 597 | + * |
|
| 598 | + * @return $this This QueryBuilder instance. |
|
| 599 | + */ |
|
| 600 | + public function join($fromAlias, $join, $alias, $condition = null) |
|
| 601 | + { |
|
| 602 | + } |
|
| 603 | + |
|
| 604 | + /** |
|
| 605 | + * Creates and adds a join to the query. |
|
| 606 | + * |
|
| 607 | + * <code> |
|
| 608 | + * $qb = $conn->createQueryBuilder() |
|
| 609 | + * ->select('u.name') |
|
| 610 | + * ->from('users', 'u') |
|
| 611 | + * ->innerJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1'); |
|
| 612 | + * </code> |
|
| 613 | + * |
|
| 614 | + * @param string $fromAlias The alias that points to a from clause. |
|
| 615 | + * @param string $join The table name to join. |
|
| 616 | + * @param string $alias The alias of the join table. |
|
| 617 | + * @param string $condition The condition for the join. |
|
| 618 | + * |
|
| 619 | + * @return $this This QueryBuilder instance. |
|
| 620 | + */ |
|
| 621 | + public function innerJoin($fromAlias, $join, $alias, $condition = null) |
|
| 622 | + { |
|
| 623 | + } |
|
| 624 | + |
|
| 625 | + /** |
|
| 626 | + * Creates and adds a left join to the query. |
|
| 627 | + * |
|
| 628 | + * <code> |
|
| 629 | + * $qb = $conn->createQueryBuilder() |
|
| 630 | + * ->select('u.name') |
|
| 631 | + * ->from('users', 'u') |
|
| 632 | + * ->leftJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1'); |
|
| 633 | + * </code> |
|
| 634 | + * |
|
| 635 | + * @param string $fromAlias The alias that points to a from clause. |
|
| 636 | + * @param string $join The table name to join. |
|
| 637 | + * @param string $alias The alias of the join table. |
|
| 638 | + * @param string $condition The condition for the join. |
|
| 639 | + * |
|
| 640 | + * @return $this This QueryBuilder instance. |
|
| 641 | + */ |
|
| 642 | + public function leftJoin($fromAlias, $join, $alias, $condition = null) |
|
| 643 | + { |
|
| 644 | + } |
|
| 645 | + |
|
| 646 | + /** |
|
| 647 | + * Creates and adds a right join to the query. |
|
| 648 | + * |
|
| 649 | + * <code> |
|
| 650 | + * $qb = $conn->createQueryBuilder() |
|
| 651 | + * ->select('u.name') |
|
| 652 | + * ->from('users', 'u') |
|
| 653 | + * ->rightJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1'); |
|
| 654 | + * </code> |
|
| 655 | + * |
|
| 656 | + * @param string $fromAlias The alias that points to a from clause. |
|
| 657 | + * @param string $join The table name to join. |
|
| 658 | + * @param string $alias The alias of the join table. |
|
| 659 | + * @param string $condition The condition for the join. |
|
| 660 | + * |
|
| 661 | + * @return $this This QueryBuilder instance. |
|
| 662 | + */ |
|
| 663 | + public function rightJoin($fromAlias, $join, $alias, $condition = null) |
|
| 664 | + { |
|
| 665 | + } |
|
| 666 | + |
|
| 667 | + /** |
|
| 668 | + * Sets a new value for a column in a bulk update query. |
|
| 669 | + * |
|
| 670 | + * <code> |
|
| 671 | + * $qb = $conn->createQueryBuilder() |
|
| 672 | + * ->update('counters', 'c') |
|
| 673 | + * ->set('c.value', 'c.value + 1') |
|
| 674 | + * ->where('c.id = ?'); |
|
| 675 | + * </code> |
|
| 676 | + * |
|
| 677 | + * @param string $key The column to set. |
|
| 678 | + * @param string $value The value, expression, placeholder, etc. |
|
| 679 | + * |
|
| 680 | + * @return $this This QueryBuilder instance. |
|
| 681 | + */ |
|
| 682 | + public function set($key, $value) |
|
| 683 | + { |
|
| 684 | + } |
|
| 685 | + |
|
| 686 | + /** |
|
| 687 | + * Specifies one or more restrictions to the query result. |
|
| 688 | + * Replaces any previously specified restrictions, if any. |
|
| 689 | + * |
|
| 690 | + * <code> |
|
| 691 | + * $qb = $conn->createQueryBuilder() |
|
| 692 | + * ->select('c.value') |
|
| 693 | + * ->from('counters', 'c') |
|
| 694 | + * ->where('c.id = ?'); |
|
| 695 | + * |
|
| 696 | + * // You can optionally programmatically build and/or expressions |
|
| 697 | + * $qb = $conn->createQueryBuilder(); |
|
| 698 | + * |
|
| 699 | + * $or = $qb->expr()->orx(); |
|
| 700 | + * $or->add($qb->expr()->eq('c.id', 1)); |
|
| 701 | + * $or->add($qb->expr()->eq('c.id', 2)); |
|
| 702 | + * |
|
| 703 | + * $qb->update('counters', 'c') |
|
| 704 | + * ->set('c.value', 'c.value + 1') |
|
| 705 | + * ->where($or); |
|
| 706 | + * </code> |
|
| 707 | + * |
|
| 708 | + * @param mixed $predicates The restriction predicates. |
|
| 709 | + * |
|
| 710 | + * @return $this This QueryBuilder instance. |
|
| 711 | + */ |
|
| 712 | + public function where($predicates) |
|
| 713 | + { |
|
| 714 | + } |
|
| 715 | + |
|
| 716 | + /** |
|
| 717 | + * Adds one or more restrictions to the query results, forming a logical |
|
| 718 | + * conjunction with any previously specified restrictions. |
|
| 719 | + * |
|
| 720 | + * <code> |
|
| 721 | + * $qb = $conn->createQueryBuilder() |
|
| 722 | + * ->select('u') |
|
| 723 | + * ->from('users', 'u') |
|
| 724 | + * ->where('u.username LIKE ?') |
|
| 725 | + * ->andWhere('u.is_active = 1'); |
|
| 726 | + * </code> |
|
| 727 | + * |
|
| 728 | + * @see where() |
|
| 729 | + * |
|
| 730 | + * @param mixed $where The query restrictions. |
|
| 731 | + * |
|
| 732 | + * @return $this This QueryBuilder instance. |
|
| 733 | + */ |
|
| 734 | + public function andWhere($where) |
|
| 735 | + { |
|
| 736 | + } |
|
| 737 | + |
|
| 738 | + /** |
|
| 739 | + * Adds one or more restrictions to the query results, forming a logical |
|
| 740 | + * disjunction with any previously specified restrictions. |
|
| 741 | + * |
|
| 742 | + * <code> |
|
| 743 | + * $qb = $em->createQueryBuilder() |
|
| 744 | + * ->select('u.name') |
|
| 745 | + * ->from('users', 'u') |
|
| 746 | + * ->where('u.id = 1') |
|
| 747 | + * ->orWhere('u.id = 2'); |
|
| 748 | + * </code> |
|
| 749 | + * |
|
| 750 | + * @see where() |
|
| 751 | + * |
|
| 752 | + * @param mixed $where The WHERE statement. |
|
| 753 | + * |
|
| 754 | + * @return $this This QueryBuilder instance. |
|
| 755 | + */ |
|
| 756 | + public function orWhere($where) |
|
| 757 | + { |
|
| 758 | + } |
|
| 759 | + |
|
| 760 | + /** |
|
| 761 | + * Specifies a grouping over the results of the query. |
|
| 762 | + * Replaces any previously specified groupings, if any. |
|
| 763 | + * |
|
| 764 | + * USING AN ARRAY ARGUMENT IS DEPRECATED. Pass each value as an individual argument. |
|
| 765 | + * |
|
| 766 | + * <code> |
|
| 767 | + * $qb = $conn->createQueryBuilder() |
|
| 768 | + * ->select('u.name') |
|
| 769 | + * ->from('users', 'u') |
|
| 770 | + * ->groupBy('u.id'); |
|
| 771 | + * </code> |
|
| 772 | + * |
|
| 773 | + * @param string|string[] $groupBy The grouping expression. USING AN ARRAY IS DEPRECATED. |
|
| 774 | + * Pass each value as an individual argument. |
|
| 775 | + * |
|
| 776 | + * @return $this This QueryBuilder instance. |
|
| 777 | + */ |
|
| 778 | + public function groupBy($groupBy) |
|
| 779 | + { |
|
| 780 | + } |
|
| 781 | + |
|
| 782 | + /** |
|
| 783 | + * Adds a grouping expression to the query. |
|
| 784 | + * |
|
| 785 | + * USING AN ARRAY ARGUMENT IS DEPRECATED. Pass each value as an individual argument. |
|
| 786 | + * |
|
| 787 | + * <code> |
|
| 788 | + * $qb = $conn->createQueryBuilder() |
|
| 789 | + * ->select('u.name') |
|
| 790 | + * ->from('users', 'u') |
|
| 791 | + * ->groupBy('u.lastLogin') |
|
| 792 | + * ->addGroupBy('u.createdAt'); |
|
| 793 | + * </code> |
|
| 794 | + * |
|
| 795 | + * @param string|string[] $groupBy The grouping expression. USING AN ARRAY IS DEPRECATED. |
|
| 796 | + * Pass each value as an individual argument. |
|
| 797 | + * |
|
| 798 | + * @return $this This QueryBuilder instance. |
|
| 799 | + */ |
|
| 800 | + public function addGroupBy($groupBy) |
|
| 801 | + { |
|
| 802 | + } |
|
| 803 | + |
|
| 804 | + /** |
|
| 805 | + * Sets a value for a column in an insert query. |
|
| 806 | + * |
|
| 807 | + * <code> |
|
| 808 | + * $qb = $conn->createQueryBuilder() |
|
| 809 | + * ->insert('users') |
|
| 810 | + * ->values( |
|
| 811 | + * array( |
|
| 812 | + * 'name' => '?' |
|
| 813 | + * ) |
|
| 814 | + * ) |
|
| 815 | + * ->setValue('password', '?'); |
|
| 816 | + * </code> |
|
| 817 | + * |
|
| 818 | + * @param string $column The column into which the value should be inserted. |
|
| 819 | + * @param string $value The value that should be inserted into the column. |
|
| 820 | + * |
|
| 821 | + * @return $this This QueryBuilder instance. |
|
| 822 | + */ |
|
| 823 | + public function setValue($column, $value) |
|
| 824 | + { |
|
| 825 | + } |
|
| 826 | + |
|
| 827 | + /** |
|
| 828 | + * Specifies values for an insert query indexed by column names. |
|
| 829 | + * Replaces any previous values, if any. |
|
| 830 | + * |
|
| 831 | + * <code> |
|
| 832 | + * $qb = $conn->createQueryBuilder() |
|
| 833 | + * ->insert('users') |
|
| 834 | + * ->values( |
|
| 835 | + * array( |
|
| 836 | + * 'name' => '?', |
|
| 837 | + * 'password' => '?' |
|
| 838 | + * ) |
|
| 839 | + * ); |
|
| 840 | + * </code> |
|
| 841 | + * |
|
| 842 | + * @param mixed[] $values The values to specify for the insert query indexed by column names. |
|
| 843 | + * |
|
| 844 | + * @return $this This QueryBuilder instance. |
|
| 845 | + */ |
|
| 846 | + public function values(array $values) |
|
| 847 | + { |
|
| 848 | + } |
|
| 849 | + |
|
| 850 | + /** |
|
| 851 | + * Specifies a restriction over the groups of the query. |
|
| 852 | + * Replaces any previous having restrictions, if any. |
|
| 853 | + * |
|
| 854 | + * @param mixed $having The restriction over the groups. |
|
| 855 | + * |
|
| 856 | + * @return $this This QueryBuilder instance. |
|
| 857 | + */ |
|
| 858 | + public function having($having) |
|
| 859 | + { |
|
| 860 | + } |
|
| 861 | + |
|
| 862 | + /** |
|
| 863 | + * Adds a restriction over the groups of the query, forming a logical |
|
| 864 | + * conjunction with any existing having restrictions. |
|
| 865 | + * |
|
| 866 | + * @param mixed $having The restriction to append. |
|
| 867 | + * |
|
| 868 | + * @return $this This QueryBuilder instance. |
|
| 869 | + */ |
|
| 870 | + public function andHaving($having) |
|
| 871 | + { |
|
| 872 | + } |
|
| 873 | + |
|
| 874 | + /** |
|
| 875 | + * Adds a restriction over the groups of the query, forming a logical |
|
| 876 | + * disjunction with any existing having restrictions. |
|
| 877 | + * |
|
| 878 | + * @param mixed $having The restriction to add. |
|
| 879 | + * |
|
| 880 | + * @return $this This QueryBuilder instance. |
|
| 881 | + */ |
|
| 882 | + public function orHaving($having) |
|
| 883 | + { |
|
| 884 | + } |
|
| 885 | + |
|
| 886 | + /** |
|
| 887 | + * Specifies an ordering for the query results. |
|
| 888 | + * Replaces any previously specified orderings, if any. |
|
| 889 | + * |
|
| 890 | + * @param string $sort The ordering expression. |
|
| 891 | + * @param string $order The ordering direction. |
|
| 892 | + * |
|
| 893 | + * @return $this This QueryBuilder instance. |
|
| 894 | + */ |
|
| 895 | + public function orderBy($sort, $order = null) |
|
| 896 | + { |
|
| 897 | + } |
|
| 898 | + |
|
| 899 | + /** |
|
| 900 | + * Adds an ordering to the query results. |
|
| 901 | + * |
|
| 902 | + * @param string $sort The ordering expression. |
|
| 903 | + * @param string $order The ordering direction. |
|
| 904 | + * |
|
| 905 | + * @return $this This QueryBuilder instance. |
|
| 906 | + */ |
|
| 907 | + public function addOrderBy($sort, $order = null) |
|
| 908 | + { |
|
| 909 | + } |
|
| 910 | + |
|
| 911 | + /** |
|
| 912 | + * Gets a query part by its name. |
|
| 913 | + * |
|
| 914 | + * @deprecated The query parts are implementation details and should not be relied upon. |
|
| 915 | + * |
|
| 916 | + * @param string $queryPartName |
|
| 917 | + * |
|
| 918 | + * @return mixed |
|
| 919 | + */ |
|
| 920 | + public function getQueryPart($queryPartName) |
|
| 921 | + { |
|
| 922 | + } |
|
| 923 | + |
|
| 924 | + /** |
|
| 925 | + * Gets all query parts. |
|
| 926 | + * |
|
| 927 | + * @deprecated The query parts are implementation details and should not be relied upon. |
|
| 928 | + * |
|
| 929 | + * @return mixed[] |
|
| 930 | + */ |
|
| 931 | + public function getQueryParts() |
|
| 932 | + { |
|
| 933 | + } |
|
| 934 | + |
|
| 935 | + /** |
|
| 936 | + * Resets SQL parts. |
|
| 937 | + * |
|
| 938 | + * @deprecated Use the dedicated reset*() methods instead. |
|
| 939 | + * |
|
| 940 | + * @param string[]|null $queryPartNames |
|
| 941 | + * |
|
| 942 | + * @return $this This QueryBuilder instance. |
|
| 943 | + */ |
|
| 944 | + public function resetQueryParts($queryPartNames = null) |
|
| 945 | + { |
|
| 946 | + } |
|
| 947 | + |
|
| 948 | + /** |
|
| 949 | + * Resets a single SQL part. |
|
| 950 | + * |
|
| 951 | + * @deprecated Use the dedicated reset*() methods instead. |
|
| 952 | + * |
|
| 953 | + * @param string $queryPartName |
|
| 954 | + * |
|
| 955 | + * @return $this This QueryBuilder instance. |
|
| 956 | + */ |
|
| 957 | + public function resetQueryPart($queryPartName) |
|
| 958 | + { |
|
| 959 | + } |
|
| 960 | + |
|
| 961 | + /** |
|
| 962 | + * Resets the WHERE conditions for the query. |
|
| 963 | + * |
|
| 964 | + * @return $this This QueryBuilder instance. |
|
| 965 | + */ |
|
| 966 | + public function resetWhere(): self |
|
| 967 | + { |
|
| 968 | + } |
|
| 969 | + |
|
| 970 | + /** |
|
| 971 | + * Resets the grouping for the query. |
|
| 972 | + * |
|
| 973 | + * @return $this This QueryBuilder instance. |
|
| 974 | + */ |
|
| 975 | + public function resetGroupBy(): self |
|
| 976 | + { |
|
| 977 | + } |
|
| 978 | + |
|
| 979 | + /** |
|
| 980 | + * Resets the HAVING conditions for the query. |
|
| 981 | + * |
|
| 982 | + * @return $this This QueryBuilder instance. |
|
| 983 | + */ |
|
| 984 | + public function resetHaving(): self |
|
| 985 | + { |
|
| 986 | + } |
|
| 987 | + |
|
| 988 | + /** |
|
| 989 | + * Resets the ordering for the query. |
|
| 990 | + * |
|
| 991 | + * @return $this This QueryBuilder instance. |
|
| 992 | + */ |
|
| 993 | + public function resetOrderBy(): self |
|
| 994 | + { |
|
| 995 | + } |
|
| 996 | + |
|
| 997 | + /** |
|
| 998 | + * Gets a string representation of this QueryBuilder which corresponds to |
|
| 999 | + * the final SQL query being constructed. |
|
| 1000 | + * |
|
| 1001 | + * @return string The string representation of this QueryBuilder. |
|
| 1002 | + */ |
|
| 1003 | + public function __toString() |
|
| 1004 | + { |
|
| 1005 | + } |
|
| 1006 | + |
|
| 1007 | + /** |
|
| 1008 | + * Creates a new named parameter and bind the value $value to it. |
|
| 1009 | + * |
|
| 1010 | + * This method provides a shortcut for {@see Statement::bindValue()} |
|
| 1011 | + * when using prepared statements. |
|
| 1012 | + * |
|
| 1013 | + * The parameter $value specifies the value that you want to bind. If |
|
| 1014 | + * $placeholder is not provided createNamedParameter() will automatically |
|
| 1015 | + * create a placeholder for you. An automatic placeholder will be of the |
|
| 1016 | + * name ':dcValue1', ':dcValue2' etc. |
|
| 1017 | + * |
|
| 1018 | + * Example: |
|
| 1019 | + * <code> |
|
| 1020 | + * $value = 2; |
|
| 1021 | + * $q->eq( 'id', $q->createNamedParameter( $value ) ); |
|
| 1022 | + * $stmt = $q->executeQuery(); // executed with 'id = 2' |
|
| 1023 | + * </code> |
|
| 1024 | + * |
|
| 1025 | + * @link http://www.zetacomponents.org |
|
| 1026 | + * |
|
| 1027 | + * @param mixed $value |
|
| 1028 | + * @param int|string|Type|null $type |
|
| 1029 | + * @param string $placeHolder The name to bind with. The string must start with a colon ':'. |
|
| 1030 | + * |
|
| 1031 | + * @return string the placeholder name used. |
|
| 1032 | + */ |
|
| 1033 | + public function createNamedParameter($value, $type = ParameterType::STRING, $placeHolder = null) |
|
| 1034 | + { |
|
| 1035 | + } |
|
| 1036 | + |
|
| 1037 | + /** |
|
| 1038 | + * Creates a new positional parameter and bind the given value to it. |
|
| 1039 | + * |
|
| 1040 | + * Attention: If you are using positional parameters with the query builder you have |
|
| 1041 | + * to be very careful to bind all parameters in the order they appear in the SQL |
|
| 1042 | + * statement , otherwise they get bound in the wrong order which can lead to serious |
|
| 1043 | + * bugs in your code. |
|
| 1044 | + * |
|
| 1045 | + * Example: |
|
| 1046 | + * <code> |
|
| 1047 | + * $qb = $conn->createQueryBuilder(); |
|
| 1048 | + * $qb->select('u.*') |
|
| 1049 | + * ->from('users', 'u') |
|
| 1050 | + * ->where('u.username = ' . $qb->createPositionalParameter('Foo', ParameterType::STRING)) |
|
| 1051 | + * ->orWhere('u.username = ' . $qb->createPositionalParameter('Bar', ParameterType::STRING)) |
|
| 1052 | + * </code> |
|
| 1053 | + * |
|
| 1054 | + * @param mixed $value |
|
| 1055 | + * @param int|string|Type|null $type |
|
| 1056 | + * |
|
| 1057 | + * @return string |
|
| 1058 | + */ |
|
| 1059 | + public function createPositionalParameter($value, $type = ParameterType::STRING) |
|
| 1060 | + { |
|
| 1061 | + } |
|
| 1062 | + |
|
| 1063 | + /** |
|
| 1064 | + * Deep clone of all expression objects in the SQL parts. |
|
| 1065 | + * |
|
| 1066 | + * @return void |
|
| 1067 | + */ |
|
| 1068 | + public function __clone() |
|
| 1069 | + { |
|
| 1070 | + } |
|
| 1071 | + |
|
| 1072 | + /** |
|
| 1073 | + * Enables caching of the results of this query, for given amount of seconds |
|
| 1074 | + * and optionally specified which key to use for the cache entry. |
|
| 1075 | + * |
|
| 1076 | + * @return $this |
|
| 1077 | + */ |
|
| 1078 | + public function enableResultCache(QueryCacheProfile $cacheProfile): self |
|
| 1079 | + { |
|
| 1080 | + } |
|
| 1081 | + |
|
| 1082 | + /** |
|
| 1083 | + * Disables caching of the results of this query. |
|
| 1084 | + * |
|
| 1085 | + * @return $this |
|
| 1086 | + */ |
|
| 1087 | + public function disableResultCache(): self |
|
| 1088 | + { |
|
| 1089 | + } |
|
| 1090 | 1090 | } |
@@ -158,7 +158,7 @@ |
||
| 158 | 158 | } catch (FederatedItemException $e) { |
| 159 | 159 | if ($input->getOption('status-code')) { |
| 160 | 160 | throw new FederatedItemException( |
| 161 | - ' [' . get_class($e) . ', ' . ((string)$e->getStatus()) . ']' . "\n" . $e->getMessage() |
|
| 161 | + ' ['.get_class($e).', '.((string)$e->getStatus()).']'."\n".$e->getMessage() |
|
| 162 | 162 | ); |
| 163 | 163 | } |
| 164 | 164 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | } catch (FederatedItemException $e) { |
| 105 | 105 | if ($input->getOption('status-code')) { |
| 106 | 106 | throw new FederatedItemException( |
| 107 | - ' [' . get_class($e) . ', ' . ((string)$e->getStatus()) . ']' . "\n" . $e->getMessage() |
|
| 107 | + ' ['.get_class($e).', '.((string)$e->getStatus()).']'."\n".$e->getMessage() |
|
| 108 | 108 | ); |
| 109 | 109 | } |
| 110 | 110 | |
@@ -116,9 +116,9 @@ discard block |
||
| 116 | 116 | } elseif (strtolower($input->getOption('output')) !== 'none') { |
| 117 | 117 | /** @var Circle $circle */ |
| 118 | 118 | $circle = $this->deserialize($outcome, Circle::class); |
| 119 | - $output->writeln('Id: <info>' . $circle->getSingleId() . '</info>'); |
|
| 120 | - $output->writeln('Name: <info>' . $circle->getDisplayName() . '</info>'); |
|
| 121 | - $output->writeln('Owner: <info>' . $circle->getOwner()->getDisplayName() . '</info>'); |
|
| 119 | + $output->writeln('Id: <info>'.$circle->getSingleId().'</info>'); |
|
| 120 | + $output->writeln('Name: <info>'.$circle->getDisplayName().'</info>'); |
|
| 121 | + $output->writeln('Owner: <info>'.$circle->getOwner()->getDisplayName().'</info>'); |
|
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | return 0; |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | |
| 184 | 184 | // get the singleId of a Group |
| 185 | 185 | $federatedUser = $circlesManager->getFederatedUser('testGroup', Member::TYPE_GROUP); |
| 186 | - echo 'singleId: ' . $federatedUser->getSingleId() . "\n"; |
|
| 186 | + echo 'singleId: '.$federatedUser->getSingleId()."\n"; |
|
| 187 | 187 | |
| 188 | 188 | // $federatedUser->getMemberships(); |
| 189 | 189 | |
@@ -222,8 +222,8 @@ discard block |
||
| 222 | 222 | |
| 223 | 223 | |
| 224 | 224 | $members = array_map( |
| 225 | - function (Member $member): string { |
|
| 226 | - return $member->getUserId() . ' ' . $member->getSingleId() . ' - ' . $member->getUserType(); |
|
| 225 | + function(Member $member): string { |
|
| 226 | + return $member->getUserId().' '.$member->getSingleId().' - '.$member->getUserType(); |
|
| 227 | 227 | }, $circle->getInheritedMembers() |
| 228 | 228 | ); |
| 229 | 229 | |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | } catch (Exception $e) { |
| 310 | 310 | if ($this->pOn) { |
| 311 | 311 | $message = ($e->getMessage() !== '') ? $e->getMessage() : get_class($e); |
| 312 | - $this->output->writeln('<error>' . $message . '</error>'); |
|
| 312 | + $this->output->writeln('<error>'.$message.'</error>'); |
|
| 313 | 313 | } else { |
| 314 | 314 | throw $e; |
| 315 | 315 | } |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | */ |
| 394 | 394 | private function loadConfiguration() { |
| 395 | 395 | $this->p('Loading configuration'); |
| 396 | - $configuration = file_get_contents(__DIR__ . '/../../testConfiguration.json'); |
|
| 396 | + $configuration = file_get_contents(__DIR__.'/../../testConfiguration.json'); |
|
| 397 | 397 | $this->config = json_decode($configuration, true); |
| 398 | 398 | $this->r(true, 'testConfiguration.json'); |
| 399 | 399 | |
@@ -426,22 +426,22 @@ discard block |
||
| 426 | 426 | $this->r(); |
| 427 | 427 | |
| 428 | 428 | foreach ($this->getInstances() as $instance) { |
| 429 | - $this->p('Creating users on ' . $instance); |
|
| 429 | + $this->p('Creating users on '.$instance); |
|
| 430 | 430 | foreach ($this->getConfigArray($instance, 'users') as $userId) { |
| 431 | 431 | $this->pm($userId); |
| 432 | 432 | $this->occ( |
| 433 | - $instance, 'user:add --password-from-env ' . $userId, false, false, |
|
| 433 | + $instance, 'user:add --password-from-env '.$userId, false, false, |
|
| 434 | 434 | ['OC_PASS' => 'testtest'] |
| 435 | 435 | ); |
| 436 | 436 | } |
| 437 | 437 | $this->r(); |
| 438 | 438 | |
| 439 | 439 | foreach ($this->getConfigArray($instance, 'groups') as $groupId => $users) { |
| 440 | - $this->p('Creating group <info>' . $groupId . '</info> on <info>' . $instance . '</info>'); |
|
| 441 | - $this->occ($instance, 'group:add ' . $groupId, false, false); |
|
| 440 | + $this->p('Creating group <info>'.$groupId.'</info> on <info>'.$instance.'</info>'); |
|
| 441 | + $this->occ($instance, 'group:add '.$groupId, false, false); |
|
| 442 | 442 | foreach ($users as $userId) { |
| 443 | 443 | $this->pm($userId); |
| 444 | - $this->occ($instance, 'group:adduser ' . $groupId . ' ' . $userId, true, false); |
|
| 444 | + $this->occ($instance, 'group:adduser '.$groupId.' '.$userId, true, false); |
|
| 445 | 445 | } |
| 446 | 446 | $this->r(); |
| 447 | 447 | } |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | foreach ($this->getInstances(true) as $instance) { |
| 476 | 476 | $this->pm($instance); |
| 477 | 477 | foreach ($this->getConfigArray($instance, 'config') as $k => $v) { |
| 478 | - $this->occ($instance, 'config:app:set --value ' . $v . ' circles ' . $k, true, false); |
|
| 478 | + $this->occ($instance, 'config:app:set --value '.$v.' circles '.$k, true, false); |
|
| 479 | 479 | } |
| 480 | 480 | } |
| 481 | 481 | $this->r(); |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | */ |
| 489 | 489 | private function confirmVersion() { |
| 490 | 490 | $version = $this->configService->getAppValue('installed_version'); |
| 491 | - $this->p('Confirming version <info>' . $version . '</info>'); |
|
| 491 | + $this->p('Confirming version <info>'.$version.'</info>'); |
|
| 492 | 492 | foreach ($this->getInstances(false) as $instance) { |
| 493 | 493 | $this->pm($instance); |
| 494 | 494 | $capabilities = $this->occ($instance, 'circles:check --capabilities'); |
@@ -539,12 +539,12 @@ discard block |
||
| 539 | 539 | */ |
| 540 | 540 | private function statusFreshInstances() { |
| 541 | 541 | foreach ($this->getInstances() as $instanceId) { |
| 542 | - $this->p('Circles on ' . $instanceId); |
|
| 542 | + $this->p('Circles on '.$instanceId); |
|
| 543 | 543 | $result = $this->occ($instanceId, 'circles:manage:list --all'); |
| 544 | 544 | $expectedSize = sizeof($this->getConfigArray($instanceId, 'groups')) |
| 545 | 545 | + sizeof($this->getConfigArray($instanceId, 'users')) |
| 546 | 546 | + 1; |
| 547 | - $this->r((sizeof($result) === $expectedSize), ((string)sizeof($result)) . ' circles'); |
|
| 547 | + $this->r((sizeof($result) === $expectedSize), ((string)sizeof($result)).' circles'); |
|
| 548 | 548 | |
| 549 | 549 | $membersList = $groupsList = []; |
| 550 | 550 | foreach ($result as $item) { |
@@ -563,12 +563,12 @@ discard block |
||
| 563 | 563 | $instance = $this->getConfig($instanceId, 'config.frontal_cloud_id'); |
| 564 | 564 | |
| 565 | 565 | foreach ($this->getConfigArray($instanceId, 'users') as $userId) { |
| 566 | - $this->p('Checking Single Circle for <comment>' . $userId . '@' . $instance . '</comment>'); |
|
| 566 | + $this->p('Checking Single Circle for <comment>'.$userId.'@'.$instance.'</comment>'); |
|
| 567 | 567 | $circle = $this->getSingleCircleForMember($membersList, $userId, $instance); |
| 568 | 568 | |
| 569 | 569 | $compareToOwnerBasedOn = new Circle(); |
| 570 | 570 | $compareToOwnerBasedOn->setConfig(Circle::CFG_SINGLE) |
| 571 | - ->setName('user:' . $userId . ':{CIRCLEID}') |
|
| 571 | + ->setName('user:'.$userId.':{CIRCLEID}') |
|
| 572 | 572 | ->setDisplayName($userId); |
| 573 | 573 | |
| 574 | 574 | $compareToOwner = new Member(); |
@@ -586,7 +586,7 @@ discard block |
||
| 586 | 586 | $compareTo = new Circle(); |
| 587 | 587 | $compareTo->setOwner($compareToOwner) |
| 588 | 588 | ->setConfig(Circle::CFG_SINGLE) |
| 589 | - ->setName('user:' . $userId . ':{CIRCLEID}') |
|
| 589 | + ->setName('user:'.$userId.':{CIRCLEID}') |
|
| 590 | 590 | ->setDisplayName($userId); |
| 591 | 591 | |
| 592 | 592 | $this->confirmCircleData($circle, $compareTo); |
@@ -623,8 +623,8 @@ discard block |
||
| 623 | 623 | $this->r(true, $circle->getSingleId()); |
| 624 | 624 | |
| 625 | 625 | foreach ($this->getConfigArray($instanceId, 'groups') as $groupId => $members) { |
| 626 | - $this->p('Checking Circle for <comment>' . $groupId . '@' . $instance . '</comment>'); |
|
| 627 | - $circle = $this->getCircleFromList($groupsList, 'group:' . $groupId); |
|
| 626 | + $this->p('Checking Circle for <comment>'.$groupId.'@'.$instance.'</comment>'); |
|
| 627 | + $circle = $this->getCircleFromList($groupsList, 'group:'.$groupId); |
|
| 628 | 628 | |
| 629 | 629 | $appCircle = $this->getSingleCircleForMember($membersList, 'circles', $instance); |
| 630 | 630 | $appOwner = $appCircle->getOwner(); |
@@ -648,7 +648,7 @@ discard block |
||
| 648 | 648 | $compareTo = new Circle(); |
| 649 | 649 | $compareTo->setOwner($compareToOwner) |
| 650 | 650 | ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN) |
| 651 | - ->setName('group:' . $groupId) |
|
| 651 | + ->setName('group:'.$groupId) |
|
| 652 | 652 | ->setDisplayName($groupId); |
| 653 | 653 | |
| 654 | 654 | $this->confirmCircleData($circle, $compareTo); |
@@ -665,12 +665,12 @@ discard block |
||
| 665 | 665 | */ |
| 666 | 666 | private function createRemoteLink() { |
| 667 | 667 | foreach ($this->getInstances() as $instanceId) { |
| 668 | - $this->p('Init remote link from ' . $instanceId); |
|
| 668 | + $this->p('Init remote link from '.$instanceId); |
|
| 669 | 669 | $links = $this->getConfigArray($instanceId, 'remote'); |
| 670 | 670 | foreach ($links as $link => $type) { |
| 671 | 671 | $remote = $this->getConfig($link, 'config.frontal_cloud_id'); |
| 672 | - $this->pm($remote . '(' . $type . ')'); |
|
| 673 | - $this->occ($instanceId, 'circles:remote ' . $remote . ' --type ' . $type . ' --yes'); |
|
| 672 | + $this->pm($remote.'('.$type.')'); |
|
| 673 | + $this->occ($instanceId, 'circles:remote '.$remote.' --type '.$type.' --yes'); |
|
| 674 | 674 | } |
| 675 | 675 | $this->r(); |
| 676 | 676 | } |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | private function buildingLocalDatabase() { |
| 685 | 685 | $this->circles = $this->federatedUsers = []; |
| 686 | 686 | foreach ($this->getInstances() as $instanceId) { |
| 687 | - $this->p('Retrieving Circles from ' . $instanceId); |
|
| 687 | + $this->p('Retrieving Circles from '.$instanceId); |
|
| 688 | 688 | $circles = $this->occ($instanceId, 'circles:manage:list --all'); |
| 689 | 689 | foreach ($circles as $item) { |
| 690 | 690 | /** @var Circle $circle */ |
@@ -719,7 +719,7 @@ discard block |
||
| 719 | 719 | $name = self::$TEST_CIRCLES[0]; |
| 720 | 720 | $owner = $this->getInstanceUsers($localInstanceId)[1]; |
| 721 | 721 | $dataCreatedCircle001 = |
| 722 | - $this->occ($localInstanceId, 'circles:manage:create --type user ' . $owner . ' ' . $name); |
|
| 722 | + $this->occ($localInstanceId, 'circles:manage:create --type user '.$owner.' '.$name); |
|
| 723 | 723 | /** @var Circle $createdCircle */ |
| 724 | 724 | $createdCircle = $this->deserialize($dataCreatedCircle001, Circle::class); |
| 725 | 725 | $this->circles[$localInstanceId][$createdCircle->getName()] = $createdCircle; |
@@ -751,7 +751,7 @@ discard block |
||
| 751 | 751 | |
| 752 | 752 | |
| 753 | 753 | $this->p('Comparing local stored data'); |
| 754 | - $dataCircle = $this->occ($localInstanceId, 'circle:manage:details ' . $createdCircle->getSingleId()); |
|
| 754 | + $dataCircle = $this->occ($localInstanceId, 'circle:manage:details '.$createdCircle->getSingleId()); |
|
| 755 | 755 | |
| 756 | 756 | /** @var Circle $tmpCircle */ |
| 757 | 757 | $tmpCircle = $this->deserialize($dataCircle, Circle::class); |
@@ -760,9 +760,9 @@ discard block |
||
| 760 | 760 | |
| 761 | 761 | $links = $this->getConfigArray('global-scale-1', 'remote'); |
| 762 | 762 | foreach ($this->getInstances(false) as $instanceId) { |
| 763 | - $this->p('Comparing data stored on ' . $instanceId); |
|
| 763 | + $this->p('Comparing data stored on '.$instanceId); |
|
| 764 | 764 | $dataCircle = |
| 765 | - $this->occ($instanceId, 'circle:manage:details ' . $createdCircle->getSingleId(), false); |
|
| 765 | + $this->occ($instanceId, 'circle:manage:details '.$createdCircle->getSingleId(), false); |
|
| 766 | 766 | |
| 767 | 767 | if ($instanceId === $localInstanceId || $links[$instanceId] === 'GlobalScale') { |
| 768 | 768 | /** @var Circle $tmpCircle */ |
@@ -815,11 +815,11 @@ discard block |
||
| 815 | 815 | $name = self::$TEST_CIRCLES[0]; |
| 816 | 816 | $circle = $this->getCircleByName($localInstanceId, $name); |
| 817 | 817 | $userId = $this->getInstanceUsers($localInstanceId)[6]; |
| 818 | - $userCircle = $this->getCircleByName($localInstanceId, 'user:' . $userId); |
|
| 818 | + $userCircle = $this->getCircleByName($localInstanceId, 'user:'.$userId); |
|
| 819 | 819 | $user = $userCircle->getOwner(); |
| 820 | 820 | $dataAddedMember = |
| 821 | 821 | $this->occ( |
| 822 | - $localInstanceId, 'circles:members:add ' . $circle->getSingleId() . ' ' . $user->getSingleId() |
|
| 822 | + $localInstanceId, 'circles:members:add '.$circle->getSingleId().' '.$user->getSingleId() |
|
| 823 | 823 | ); |
| 824 | 824 | /** @var Member $addedMember */ |
| 825 | 825 | $addedMember = $this->deserialize($dataAddedMember, Member::class); |
@@ -839,11 +839,11 @@ discard block |
||
| 839 | 839 | |
| 840 | 840 | $circle = $this->getCircleByName($localInstanceId, $circleName); |
| 841 | 841 | $userId = $this->getInstanceUsers($localInstanceId)[6]; |
| 842 | - $userCircle = $this->getCircleByName($localInstanceId, 'user:' . $userId); |
|
| 842 | + $userCircle = $this->getCircleByName($localInstanceId, 'user:'.$userId); |
|
| 843 | 843 | $user = $userCircle->getOwner(); |
| 844 | 844 | $dataAddedMember = |
| 845 | 845 | $this->occ( |
| 846 | - $localInstanceId, 'circles:members:add ' . $circle->getSingleId() . ' ' . $user->getSingleId() |
|
| 846 | + $localInstanceId, 'circles:members:add '.$circle->getSingleId().' '.$user->getSingleId() |
|
| 847 | 847 | ); |
| 848 | 848 | /** @var Member $addedMember */ |
| 849 | 849 | $addedMember = $this->deserialize($dataAddedMember, Member::class); |
@@ -937,19 +937,19 @@ discard block |
||
| 937 | 937 | ]; |
| 938 | 938 | } |
| 939 | 939 | |
| 940 | - $this->compare($compareTo->getSingleId(), $circle->getSingleId(), $prefix . '.id', $params); |
|
| 941 | - $this->compare($compareTo->getName(), $circle->getName(), $prefix . '.name', $params); |
|
| 940 | + $this->compare($compareTo->getSingleId(), $circle->getSingleId(), $prefix.'.id', $params); |
|
| 941 | + $this->compare($compareTo->getName(), $circle->getName(), $prefix.'.name', $params); |
|
| 942 | 942 | $this->compare( |
| 943 | - $compareTo->getDisplayName(), $circle->getDisplayName(), $prefix . '.displayName', $params |
|
| 943 | + $compareTo->getDisplayName(), $circle->getDisplayName(), $prefix.'.displayName', $params |
|
| 944 | 944 | ); |
| 945 | - $this->compareInt($compareTo->getConfig(), $circle->getConfig(), $prefix . '.config', true); |
|
| 946 | - $this->compareInt($compareTo->getSource(), $circle->getSource(), $prefix . '.source'); |
|
| 945 | + $this->compareInt($compareTo->getConfig(), $circle->getConfig(), $prefix.'.config', true); |
|
| 946 | + $this->compareInt($compareTo->getSource(), $circle->getSource(), $prefix.'.source'); |
|
| 947 | 947 | |
| 948 | 948 | if ($compareTo->hasOwner()) { |
| 949 | 949 | $compareToOwner = $compareTo->getOwner(); |
| 950 | 950 | $owner = $circle->getOwner(); |
| 951 | 951 | if ($owner->getCircleId() !== $circle->getSingleId()) { |
| 952 | - throw new Exception($prefix . '.owner.circleId is different than ' . $prefix . '.id'); |
|
| 952 | + throw new Exception($prefix.'.owner.circleId is different than '.$prefix.'.id'); |
|
| 953 | 953 | } |
| 954 | 954 | $this->confirmMemberData($owner, $compareToOwner, 'owner', false, $params); |
| 955 | 955 | } |
@@ -960,7 +960,7 @@ discard block |
||
| 960 | 960 | } |
| 961 | 961 | $initiator = $circle->getInitiator(); |
| 962 | 962 | if ($initiator->getCircleId() !== $circle->getSingleId()) { |
| 963 | - throw new Exception($prefix . '.initiator.circleId is different than ' . $prefix . '.id'); |
|
| 963 | + throw new Exception($prefix.'.initiator.circleId is different than '.$prefix.'.id'); |
|
| 964 | 964 | } |
| 965 | 965 | $this->confirmMemberData($initiator, $compareToInitiator, 'owner', false, $params); |
| 966 | 966 | } |
@@ -986,27 +986,27 @@ discard block |
||
| 986 | 986 | bool $versa = false, |
| 987 | 987 | array $params = [], |
| 988 | 988 | ) { |
| 989 | - $this->compare($compareTo->getId(), $member->getId(), $prefix . '.id', $params); |
|
| 990 | - $this->compare($compareTo->getCircleId(), $member->getCircleId(), $prefix . '.circleId', $params); |
|
| 991 | - $this->compare($compareTo->getSingleId(), $member->getSingleId(), $prefix . '.singleId', $params); |
|
| 992 | - $this->compare($compareTo->getUserId(), $member->getUserId(), $prefix . '.userId', $params); |
|
| 989 | + $this->compare($compareTo->getId(), $member->getId(), $prefix.'.id', $params); |
|
| 990 | + $this->compare($compareTo->getCircleId(), $member->getCircleId(), $prefix.'.circleId', $params); |
|
| 991 | + $this->compare($compareTo->getSingleId(), $member->getSingleId(), $prefix.'.singleId', $params); |
|
| 992 | + $this->compare($compareTo->getUserId(), $member->getUserId(), $prefix.'.userId', $params); |
|
| 993 | 993 | $this->compare( |
| 994 | - $compareTo->getDisplayName(), $member->getDisplayName(), $prefix . '.displayName', $params |
|
| 994 | + $compareTo->getDisplayName(), $member->getDisplayName(), $prefix.'.displayName', $params |
|
| 995 | 995 | ); |
| 996 | - $this->compareInt($compareTo->getUserType(), $member->getUserType(), $prefix . '.userType'); |
|
| 997 | - $this->compare($compareTo->getInstance(), $member->getInstance(), $prefix . '.instance', $params); |
|
| 998 | - $this->compareInt($compareTo->getLevel(), $member->getLevel(), $prefix . '.level', true); |
|
| 999 | - $this->compare($compareTo->getStatus(), $member->getStatus(), $prefix . '.status', $params); |
|
| 996 | + $this->compareInt($compareTo->getUserType(), $member->getUserType(), $prefix.'.userType'); |
|
| 997 | + $this->compare($compareTo->getInstance(), $member->getInstance(), $prefix.'.instance', $params); |
|
| 998 | + $this->compareInt($compareTo->getLevel(), $member->getLevel(), $prefix.'.level', true); |
|
| 999 | + $this->compare($compareTo->getStatus(), $member->getStatus(), $prefix.'.status', $params); |
|
| 1000 | 1000 | |
| 1001 | 1001 | if ($compareTo->hasBasedOn()) { |
| 1002 | 1002 | if (!$member->hasBasedOn()) { |
| 1003 | - throw new Exception('empty ' . $prefix . '.basedOn'); |
|
| 1003 | + throw new Exception('empty '.$prefix.'.basedOn'); |
|
| 1004 | 1004 | } |
| 1005 | 1005 | $basedOn = $member->getBasedOn(); |
| 1006 | 1006 | $this->confirmCircleData( |
| 1007 | 1007 | $basedOn, |
| 1008 | 1008 | $compareTo->getBasedOn(), |
| 1009 | - $prefix . '.basedOn', |
|
| 1009 | + $prefix.'.basedOn', |
|
| 1010 | 1010 | false, |
| 1011 | 1011 | $params |
| 1012 | 1012 | ); |
@@ -1025,7 +1025,7 @@ discard block |
||
| 1025 | 1025 | private function compare(string $expected, string $compare, string $def, array $params) { |
| 1026 | 1026 | if ($expected !== '' |
| 1027 | 1027 | && $this->feedStringWithParams($expected, $params) !== $compare) { |
| 1028 | - throw new Exception($def . ': ' . $compare . ' (' . $expected . ')'); |
|
| 1028 | + throw new Exception($def.': '.$compare.' ('.$expected.')'); |
|
| 1029 | 1029 | } |
| 1030 | 1030 | } |
| 1031 | 1031 | |
@@ -1041,7 +1041,7 @@ discard block |
||
| 1041 | 1041 | private function compareInt(int $expected, int $compare, string $def, bool $force = false) { |
| 1042 | 1042 | if (($expected > 0 || ($force && $expected >= 0)) |
| 1043 | 1043 | && $expected !== $compare) { |
| 1044 | - throw new Exception('wrong ' . $def . ': ' . ((string)$compare) . ' (' . ((string)$expected) . ')'); |
|
| 1044 | + throw new Exception('wrong '.$def.': '.((string)$compare).' ('.((string)$expected).')'); |
|
| 1045 | 1045 | } |
| 1046 | 1046 | } |
| 1047 | 1047 | |
@@ -1077,7 +1077,7 @@ discard block |
||
| 1077 | 1077 | } |
| 1078 | 1078 | } |
| 1079 | 1079 | |
| 1080 | - throw new CircleNotFoundException('cannot find ' . $userId . ' in the list of Single Circle'); |
|
| 1080 | + throw new CircleNotFoundException('cannot find '.$userId.' in the list of Single Circle'); |
|
| 1081 | 1081 | } |
| 1082 | 1082 | |
| 1083 | 1083 | |
@@ -1095,7 +1095,7 @@ discard block |
||
| 1095 | 1095 | } |
| 1096 | 1096 | |
| 1097 | 1097 | throw new CircleNotFoundException( |
| 1098 | - 'cannot extract \'' . $name . '\' from the list of generated Circles' |
|
| 1098 | + 'cannot extract \''.$name.'\' from the list of generated Circles' |
|
| 1099 | 1099 | ); |
| 1100 | 1100 | } |
| 1101 | 1101 | |
@@ -1115,7 +1115,7 @@ discard block |
||
| 1115 | 1115 | } |
| 1116 | 1116 | |
| 1117 | 1117 | throw new CircleNotFoundException( |
| 1118 | - 'cannot extract \'' . $name . '\' from the list of provided Circles' |
|
| 1118 | + 'cannot extract \''.$name.'\' from the list of provided Circles' |
|
| 1119 | 1119 | ); |
| 1120 | 1120 | } |
| 1121 | 1121 | |
@@ -1160,7 +1160,7 @@ discard block |
||
| 1160 | 1160 | } |
| 1161 | 1161 | } |
| 1162 | 1162 | |
| 1163 | - throw new ItemNotFoundException($instance . ' not found'); |
|
| 1163 | + throw new ItemNotFoundException($instance.' not found'); |
|
| 1164 | 1164 | } |
| 1165 | 1165 | |
| 1166 | 1166 | |
@@ -1195,7 +1195,7 @@ discard block |
||
| 1195 | 1195 | ): ?array { |
| 1196 | 1196 | $configInstance = $this->getConfigInstance($instance); |
| 1197 | 1197 | $path = $this->get('path', $configInstance); |
| 1198 | - $occ = rtrim($path, '/') . '/occ'; |
|
| 1198 | + $occ = rtrim($path, '/').'/occ'; |
|
| 1199 | 1199 | |
| 1200 | 1200 | $command = array_merge([$occ], explode(' ', $cmd)); |
| 1201 | 1201 | if ($jsonAsOutput) { |
@@ -1205,7 +1205,7 @@ discard block |
||
| 1205 | 1205 | $process->run(null, $env); |
| 1206 | 1206 | |
| 1207 | 1207 | if ($exceptionOnFail && !$process->isSuccessful()) { |
| 1208 | - throw new Exception(implode(' ', $command) . ' failed'); |
|
| 1208 | + throw new Exception(implode(' ', $command).' failed'); |
|
| 1209 | 1209 | } |
| 1210 | 1210 | |
| 1211 | 1211 | $output = json_decode($process->getOutput(), true); |
@@ -1228,7 +1228,7 @@ discard block |
||
| 1228 | 1228 | */ |
| 1229 | 1229 | private function t(string $title): void { |
| 1230 | 1230 | $this->output->writeln(''); |
| 1231 | - $this->output->writeln('<comment>### ' . $title . '</comment>'); |
|
| 1231 | + $this->output->writeln('<comment>### '.$title.'</comment>'); |
|
| 1232 | 1232 | $this->output->writeln(''); |
| 1233 | 1233 | } |
| 1234 | 1234 | |
@@ -1237,14 +1237,14 @@ discard block |
||
| 1237 | 1237 | */ |
| 1238 | 1238 | private function p(string $processing): void { |
| 1239 | 1239 | $this->pOn = true; |
| 1240 | - $this->output->write('- ' . $processing . ': '); |
|
| 1240 | + $this->output->write('- '.$processing.': '); |
|
| 1241 | 1241 | } |
| 1242 | 1242 | |
| 1243 | 1243 | /** |
| 1244 | 1244 | * @param string $more |
| 1245 | 1245 | */ |
| 1246 | 1246 | private function pm(string $more): void { |
| 1247 | - $this->output->write($more . ' '); |
|
| 1247 | + $this->output->write($more.' '); |
|
| 1248 | 1248 | } |
| 1249 | 1249 | |
| 1250 | 1250 | /** |
@@ -1254,9 +1254,9 @@ discard block |
||
| 1254 | 1254 | private function r(bool $result = true, string $info = ''): void { |
| 1255 | 1255 | $this->pOn = false; |
| 1256 | 1256 | if ($result) { |
| 1257 | - $this->output->writeln('<info>' . (($info !== '') ? $info : 'done') . '</info>'); |
|
| 1257 | + $this->output->writeln('<info>'.(($info !== '') ? $info : 'done').'</info>'); |
|
| 1258 | 1258 | } else { |
| 1259 | - $this->output->writeln('<error>' . (($info !== '') ? $info : 'done') . '</error>'); |
|
| 1259 | + $this->output->writeln('<error>'.(($info !== '') ? $info : 'done').'</error>'); |
|
| 1260 | 1260 | } |
| 1261 | 1261 | } |
| 1262 | 1262 | |
@@ -1278,16 +1278,16 @@ discard block |
||
| 1278 | 1278 | $dataAddedMember = |
| 1279 | 1279 | $this->occ( |
| 1280 | 1280 | $instanceId, |
| 1281 | - 'circles:members:add ' . $circle->getSingleId() . ' ' . $userId . ' --type ' . $type |
|
| 1281 | + 'circles:members:add '.$circle->getSingleId().' '.$userId.' --type '.$type |
|
| 1282 | 1282 | ); |
| 1283 | 1283 | /** @var Member $addedMember */ |
| 1284 | 1284 | $addedMember = $this->deserialize($dataAddedMember, Member::class); |
| 1285 | 1285 | |
| 1286 | 1286 | |
| 1287 | - echo 'ADDEDMEMBER: ' . json_encode($addedMember, JSON_PRETTY_PRINT) . "\n"; |
|
| 1287 | + echo 'ADDEDMEMBER: '.json_encode($addedMember, JSON_PRETTY_PRINT)."\n"; |
|
| 1288 | 1288 | |
| 1289 | 1289 | $federatedUser = $this->federatedUsers[$instanceId][$userId]; |
| 1290 | - echo 'FEDERATEDUER: ' . json_encode($federatedUser, JSON_PRETTY_PRINT) . "\n"; |
|
| 1290 | + echo 'FEDERATEDUER: '.json_encode($federatedUser, JSON_PRETTY_PRINT)."\n"; |
|
| 1291 | 1291 | |
| 1292 | 1292 | return $addedMember; |
| 1293 | 1293 | } |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | } catch (FederatedItemException $e) { |
| 117 | 117 | if ($input->getOption('status-code')) { |
| 118 | 118 | throw new FederatedItemException( |
| 119 | - ' [' . get_class($e) . ', ' . ((string)$e->getStatus()) . ']' . "\n" . $e->getMessage() |
|
| 119 | + ' ['.get_class($e).', '.((string)$e->getStatus()).']'."\n".$e->getMessage() |
|
| 120 | 120 | ); |
| 121 | 121 | } |
| 122 | 122 | |
@@ -158,8 +158,8 @@ discard block |
||
| 158 | 158 | $value = array_search(strtoupper($item), $valid); |
| 159 | 159 | if (!$value) { |
| 160 | 160 | throw new InvalidArgumentException( |
| 161 | - 'Invalid config \'' . $item . '\'. Available values: ' |
|
| 162 | - . implode(', ', array_values($valid)) . '. ' |
|
| 161 | + 'Invalid config \''.$item.'\'. Available values: ' |
|
| 162 | + . implode(', ', array_values($valid)).'. ' |
|
| 163 | 163 | . 'To disable a config, start the value with an underscore' |
| 164 | 164 | ); |
| 165 | 165 | } |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | array_walk( |
| 195 | 195 | $listing, |
| 196 | - function (string &$v): void { |
|
| 196 | + function(string &$v): void { |
|
| 197 | 197 | [, $long] = explode('|', $v); |
| 198 | 198 | $v = strtoupper(str_replace(' ', '', $long)); |
| 199 | 199 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | throw new Exception('Please specify a --type for the test'); |
| 110 | 110 | } |
| 111 | 111 | if ($test !== '' && !in_array($type, self::$checks)) { |
| 112 | - throw new Exception('Unknown type: ' . implode(', ', self::$checks)); |
|
| 112 | + throw new Exception('Unknown type: '.implode(', ', self::$checks)); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | // $this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | $output->writeln(''); |
| 168 | - $output->writeln('* testing current address: ' . $test); |
|
| 168 | + $output->writeln('* testing current address: '.$test); |
|
| 169 | 169 | |
| 170 | 170 | try { |
| 171 | 171 | $this->setupLoopback($input, $output, $test); |
@@ -200,8 +200,8 @@ discard block |
||
| 200 | 200 | continue; |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | - $loopback = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
| 204 | - $output->writeln('* testing address: ' . $loopback . ' '); |
|
| 203 | + $loopback = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
| 204 | + $output->writeln('* testing address: '.$loopback.' '); |
|
| 205 | 205 | |
| 206 | 206 | try { |
| 207 | 207 | $this->setupLoopback($input, $output, $loopback); |
@@ -272,8 +272,8 @@ discard block |
||
| 272 | 272 | $test = new FederatedEvent(LoopbackTest::class); |
| 273 | 273 | $this->federatedEventService->newEvent($test); |
| 274 | 274 | $output->writeln( |
| 275 | - '<info>' . $test->getWrapperToken() . '</info> ' . |
|
| 276 | - '(took ' . ((string)(round(microtime(true) * 1000.0) - $timer)) . 'ms)' |
|
| 275 | + '<info>'.$test->getWrapperToken().'</info> '. |
|
| 276 | + '(took '.((string)(round(microtime(true) * 1000.0) - $timer)).'ms)' |
|
| 277 | 277 | ); |
| 278 | 278 | |
| 279 | 279 | $output->writeln('- Waiting for async process to finish (5s)'); |
@@ -292,18 +292,18 @@ discard block |
||
| 292 | 292 | |
| 293 | 293 | $checkVerify = $wrapper->getEvent()->getData()->gInt('verify'); |
| 294 | 294 | if ($checkVerify === LoopbackTest::VERIFY) { |
| 295 | - $output->write('<info>verify=' . ((string)$checkVerify) . '</info> '); |
|
| 295 | + $output->write('<info>verify='.((string)$checkVerify).'</info> '); |
|
| 296 | 296 | } else { |
| 297 | - $output->writeln('<error>verify=' . ((string)$checkVerify) . '</error>'); |
|
| 297 | + $output->writeln('<error>verify='.((string)$checkVerify).'</error>'); |
|
| 298 | 298 | |
| 299 | 299 | return false; |
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | $checkManage = $wrapper->getResult()->gInt('manage'); |
| 303 | 303 | if ($checkManage === LoopbackTest::MANAGE) { |
| 304 | - $output->write('<info>manage=' . ((string)$checkManage) . '</info> '); |
|
| 304 | + $output->write('<info>manage='.((string)$checkManage).'</info> '); |
|
| 305 | 305 | } else { |
| 306 | - $output->writeln('<error>manage=' . ((string)$checkManage) . '</error>'); |
|
| 306 | + $output->writeln('<error>manage='.((string)$checkManage).'</error>'); |
|
| 307 | 307 | |
| 308 | 308 | return false; |
| 309 | 309 | } |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId); |
| 343 | 343 | $this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path); |
| 344 | 344 | $output->writeln( |
| 345 | - '- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>' |
|
| 345 | + '- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>' |
|
| 346 | 346 | ); |
| 347 | 347 | } |
| 348 | 348 | |
@@ -395,8 +395,8 @@ discard block |
||
| 395 | 395 | continue; |
| 396 | 396 | } |
| 397 | 397 | |
| 398 | - $internal = rtrim($scheme . '://' . $cloudId, '/'); |
|
| 399 | - $fullInternal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
| 398 | + $internal = rtrim($scheme.'://'.$cloudId, '/'); |
|
| 399 | + $fullInternal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
| 400 | 400 | |
| 401 | 401 | $question = new ConfirmationQuestion( |
| 402 | 402 | '<comment>Do you want to check the validity of this internal address?</comment> (Y/n) ', true, |
@@ -415,9 +415,9 @@ discard block |
||
| 415 | 415 | 'You will need to run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
| 416 | 416 | ); |
| 417 | 417 | $output->writeln( |
| 418 | - ' curl -L "' . $internal |
|
| 418 | + ' curl -L "'.$internal |
|
| 419 | 419 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
| 420 | - . $testToken . '"' |
|
| 420 | + . $testToken.'"' |
|
| 421 | 421 | ); |
| 422 | 422 | |
| 423 | 423 | $output->writeln('paste the result here: '); |
@@ -451,7 +451,7 @@ discard block |
||
| 451 | 451 | |
| 452 | 452 | if ($pastedHref !== $href) { |
| 453 | 453 | $output->writeln( |
| 454 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
| 454 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
| 455 | 455 | . $href |
| 456 | 456 | ); |
| 457 | 457 | continue; |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | 'Next step, please run this <info>curl</info> command from a terminal on your local network and paste its result: ' |
| 464 | 464 | ); |
| 465 | 465 | $output->writeln( |
| 466 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
| 466 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
| 467 | 467 | ); |
| 468 | 468 | |
| 469 | 469 | $output->writeln('paste the result here: '); |
@@ -479,9 +479,9 @@ discard block |
||
| 479 | 479 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
| 480 | 480 | $output->writeln( |
| 481 | 481 | '<error>The returned data (' |
| 482 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
| 482 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
| 483 | 483 | . ') are not the one expected: </error>' |
| 484 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
| 484 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
| 485 | 485 | ); |
| 486 | 486 | continue; |
| 487 | 487 | } |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | |
| 508 | 508 | $output->writeln(''); |
| 509 | 509 | $question = new ConfirmationQuestion( |
| 510 | - '- Do you want to save <info>' . $internal |
|
| 510 | + '- Do you want to save <info>'.$internal |
|
| 511 | 511 | . '</info> as your <info>internal</info> address ? (y/N) ', |
| 512 | 512 | false, '/^(y|Y)/i' |
| 513 | 513 | ); |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_ID, $cloudId); |
| 525 | 525 | $this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_PATH, $path); |
| 526 | 526 | |
| 527 | - $output->writeln('- Address <info>' . $internal . '</info> is now used as <info>internal</info>'); |
|
| 527 | + $output->writeln('- Address <info>'.$internal.'</info> is now used as <info>internal</info>'); |
|
| 528 | 528 | } |
| 529 | 529 | |
| 530 | 530 | /** |
@@ -575,8 +575,8 @@ discard block |
||
| 575 | 575 | continue; |
| 576 | 576 | } |
| 577 | 577 | |
| 578 | - $frontal = rtrim($scheme . '://' . $cloudId, '/'); |
|
| 579 | - $fullFrontal = rtrim($scheme . '://' . $cloudId . $path, '/'); |
|
| 578 | + $frontal = rtrim($scheme.'://'.$cloudId, '/'); |
|
| 579 | + $fullFrontal = rtrim($scheme.'://'.$cloudId.$path, '/'); |
|
| 580 | 580 | |
| 581 | 581 | $question = new ConfirmationQuestion( |
| 582 | 582 | '<comment>Do you want to check the validity of this frontal address?</comment> (y/N) ', false, |
@@ -595,9 +595,9 @@ discard block |
||
| 595 | 595 | 'You will need to run this <info>curl</info> command from a remote terminal and paste its result: ' |
| 596 | 596 | ); |
| 597 | 597 | $output->writeln( |
| 598 | - ' curl -L "' . $frontal |
|
| 598 | + ' curl -L "'.$frontal |
|
| 599 | 599 | . '/.well-known/webfinger?resource=http://nextcloud.com/&test=' |
| 600 | - . $testToken . '"' |
|
| 600 | + . $testToken.'"' |
|
| 601 | 601 | ); |
| 602 | 602 | |
| 603 | 603 | $output->writeln('paste the result here: '); |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | |
| 632 | 632 | if ($pastedHref !== $href) { |
| 633 | 633 | $output->writeln( |
| 634 | - '<error>The returned data (' . $pastedHref . ') are not the one expected: </error>' |
|
| 634 | + '<error>The returned data ('.$pastedHref.') are not the one expected: </error>' |
|
| 635 | 635 | . $href |
| 636 | 636 | ); |
| 637 | 637 | continue; |
@@ -643,7 +643,7 @@ discard block |
||
| 643 | 643 | 'Next step, please run this <info>curl</info> command from a remote terminal and paste its result: ' |
| 644 | 644 | ); |
| 645 | 645 | $output->writeln( |
| 646 | - ' curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"' |
|
| 646 | + ' curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"' |
|
| 647 | 647 | ); |
| 648 | 648 | |
| 649 | 649 | $output->writeln('paste the result here: '); |
@@ -659,9 +659,9 @@ discard block |
||
| 659 | 659 | || $appSignatory->getRoot() !== $pastedSignatory->g('root')) { |
| 660 | 660 | $output->writeln( |
| 661 | 661 | '<error>The returned data (' |
| 662 | - . $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root') |
|
| 662 | + . $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root') |
|
| 663 | 663 | . ') are not the one expected: </error>' |
| 664 | - . $appSignatory->getUid(true) . '/' . $appSignatory->getRoot() |
|
| 664 | + . $appSignatory->getUid(true).'/'.$appSignatory->getRoot() |
|
| 665 | 665 | ); |
| 666 | 666 | continue; |
| 667 | 667 | } |
@@ -687,7 +687,7 @@ discard block |
||
| 687 | 687 | |
| 688 | 688 | $output->writeln(''); |
| 689 | 689 | $question = new ConfirmationQuestion( |
| 690 | - '- Do you want to save <info>' . $frontal |
|
| 690 | + '- Do you want to save <info>'.$frontal |
|
| 691 | 691 | . '</info> as your <info>frontal</info> address ? (y/N) ', |
| 692 | 692 | false, '/^(y|Y)/i' |
| 693 | 693 | ); |
@@ -704,7 +704,7 @@ discard block |
||
| 704 | 704 | $this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_ID, $cloudId); |
| 705 | 705 | $this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_PATH, $path); |
| 706 | 706 | |
| 707 | - $output->writeln('- Address <info>' . $frontal . '</info> is now used as <info>frontal</info>'); |
|
| 707 | + $output->writeln('- Address <info>'.$frontal.'</info> is now used as <info>frontal</info>'); |
|
| 708 | 708 | } |
| 709 | 709 | |
| 710 | 710 | /** |
@@ -729,7 +729,7 @@ discard block |
||
| 729 | 729 | $request->setDataSerialize(new SimpleDataStore(['empty' => 1])); |
| 730 | 730 | } |
| 731 | 731 | |
| 732 | - $output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': '); |
|
| 732 | + $output->write('- '.$type.' request on '.$request->getCompleteUrl().': '); |
|
| 733 | 733 | |
| 734 | 734 | try { |
| 735 | 735 | $this->doRequest($request); |
@@ -740,7 +740,7 @@ discard block |
||
| 740 | 740 | $color = 'info'; |
| 741 | 741 | } |
| 742 | 742 | |
| 743 | - $output->writeln('<' . $color . '>' . ((string)$result->getStatusCode()) . '</' . $color . '>'); |
|
| 743 | + $output->writeln('<'.$color.'>'.((string)$result->getStatusCode()).'</'.$color.'>'); |
|
| 744 | 744 | if ($result->getStatusCode() === 200) { |
| 745 | 745 | return true; |
| 746 | 746 | } |
@@ -763,7 +763,7 @@ discard block |
||
| 763 | 763 | |
| 764 | 764 | $output->writeln(''); |
| 765 | 765 | $output->writeln( |
| 766 | - 'The address <info>' . $address . '</info> seems to reach your local Nextcloud.' |
|
| 766 | + 'The address <info>'.$address.'</info> seems to reach your local Nextcloud.' |
|
| 767 | 767 | ); |
| 768 | 768 | |
| 769 | 769 | /** @var QuestionHelper $helper */ |
@@ -781,8 +781,8 @@ discard block |
||
| 781 | 781 | |
| 782 | 782 | $this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address); |
| 783 | 783 | $output->writeln( |
| 784 | - 'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\'' |
|
| 785 | - . $address . '\'</info> stored in database' |
|
| 784 | + 'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\'' |
|
| 785 | + . $address.'\'</info> stored in database' |
|
| 786 | 786 | ); |
| 787 | 787 | } |
| 788 | 788 | |
@@ -809,7 +809,7 @@ discard block |
||
| 809 | 809 | $path = rtrim($path, '/'); |
| 810 | 810 | |
| 811 | 811 | if (!is_null($cloudIdPort)) { |
| 812 | - $cloudId = $cloudId . ':' . ((string)$cloudIdPort); |
|
| 812 | + $cloudId = $cloudId.':'.((string)$cloudIdPort); |
|
| 813 | 813 | } |
| 814 | 814 | |
| 815 | 815 | return [$scheme, $cloudId, $path]; |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | } catch (FederatedItemException $e) { |
| 110 | 110 | if ($input->getOption('status-code')) { |
| 111 | 111 | throw new FederatedItemException( |
| 112 | - ' [' . get_class($e) . ', ' . ((string)$e->getStatus()) . ']' . "\n" . $e->getMessage() |
|
| 112 | + ' ['.get_class($e).', '.((string)$e->getStatus()).']'."\n".$e->getMessage() |
|
| 113 | 113 | ); |
| 114 | 114 | } |
| 115 | 115 | |
@@ -148,10 +148,10 @@ discard block |
||
| 148 | 148 | try { |
| 149 | 149 | $users = $this->retrieveJson($request); |
| 150 | 150 | } catch ( |
| 151 | - RequestContentException| |
|
| 152 | - RequestNetworkException| |
|
| 153 | - RequestResultSizeException| |
|
| 154 | - RequestServerException| |
|
| 151 | + RequestContentException | |
|
| 152 | + RequestNetworkException | |
|
| 153 | + RequestResultSizeException | |
|
| 154 | + RequestServerException | |
|
| 155 | 155 | RequestResultNotJsonException $e |
| 156 | 156 | ) { |
| 157 | 157 | return ''; |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $instance = $host; |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | - $result[] = $user['userid']['value'] . ' <info>@' . $host . '</info>'; |
|
| 172 | + $result[] = $user['userid']['value'].' <info>@'.$host.'</info>'; |
|
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | // if ($userId === '') { |