Skip to content

Commit 84ff359

Browse files
committed
Release v4.4.8
1 parent e6a2f70 commit 84ff359

33 files changed

+125
-121
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>

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

system/BaseModel.php

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,14 @@ abstract class BaseModel
173173
protected $db;
174174

175175
/**
176-
* Rules used to validate data in insert, update, and save methods.
176+
* Rules used to validate data in insert(), update(), and save() methods.
177+
*
177178
* The array must match the format of data passed to the Validation
178179
* library.
179180
*
180-
* @var list<string>|string
181+
* @see https://codeigniter4.github.io/userguide/models/model.html#setting-validation-rules
182+
*
183+
* @var array<string, array<string, array<string, string>|string>|string>|string
181184
*/
182185
protected $validationRules = [];
183186

@@ -243,84 +246,84 @@ abstract class BaseModel
243246
/**
244247
* Callbacks for beforeInsert
245248
*
246-
* @var array
249+
* @var list<string>
247250
*/
248251
protected $beforeInsert = [];
249252

250253
/**
251254
* Callbacks for afterInsert
252255
*
253-
* @var array
256+
* @var list<string>
254257
*/
255258
protected $afterInsert = [];
256259

257260
/**
258261
* Callbacks for beforeUpdate
259262
*
260-
* @var array
263+
* @var list<string>
261264
*/
262265
protected $beforeUpdate = [];
263266

264267
/**
265268
* Callbacks for afterUpdate
266269
*
267-
* @var array
270+
* @var list<string>
268271
*/
269272
protected $afterUpdate = [];
270273

271274
/**
272275
* Callbacks for beforeInsertBatch
273276
*
274-
* @var array
277+
* @var list<string>
275278
*/
276279
protected $beforeInsertBatch = [];
277280

278281
/**
279282
* Callbacks for afterInsertBatch
280283
*
281-
* @var array
284+
* @var list<string>
282285
*/
283286
protected $afterInsertBatch = [];
284287

285288
/**
286289
* Callbacks for beforeUpdateBatch
287290
*
288-
* @var array
291+
* @var list<string>
289292
*/
290293
protected $beforeUpdateBatch = [];
291294

292295
/**
293296
* Callbacks for afterUpdateBatch
294297
*
295-
* @var array
298+
* @var list<string>
296299
*/
297300
protected $afterUpdateBatch = [];
298301

299302
/**
300303
* Callbacks for beforeFind
301304
*
302-
* @var array
305+
* @var list<string>
303306
*/
304307
protected $beforeFind = [];
305308

306309
/**
307310
* Callbacks for afterFind
308311
*
309-
* @var array
312+
* @var list<string>
310313
*/
311314
protected $afterFind = [];
312315

313316
/**
314317
* Callbacks for beforeDelete
315318
*
316-
* @var array
319+
* @var list<string>
317320
*/
318321
protected $beforeDelete = [];
319322

320323
/**
321324
* Callbacks for afterDelete
322325
*
323-
* @var array
326+
* @var list<string>
324327
*/
325328
protected $afterDelete = [];
326329

@@ -1448,7 +1451,7 @@ public function setValidationMessage(string $field, array $fieldMessages)
14481451
* Allows to set (and reset) validation rules.
14491452
* It could be used when you have to change default or override current validate rules.
14501453
*
1451-
* @param array $validationRules Value
1454+
* @param array<string, array<string, array<string, string>|string>|string> $validationRules Value
14521455
*
14531456
* @return $this
14541457
*/

system/CLI/CLI.php

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

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

267267
// Read the input from keyboard.
268268
$input = trim(static::input()) ?: $default;
@@ -386,7 +386,7 @@ public static function promptByMultipleKeys(string $text, array $options): array
386386
*/
387387
private static function isZeroOptions(array $options): void
388388
{
389-
if (! $options) {
389+
if ($options === []) {
390390
throw new InvalidArgumentException('No options to select from were provided');
391391
}
392392
}

system/CodeIgniter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class CodeIgniter
5454
/**
5555
* The current version of CodeIgniter Framework
5656
*/
57-
public const CI_VERSION = '4.4.7';
57+
public const CI_VERSION = '4.4.8';
5858

5959
/**
6060
* App startup time.

system/Commands/Database/MigrateStatus.php

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

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

system/Config/DotEnv.php

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

system/Controller.php

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

189189
// If no error message is defined, use the error message in the Config\Validation file
190-
if (! $messages) {
190+
if ($messages === []) {
191191
$errorName = $rules . '_errors';
192192
$messages = $validation->{$errorName} ?? [];
193193
}

system/Database/BaseBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ public function __construct($tableName, ConnectionInterface $db, ?array $options
333333
/**
334334
* Returns the current database connection
335335
*
336-
* @return BaseConnection|ConnectionInterface
336+
* @return BaseConnection
337337
*/
338338
public function db(): ConnectionInterface
339339
{

system/Database/BaseConnection.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ public function getFieldData(string $table)
15271527
/**
15281528
* Returns an object with key data
15291529
*
1530-
* @return array
1530+
* @return array<string, stdClass>
15311531
*/
15321532
public function getIndexData(string $table)
15331533
{
@@ -1547,7 +1547,9 @@ public function getForeignKeyData(string $table)
15471547
/**
15481548
* Converts array of arrays generated by _foreignKeyData() to array of objects
15491549
*
1550-
* @return array[
1550+
* @return array<string, stdClass>
1551+
*
1552+
* array[
15511553
* {constraint_name} =>
15521554
* stdClass[
15531555
* 'constraint_name' => string,
@@ -1704,13 +1706,17 @@ abstract protected function _fieldData(string $table): array;
17041706
* Platform-specific index data.
17051707
*
17061708
* @see getIndexData()
1709+
*
1710+
* @return array<string, stdClass>
17071711
*/
17081712
abstract protected function _indexData(string $table): array;
17091713

17101714
/**
17111715
* Platform-specific foreign keys data.
17121716
*
17131717
* @see getForeignKeyData()
1718+
*
1719+
* @return array<string, stdClass>
17141720
*/
17151721
abstract protected function _foreignKeyData(string $table): array;
17161722

0 commit comments

Comments
 (0)