Skip to content

Commit e78c929

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.5
2 parents ff7c020 + 2a3794a commit e78c929

Some content is hidden

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

44 files changed

+107
-359
lines changed

app/.htaccess

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<IfModule authz_core_module>
2-
Require all denied
2+
Require all denied
33
</IfModule>
44
<IfModule !authz_core_module>
5-
Deny from all
5+
Deny from all
66
</IfModule>

phpstan-baseline.php

Lines changed: 0 additions & 290 deletions
Large diffs are not rendered by default.

public/.htaccess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ Options -Indexes
4545
</IfModule>
4646

4747
# Disable server signature start
48-
ServerSignature Off
48+
ServerSignature Off
4949
# Disable server signature end

rector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use Rector\CodeQuality\Rector\FuncCall\SingleInArrayToCompareRector;
2424
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
2525
use Rector\CodeQuality\Rector\If_\CombineIfRector;
26+
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
2627
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector;
2728
use Rector\CodeQuality\Rector\If_\SimplifyIfElseToTernaryRector;
2829
use Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector;
@@ -198,6 +199,7 @@
198199
$rectorConfig->rule(BooleanInIfConditionRuleFixerRector::class);
199200
$rectorConfig->rule(SingleInArrayToCompareRector::class);
200201
$rectorConfig->rule(VersionCompareFuncCallToConstantRector::class);
202+
$rectorConfig->rule(ExplicitBoolCompareRector::class);
201203

202204
$rectorConfig
203205
->ruleWithConfiguration(StringClassNameToClassConstantRector::class, [

system/BaseModel.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -278,84 +278,84 @@ abstract class BaseModel
278278
/**
279279
* Callbacks for beforeInsert
280280
*
281-
* @var array
281+
* @var list<string>
282282
*/
283283
protected $beforeInsert = [];
284284

285285
/**
286286
* Callbacks for afterInsert
287287
*
288-
* @var array
288+
* @var list<string>
289289
*/
290290
protected $afterInsert = [];
291291

292292
/**
293293
* Callbacks for beforeUpdate
294294
*
295-
* @var array
295+
* @var list<string>
296296
*/
297297
protected $beforeUpdate = [];
298298

299299
/**
300300
* Callbacks for afterUpdate
301301
*
302-
* @var array
302+
* @var list<string>
303303
*/
304304
protected $afterUpdate = [];
305305

306306
/**
307307
* Callbacks for beforeInsertBatch
308308
*
309-
* @var array
309+
* @var list<string>
310310
*/
311311
protected $beforeInsertBatch = [];
312312

313313
/**
314314
* Callbacks for afterInsertBatch
315315
*
316-
* @var array
316+
* @var list<string>
317317
*/
318318
protected $afterInsertBatch = [];
319319

320320
/**
321321
* Callbacks for beforeUpdateBatch
322322
*
323-
* @var array
323+
* @var list<string>
324324
*/
325325
protected $beforeUpdateBatch = [];
326326

327327
/**
328328
* Callbacks for afterUpdateBatch
329329
*
330-
* @var array
330+
* @var list<string>
331331
*/
332332
protected $afterUpdateBatch = [];
333333

334334
/**
335335
* Callbacks for beforeFind
336336
*
337-
* @var array
337+
* @var list<string>
338338
*/
339339
protected $beforeFind = [];
340340

341341
/**
342342
* Callbacks for afterFind
343343
*
344-
* @var array
344+
* @var list<string>
345345
*/
346346
protected $afterFind = [];
347347

348348
/**
349349
* Callbacks for beforeDelete
350350
*
351-
* @var array
351+
* @var list<string>
352352
*/
353353
protected $beforeDelete = [];
354354

355355
/**
356356
* Callbacks for afterDelete
357357
*
358-
* @var array
358+
* @var list<string>
359359
*/
360360
protected $afterDelete = [];
361361

system/CLI/CLI.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public static function prompt(string $field, $options = null, $validation = null
255255
$default = $options[0];
256256
}
257257

258-
static::fwrite(STDOUT, $field . (trim($field) ? ' ' : '') . $extraOutput . ': ');
258+
static::fwrite(STDOUT, $field . (trim($field) !== '' ? ' ' : '') . $extraOutput . ': ');
259259

260260
// Read the input from keyboard.
261261
$input = trim(static::$io->input()) ?: (string) $default;
@@ -377,7 +377,7 @@ public static function promptByMultipleKeys(string $text, array $options): array
377377
*/
378378
private static function isZeroOptions(array $options): void
379379
{
380-
if (! $options) {
380+
if ($options === []) {
381381
throw new InvalidArgumentException('No options to select from were provided');
382382
}
383383
}

system/Commands/Database/MigrateStatus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function run(array $params)
145145
}
146146
}
147147

148-
if (! $status) {
148+
if ($status === []) {
149149
// @codeCoverageIgnoreStart
150150
CLI::error(lang('Migrations.noneFound'), 'light_gray', 'red');
151151
CLI::newLine();

system/Config/DotEnv.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function normaliseVariable(string $name, string $value = ''): array
142142
*/
143143
protected function sanitizeValue(string $value): string
144144
{
145-
if (! $value) {
145+
if ($value === '') {
146146
return $value;
147147
}
148148

system/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private function setValidator($rules, array $messages): void
170170
}
171171

172172
// If no error message is defined, use the error message in the Config\Validation file
173-
if (! $messages) {
173+
if ($messages === []) {
174174
$errorName = $rules . '_errors';
175175
$messages = $validation->{$errorName} ?? [];
176176
}

system/Database/BaseConnection.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,7 @@ public function getFieldData(string $table)
15761576
/**
15771577
* Returns an object with key data
15781578
*
1579-
* @return array
1579+
* @return array<string, stdClass>
15801580
*/
15811581
public function getIndexData(string $table)
15821582
{
@@ -1596,7 +1596,9 @@ public function getForeignKeyData(string $table)
15961596
/**
15971597
* Converts array of arrays generated by _foreignKeyData() to array of objects
15981598
*
1599-
* @return array[
1599+
* @return array<string, stdClass>
1600+
*
1601+
* array[
16001602
* {constraint_name} =>
16011603
* stdClass[
16021604
* 'constraint_name' => string,
@@ -1753,13 +1755,17 @@ abstract protected function _fieldData(string $table): array;
17531755
* Platform-specific index data.
17541756
*
17551757
* @see getIndexData()
1758+
*
1759+
* @return array<string, stdClass>
17561760
*/
17571761
abstract protected function _indexData(string $table): array;
17581762

17591763
/**
17601764
* Platform-specific foreign keys data.
17611765
*
17621766
* @see getForeignKeyData()
1767+
*
1768+
* @return array<string, stdClass>
17631769
*/
17641770
abstract protected function _foreignKeyData(string $table): array;
17651771

0 commit comments

Comments
 (0)