Skip to content

Commit 8020475

Browse files
committed
Release v4.5.8
1 parent f253839 commit 8020475

File tree

154 files changed

+632
-544
lines changed

Some content is hidden

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

154 files changed

+632
-544
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22

33
Copyright (c) 2014-2019 British Columbia Institute of Technology
4-
Copyright (c) 2019-2024 CodeIgniter Foundation
4+
Copyright (c) 2019-present CodeIgniter Foundation
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

preload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function load(): void
8686
$phpFiles = new RegexIterator(
8787
$fullTree,
8888
'/.+((?<!Test)+\.php$)/i',
89-
RecursiveRegexIterator::GET_MATCH
89+
RecursiveRegexIterator::GET_MATCH,
9090
);
9191

9292
foreach ($phpFiles as $key => $file) {

public/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$message = sprintf(
1212
'Your PHP version must be %s or higher to run CodeIgniter. Current version: %s',
1313
$minPhpVersion,
14-
PHP_VERSION
14+
PHP_VERSION,
1515
);
1616

1717
header('HTTP/1.1 503 Service Unavailable.', true, 503);

spark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if (version_compare(PHP_VERSION, $minPhpVersion, '<')) {
4040
$message = sprintf(
4141
'Your PHP version must be %s or higher to run CodeIgniter. Current version: %s',
4242
$minPhpVersion,
43-
PHP_VERSION
43+
PHP_VERSION,
4444
);
4545

4646
exit($message);

system/API/ResponseTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ protected function format($data = null)
319319
$mime = $this->request->negotiate(
320320
'media',
321321
$format->getConfig()->supportedResponseFormats,
322-
false
322+
false,
323323
);
324324
}
325325

system/Autoloader/Autoloader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public function sanitizeFilename(string $filename): string
347347

348348
throw new InvalidArgumentException(
349349
'The file path contains special characters "' . $chars
350-
. '" that are not allowed: "' . $filename . '"'
350+
. '" that are not allowed: "' . $filename . '"',
351351
);
352352
}
353353
if ($result === false) {
@@ -386,7 +386,7 @@ private function loadComposerNamespaces(ClassLoader $composer, array $composerPa
386386
throw new RuntimeException(
387387
'Your Composer version is too old.'
388388
. ' Please update Composer (run `composer self-update`) to v2.0.14 or later'
389-
. ' and remove your vendor/ directory, and run `composer update`.'
389+
. ' and remove your vendor/ directory, and run `composer update`.',
390390
);
391391
}
392392
// This method requires Composer 2.0.14 or later.

system/Autoloader/FileLocator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@ public function findQualifiedNameFromPath(string $path)
295295
str_replace(
296296
'/',
297297
'\\',
298-
mb_substr($path, mb_strlen($namespace['path']))
298+
mb_substr($path, mb_strlen($namespace['path'])),
299299
),
300-
'\\'
300+
'\\',
301301
);
302302
// Remove the file extension (.php)
303303
$className = mb_substr($className, 0, -4);

system/BaseModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ protected function createDataConverter(): void
379379
$this->converter = new DataConverter(
380380
$this->casts,
381381
$this->castHandlers,
382-
$this->db
382+
$this->db,
383383
);
384384
}
385385
}
@@ -1081,7 +1081,7 @@ public function updateBatch(?array $set = null, ?string $index = null, int $batc
10811081
if ($updateIndex === null) {
10821082
throw new InvalidArgumentException(
10831083
'The index ("' . $index . '") for updateBatch() is missing in the data: '
1084-
. json_encode($row)
1084+
. json_encode($row),
10851085
);
10861086
}
10871087

system/Boot.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ protected static function checkMissingExtensions(): void
288288

289289
$message = sprintf(
290290
'The framework needs the following extension(s) installed and loaded: %s.',
291-
implode(', ', $missingExtensions)
291+
implode(', ', $missingExtensions),
292292
);
293293

294294
header('HTTP/1.1 503 Service Unavailable.', true, 503);

system/CLI/CLI.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public static function promptByKey($text, array $options, $validation = null): s
289289

290290
CLI::isZeroOptions($options);
291291

292-
if ($line = array_shift($text)) {
292+
if (($line = array_shift($text)) !== null) {
293293
CLI::write($line);
294294
}
295295

@@ -348,7 +348,7 @@ public static function promptByMultipleKeys(string $text, array $options): array
348348
// return the prompt again if $input contain(s) non-numeric character, except a comma.
349349
// And if max from $options less than max from input,
350350
// it means user tried to access null value in $options
351-
if ($pattern === 0 || $maxOptions < $maxInput) {
351+
if ($pattern < 1 || $maxOptions < $maxInput) {
352352
static::error('Please select correctly.');
353353
CLI::newLine();
354354

@@ -610,11 +610,11 @@ public static function color(string $text, string $foreground, ?string $backgrou
610610
$nonColoredText = preg_replace(
611611
$pattern,
612612
'<<__colored_string__>>',
613-
$text
613+
$text,
614614
);
615615
$nonColoredChunks = preg_split(
616616
'/<<__colored_string__>>/u',
617-
$nonColoredText
617+
$nonColoredText,
618618
);
619619

620620
foreach ($nonColoredChunks as $i => $chunk) {

0 commit comments

Comments
 (0)