chore: change rector and ecs configs + update devcontainer to php 8.2
This commit is contained in:
parent
f9a939471d
commit
0acc1363f0
|
@ -4,7 +4,7 @@
|
|||
# ⚠️ NOT optimized for production
|
||||
# should be used only for development purposes
|
||||
#---------------------------------------------------
|
||||
FROM php:8.1-fpm
|
||||
FROM php:8.2-fpm
|
||||
|
||||
LABEL maintainer="Yassine Doghri <yassine@doghri.fr>"
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ class App extends BaseConfig
|
|||
* DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
||||
*
|
||||
*/
|
||||
public string $permittedURIChars = 'a-z 0-9~%.:_\-';
|
||||
public string $permittedURIChars = 'a-z 0-9~%.:_\-@';
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
|
|
|
@ -62,7 +62,6 @@ class Autoload extends AutoloadConfig
|
|||
|
||||
/**
|
||||
* -------------------------------------------------------------------
|
||||
* Class Map
|
||||
* -------------------------------------------------------------------
|
||||
* The class map provides a map of class names and their exact
|
||||
* location on the drive. Classes loaded in this manner will have
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Config;
|
||||
|
||||
use CodeIgniter\Config\BaseConfig;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Config;
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,8 +37,8 @@ class Services extends BaseService
|
|||
return static::getSharedInstance('router', $routes, $request);
|
||||
}
|
||||
|
||||
$routes = $routes ?? static::routes();
|
||||
$request = $request ?? static::request();
|
||||
$routes ??= static::routes();
|
||||
$request ??= static::request();
|
||||
|
||||
return new Router($routes, $request);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ class Services extends BaseService
|
|||
return static::getSharedInstance('negotiator', $request);
|
||||
}
|
||||
|
||||
$request = $request ?? static::request();
|
||||
$request ??= static::request();
|
||||
|
||||
return new Negotiate($request);
|
||||
}
|
||||
|
|
|
@ -13,8 +13,6 @@ use Psr\Log\LoggerInterface;
|
|||
use ViewThemes\Theme;
|
||||
|
||||
/**
|
||||
* Class BaseController
|
||||
*
|
||||
* BaseController provides a convenient place for loading components and performing functions that are needed by all
|
||||
* your controllers. Extend this class in any new controllers: class Home extends BaseController
|
||||
*
|
||||
|
|
|
@ -106,9 +106,7 @@ class EpisodeController extends BaseController
|
|||
|
||||
// The page cache is set to a decade so it is deleted manually upon podcast update
|
||||
return view('episode/comments', $data, [
|
||||
'cache' => $secondsToNextUnpublishedEpisode
|
||||
? $secondsToNextUnpublishedEpisode
|
||||
: DECADE,
|
||||
'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
|
||||
'cache_name' => $cacheName,
|
||||
]);
|
||||
}
|
||||
|
@ -157,9 +155,7 @@ class EpisodeController extends BaseController
|
|||
|
||||
// The page cache is set to a decade so it is deleted manually upon podcast update
|
||||
return view('episode/activity', $data, [
|
||||
'cache' => $secondsToNextUnpublishedEpisode
|
||||
? $secondsToNextUnpublishedEpisode
|
||||
: DECADE,
|
||||
'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
|
||||
'cache_name' => $cacheName,
|
||||
]);
|
||||
}
|
||||
|
@ -218,9 +214,7 @@ class EpisodeController extends BaseController
|
|||
|
||||
// The page cache is set to a decade so it is deleted manually upon podcast update
|
||||
return view('episode/chapters', $data, [
|
||||
'cache' => $secondsToNextUnpublishedEpisode
|
||||
? $secondsToNextUnpublishedEpisode
|
||||
: DECADE,
|
||||
'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
|
||||
'cache_name' => $cacheName,
|
||||
]);
|
||||
}
|
||||
|
@ -284,9 +278,7 @@ class EpisodeController extends BaseController
|
|||
|
||||
// The page cache is set to a decade so it is deleted manually upon podcast update
|
||||
return view('episode/transcript', $data, [
|
||||
'cache' => $secondsToNextUnpublishedEpisode
|
||||
? $secondsToNextUnpublishedEpisode
|
||||
: DECADE,
|
||||
'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
|
||||
'cache_name' => $cacheName,
|
||||
]);
|
||||
}
|
||||
|
@ -339,9 +331,7 @@ class EpisodeController extends BaseController
|
|||
|
||||
// The page cache is set to a decade so it is deleted manually upon podcast update
|
||||
return view('embed', $data, [
|
||||
'cache' => $secondsToNextUnpublishedEpisode
|
||||
? $secondsToNextUnpublishedEpisode
|
||||
: DECADE,
|
||||
'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
|
||||
'cache_name' => $cacheName,
|
||||
]);
|
||||
}
|
||||
|
@ -420,11 +410,9 @@ class EpisodeController extends BaseController
|
|||
* get comments: aggregated replies from posts referring to the episode
|
||||
*/
|
||||
$episodeComments = model(PostModel::class)
|
||||
->whereIn('in_reply_to_id', function (BaseBuilder $builder): BaseBuilder {
|
||||
return $builder->select('id')
|
||||
->from('fediverse_posts')
|
||||
->where('episode_id', $this->episode->id);
|
||||
})
|
||||
->whereIn('in_reply_to_id', fn (BaseBuilder $builder): BaseBuilder => $builder->select('id')
|
||||
->from('fediverse_posts')
|
||||
->where('episode_id', $this->episode->id))
|
||||
->where('`published_at` <= UTC_TIMESTAMP()', null, false)
|
||||
->orderBy('published_at', 'ASC');
|
||||
|
||||
|
|
|
@ -79,13 +79,7 @@ class FeedController extends Controller
|
|||
);
|
||||
|
||||
cache()
|
||||
->save(
|
||||
$cacheName,
|
||||
$found,
|
||||
$secondsToNextUnpublishedEpisode
|
||||
? $secondsToNextUnpublishedEpisode
|
||||
: DECADE,
|
||||
);
|
||||
->save($cacheName, $found, $secondsToNextUnpublishedEpisode ?: DECADE);
|
||||
}
|
||||
|
||||
return $this->response->setXML($found);
|
||||
|
|
|
@ -96,9 +96,7 @@ class PodcastController extends BaseController
|
|||
);
|
||||
|
||||
return view('podcast/activity', $data, [
|
||||
'cache' => $secondsToNextUnpublishedEpisode
|
||||
? $secondsToNextUnpublishedEpisode
|
||||
: DECADE,
|
||||
'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
|
||||
'cache_name' => $cacheName,
|
||||
]);
|
||||
}
|
||||
|
@ -148,9 +146,7 @@ class PodcastController extends BaseController
|
|||
);
|
||||
|
||||
return view('podcast/about', $data, [
|
||||
'cache' => $secondsToNextUnpublishedEpisode
|
||||
? $secondsToNextUnpublishedEpisode
|
||||
: DECADE,
|
||||
'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
|
||||
'cache_name' => $cacheName,
|
||||
]);
|
||||
}
|
||||
|
@ -270,9 +266,7 @@ class PodcastController extends BaseController
|
|||
$this->podcast->id,
|
||||
);
|
||||
return view('podcast/episodes', $data, [
|
||||
'cache' => $secondsToNextUnpublishedEpisode
|
||||
? $secondsToNextUnpublishedEpisode
|
||||
: DECADE,
|
||||
'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
|
||||
'cache_name' => $cacheName,
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
|
|
@ -77,34 +77,32 @@ class FakePodcastsAnalyticsSeeder extends Seeder
|
|||
|
||||
for (
|
||||
$lineNumber = 0;
|
||||
$lineNumber < rand(1, (int) $probability1);
|
||||
$lineNumber < random_int(1, (int) $probability1);
|
||||
++$lineNumber
|
||||
) {
|
||||
$probability2 = floor(exp(6 - $age / 20)) + 10;
|
||||
|
||||
$player =
|
||||
$jsonUserAgents[
|
||||
rand(1, count($jsonUserAgents) - 1)
|
||||
random_int(1, count($jsonUserAgents) - 1)
|
||||
];
|
||||
$service =
|
||||
$jsonRSSUserAgents[
|
||||
rand(1, count($jsonRSSUserAgents) - 1)
|
||||
random_int(1, count($jsonRSSUserAgents) - 1)
|
||||
]['slug'];
|
||||
$app = isset($player['app']) ? $player['app'] : '';
|
||||
$device = isset($player['device'])
|
||||
? $player['device']
|
||||
: '';
|
||||
$os = isset($player['os']) ? $player['os'] : '';
|
||||
$isBot = isset($player['bot']) ? $player['bot'] : 0;
|
||||
$app = $player['app'] ?? '';
|
||||
$device = $player['device'] ?? '';
|
||||
$os = $player['os'] ?? '';
|
||||
$isBot = $player['bot'] ?? 0;
|
||||
|
||||
$fakeIp =
|
||||
rand(0, 255) .
|
||||
random_int(0, 255) .
|
||||
'.' .
|
||||
rand(0, 255) .
|
||||
random_int(0, 255) .
|
||||
'.' .
|
||||
rand(0, 255) .
|
||||
random_int(0, 255) .
|
||||
'.' .
|
||||
rand(0, 255);
|
||||
random_int(0, 255);
|
||||
|
||||
$cityReader = new Reader(WRITEPATH . 'uploads/GeoLite2-City/GeoLite2-City.mmdb');
|
||||
|
||||
|
@ -115,9 +113,7 @@ class FakePodcastsAnalyticsSeeder extends Seeder
|
|||
try {
|
||||
$city = $cityReader->city($fakeIp);
|
||||
|
||||
$countryCode = $city->country->isoCode === null
|
||||
? 'N/A'
|
||||
: $city->country->isoCode;
|
||||
$countryCode = $city->country->isoCode ?? 'N/A';
|
||||
|
||||
$regionCode = $city->subdivisions === []
|
||||
? 'N/A'
|
||||
|
@ -128,20 +124,20 @@ class FakePodcastsAnalyticsSeeder extends Seeder
|
|||
//Bad luck, bad IP, nothing to do.
|
||||
}
|
||||
|
||||
$hits = rand(0, (int) $probability2);
|
||||
$hits = random_int(0, (int) $probability2);
|
||||
|
||||
$analyticsPodcasts[] = [
|
||||
'podcast_id' => $podcast->id,
|
||||
'date' => date('Y-m-d', $date),
|
||||
'duration' => rand(60, 3600),
|
||||
'bandwidth' => rand(1000000, 10000000),
|
||||
'duration' => random_int(60, 3600),
|
||||
'bandwidth' => random_int(1000000, 10000000),
|
||||
'hits' => $hits,
|
||||
'unique_listeners' => $hits,
|
||||
];
|
||||
$analyticsPodcastsByHour[] = [
|
||||
'podcast_id' => $podcast->id,
|
||||
'date' => date('Y-m-d', $date),
|
||||
'hour' => rand(0, 23),
|
||||
'hour' => random_int(0, 23),
|
||||
'hits' => $hits,
|
||||
];
|
||||
$analyticsPodcastsByCountry[] = [
|
||||
|
|
|
@ -216,23 +216,23 @@ class FakeWebsiteAnalyticsSeeder extends Seeder
|
|||
|
||||
for (
|
||||
$lineNumber = 0;
|
||||
$lineNumber < rand(1, $probability1);
|
||||
$lineNumber < random_int(1, $probability1);
|
||||
++$lineNumber
|
||||
) {
|
||||
$probability2 = (int) floor(exp(6 - $age / 20)) + 10;
|
||||
|
||||
$domain =
|
||||
$this->domains[rand(0, count($this->domains) - 1)];
|
||||
$this->domains[random_int(0, count($this->domains) - 1)];
|
||||
$keyword =
|
||||
$this->keywords[
|
||||
rand(0, count($this->keywords) - 1)
|
||||
random_int(0, count($this->keywords) - 1)
|
||||
];
|
||||
$browser =
|
||||
$this->browsers[
|
||||
rand(0, count($this->browsers) - 1)
|
||||
random_int(0, count($this->browsers) - 1)
|
||||
];
|
||||
|
||||
$hits = rand(0, $probability2);
|
||||
$hits = random_int(0, $probability2);
|
||||
|
||||
$websiteByBrowser[] = [
|
||||
'podcast_id' => $podcast->id,
|
||||
|
|
|
@ -483,7 +483,7 @@ class Episode extends Entity
|
|||
|
||||
public function setGuid(?string $guid = null): static
|
||||
{
|
||||
$this->attributes['guid'] = $guid === null ? $this->getLink() : $guid;
|
||||
$this->attributes['guid'] = $guid ?? $this->getLink();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
|
@ -42,24 +42,16 @@ if (! function_exists('write_audio_file_tags')) {
|
|||
|
||||
// populate data array
|
||||
$TagData = [
|
||||
'title' => [esc($episode->title)],
|
||||
'artist' => [
|
||||
$episode->podcast->publisher === null
|
||||
? esc($episode->podcast->owner_name)
|
||||
: $episode->podcast->publisher,
|
||||
],
|
||||
'title' => [esc($episode->title)],
|
||||
'artist' => [$episode->podcast->publisher ?? esc($episode->podcast->owner_name)],
|
||||
'album' => [esc($episode->podcast->title)],
|
||||
'year' => [$episode->published_at instanceof Time ? $episode->published_at->format('Y') : ''],
|
||||
'genre' => ['Podcast'],
|
||||
'comment' => [$episode->description],
|
||||
'track_number' => [(string) $episode->number],
|
||||
'copyright_message' => [$episode->podcast->copyright],
|
||||
'publisher' => [
|
||||
$episode->podcast->publisher === null
|
||||
? esc($episode->podcast->owner_name)
|
||||
: $episode->podcast->publisher,
|
||||
],
|
||||
'encoded_by' => ['Castopod'],
|
||||
'publisher' => [$episode->podcast->publisher ?? esc($episode->podcast->owner_name)],
|
||||
'encoded_by' => ['Castopod'],
|
||||
|
||||
// TODO: find a way to add the remaining tags for podcasts as the library doesn't seem to allow it
|
||||
// 'website' => [$podcast_url],
|
||||
|
|
|
@ -164,7 +164,7 @@ if (! function_exists('parse_size')) {
|
|||
$size = (float) preg_replace('~[^0-9\.]~', '', $size); // Remove the non-numeric characters from the size.
|
||||
if ($unit !== '') {
|
||||
// Find the position of the unit in the ordered string which is the power of magnitude to multiply a kilobyte by.
|
||||
return round($size * pow(1024, (float) stripos('bkmgtpezy', $unit[0])));
|
||||
return round($size * 1024 ** ((float) stripos('bkmgtpezy', $unit[0])));
|
||||
}
|
||||
|
||||
return round($size);
|
||||
|
@ -183,7 +183,7 @@ if (! function_exists('format_bytes')) {
|
|||
$pow = floor(($bytes ? log($bytes) : 0) / log($is_binary ? 1024 : 1000));
|
||||
$pow = min($pow, count($units) - 1);
|
||||
|
||||
$bytes /= pow($is_binary ? 1024 : 1000, $pow);
|
||||
$bytes /= ($is_binary ? 1024 : 1000) ** $pow;
|
||||
|
||||
return round($bytes, $precision) . $units[$pow];
|
||||
}
|
||||
|
|
|
@ -260,12 +260,7 @@ if (! function_exists('get_rss_feed')) {
|
|||
$itunesNamespace,
|
||||
);
|
||||
|
||||
$channel->addChild(
|
||||
'author',
|
||||
$podcast->publisher ? $podcast->publisher : $podcast->owner_name,
|
||||
$itunesNamespace,
|
||||
false
|
||||
);
|
||||
$channel->addChild('author', $podcast->publisher ?: $podcast->owner_name, $itunesNamespace, false);
|
||||
$channel->addChild('link', $podcast->link);
|
||||
|
||||
$owner = $channel->addChild('owner', null, $itunesNamespace);
|
||||
|
@ -354,7 +349,7 @@ if (! function_exists('get_rss_feed')) {
|
|||
$item->addChild('episodeType', $episode->type, $itunesNamespace);
|
||||
|
||||
// If episode is of type trailer, add podcast:trailer tag on channel level
|
||||
if ($episode->type == 'trailer') {
|
||||
if ($episode->type === 'trailer') {
|
||||
$trailer = $channel->addChild('trailer', $episode->title, $podcastNamespace);
|
||||
$trailer->addAttribute('pubdate', $episode->published_at->format(DATE_RFC2822));
|
||||
$trailer->addAttribute(
|
||||
|
|
|
@ -48,7 +48,7 @@ class Router extends CodeIgniterRouter
|
|||
$matchedKey = $routeKey;
|
||||
|
||||
// Are we dealing with a locale?
|
||||
if (strpos($routeKey, '{locale}') !== false) {
|
||||
if (str_contains($routeKey, '{locale}')) {
|
||||
$routeKey = str_replace('{locale}', '[^/]+', $routeKey);
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ class Router extends CodeIgniterRouter
|
|||
|
||||
// Store our locale so CodeIgniter object can
|
||||
// assign it to the Request.
|
||||
if (strpos($matchedKey, '{locale}') !== false) {
|
||||
if (str_contains($matchedKey, '{locale}')) {
|
||||
preg_match(
|
||||
'#^' . str_replace('{locale}', '(?<locale>[^/]+)', $matchedKey) . '$#u',
|
||||
$uri,
|
||||
|
@ -183,13 +183,13 @@ class Router extends CodeIgniterRouter
|
|||
[$controller] = explode('::', (string) $handler);
|
||||
|
||||
// Checks `/` in controller name
|
||||
if (strpos($controller, '/') !== false) {
|
||||
if (str_contains($controller, '/')) {
|
||||
throw RouterException::forInvalidControllerName($handler);
|
||||
}
|
||||
|
||||
if (strpos((string) $handler, '$') !== false && strpos($routeKey, '(') !== false) {
|
||||
if (str_contains((string) $handler, '$') && str_contains($routeKey, '(')) {
|
||||
// Checks dynamic controller
|
||||
if (strpos($controller, '$') !== false) {
|
||||
if (str_contains($controller, '$')) {
|
||||
throw RouterException::forDynamicController($handler);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,6 @@ namespace ViewComponents;
|
|||
use CodeIgniter\View\ViewDecoratorInterface;
|
||||
|
||||
/**
|
||||
* Class Decorator
|
||||
*
|
||||
* Enables rendering of View Components into the views.
|
||||
*
|
||||
* Borrowed and adapted from https://github.com/lonnieezell/Bonfire2/
|
||||
|
|
|
@ -19,7 +19,7 @@ class Theme
|
|||
protected static $defaultTheme = 'app';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @var ?string
|
||||
*/
|
||||
protected static $currentTheme;
|
||||
|
||||
|
@ -71,9 +71,7 @@ class Theme
|
|||
*/
|
||||
public static function current(): string
|
||||
{
|
||||
return static::$currentTheme !== null
|
||||
? static::$currentTheme
|
||||
: static::$defaultTheme;
|
||||
return static::$currentTheme ?? static::$defaultTheme;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -272,13 +272,7 @@ class EpisodeModel extends UuidModel
|
|||
$secondsToNextUnpublishedEpisode = $this->getSecondsToNextUnpublishedEpisode($podcastId);
|
||||
|
||||
cache()
|
||||
->save(
|
||||
$cacheName,
|
||||
$found,
|
||||
$secondsToNextUnpublishedEpisode
|
||||
? $secondsToNextUnpublishedEpisode
|
||||
: DECADE,
|
||||
);
|
||||
->save($cacheName, $found, $secondsToNextUnpublishedEpisode ?: DECADE);
|
||||
}
|
||||
|
||||
return $found;
|
||||
|
|
|
@ -259,13 +259,7 @@ class PodcastModel extends Model
|
|||
$secondsToNextUnpublishedEpisode = $episodeModel->getSecondsToNextUnpublishedEpisode($podcastId);
|
||||
|
||||
cache()
|
||||
->save(
|
||||
$cacheName,
|
||||
$found,
|
||||
$secondsToNextUnpublishedEpisode
|
||||
? $secondsToNextUnpublishedEpisode
|
||||
: DECADE,
|
||||
);
|
||||
->save($cacheName, $found, $secondsToNextUnpublishedEpisode ?: DECADE);
|
||||
}
|
||||
|
||||
return $found;
|
||||
|
@ -295,13 +289,7 @@ class PodcastModel extends Model
|
|||
$secondsToNextUnpublishedEpisode = $episodeModel->getSecondsToNextUnpublishedEpisode($podcastId);
|
||||
|
||||
cache()
|
||||
->save(
|
||||
$cacheName,
|
||||
$found,
|
||||
$secondsToNextUnpublishedEpisode
|
||||
? $secondsToNextUnpublishedEpisode
|
||||
: DECADE,
|
||||
);
|
||||
->save($cacheName, $found, $secondsToNextUnpublishedEpisode ?: DECADE);
|
||||
}
|
||||
|
||||
return $found;
|
||||
|
@ -335,11 +323,7 @@ class PodcastModel extends Model
|
|||
$secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode($podcastId);
|
||||
|
||||
cache()
|
||||
->save(
|
||||
$cacheName,
|
||||
$defaultQuery,
|
||||
$secondsToNextUnpublishedEpisode ? $secondsToNextUnpublishedEpisode : DECADE
|
||||
);
|
||||
->save($cacheName, $defaultQuery, $secondsToNextUnpublishedEpisode ?: DECADE);
|
||||
}
|
||||
|
||||
return $defaultQuery;
|
||||
|
|
|
@ -42,7 +42,7 @@ class Alert extends Component
|
|||
$this->variant = 'default';
|
||||
}
|
||||
|
||||
$glyph = icon(($this->glyph === null ? $variants[$this->variant]['glyph'] : $this->glyph), 'flex-shrink-0 mr-2 text-lg');
|
||||
$glyph = icon(($this->glyph ?? $variants[$this->variant]['glyph']), 'flex-shrink-0 mr-2 text-lg');
|
||||
$title = $this->title === null ? '' : '<div class="font-semibold">' . $this->title . '</div>';
|
||||
$class = 'inline-flex w-full p-2 text-sm border rounded ' . $variants[$this->variant]['class'] . ' ' . $this->class;
|
||||
|
||||
|
|
2
builds
2
builds
|
@ -1,6 +1,8 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
define('LATEST_RELEASE', '^4.0');
|
||||
define('GITHUB_URL', 'https://github.com/codeigniter4/codeigniter4');
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
"phpstan/phpstan": "^1.10.67",
|
||||
"phpunit/phpunit": "^10.5.20",
|
||||
"rector/rector": "^1.0.4",
|
||||
"symplify/coding-standard": "^12.0.7",
|
||||
"symplify/easy-coding-standard": "^12.0.13"
|
||||
"symplify/coding-standard": "^12.1.4",
|
||||
"symplify/easy-coding-standard": "^12.1.14"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
30
ecs.php
30
ecs.php
|
@ -10,26 +10,20 @@ use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer;
|
|||
use Symplify\CodingStandard\Fixer\Naming\StandardizeHereNowDocKeywordFixer;
|
||||
use Symplify\CodingStandard\Fixer\Spacing\MethodChainingNewlineFixer;
|
||||
use Symplify\EasyCodingStandard\Config\ECSConfig;
|
||||
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
|
||||
|
||||
return static function (ECSConfig $ecsConfig): void {
|
||||
// alternative to CLI arguments, easier to maintain and extend
|
||||
$ecsConfig->paths([
|
||||
return ECSConfig::configure()
|
||||
->withPaths([
|
||||
__DIR__ . '/app',
|
||||
__DIR__ . '/modules',
|
||||
__DIR__ . '/themes',
|
||||
__DIR__ . '/tests',
|
||||
__DIR__ . '/public',
|
||||
__DIR__ . '/builds',
|
||||
__DIR__ . '/ecs.php',
|
||||
__DIR__ . '/preload.php',
|
||||
__DIR__ . '/rector.php',
|
||||
__DIR__ . '/spark',
|
||||
]);
|
||||
|
||||
$ecsConfig->sets([SetList::CLEAN_CODE, SetList::COMMON, SetList::SYMPLIFY, SetList::PSR_12]);
|
||||
|
||||
$ecsConfig->skip([
|
||||
])
|
||||
->withRootFiles()
|
||||
->withPreparedSets(cleanCode: true, common: true, symplify: true, strict: true, psr12: true)
|
||||
->withSkip([
|
||||
// skip specific generated files
|
||||
__DIR__ . '/modules/Admin/Language/*/PersonsTaxonomy.php',
|
||||
|
||||
|
@ -40,11 +34,7 @@ return static function (ECSConfig $ecsConfig): void {
|
|||
__DIR__ . '/app/Helpers/components_helper.php',
|
||||
],
|
||||
|
||||
LineLengthFixer::class => [
|
||||
__DIR__ . '/app/Views/*',
|
||||
__DIR__ . '/modules/**/Views/*',
|
||||
__DIR__ . '/themes/*',
|
||||
],
|
||||
LineLengthFixer::class => [__DIR__ . '/app/Views/*', __DIR__ . '/modules/**/Views/*', __DIR__ . '/themes/*'],
|
||||
|
||||
IndentationTypeFixer::class => [
|
||||
__DIR__ . '/app/Views/*',
|
||||
|
@ -65,11 +55,9 @@ return static function (ECSConfig $ecsConfig): void {
|
|||
BinaryOperatorSpacesFixer::class => [__DIR__ . '/app/Language/*', __DIR__ . '/modules/**/Language/*'],
|
||||
|
||||
AssignmentInConditionSniff::class,
|
||||
]);
|
||||
|
||||
$ecsConfig->ruleWithConfiguration(BinaryOperatorSpacesFixer::class, [
|
||||
])
|
||||
->withConfiguredRule(BinaryOperatorSpacesFixer::class, [
|
||||
'operators' => [
|
||||
'=>' => 'align_single_space_minimal',
|
||||
],
|
||||
]);
|
||||
};
|
||||
|
|
|
@ -12,8 +12,6 @@ use Psr\Log\LoggerInterface;
|
|||
use ViewThemes\Theme;
|
||||
|
||||
/**
|
||||
* Class BaseController
|
||||
*
|
||||
* BaseController provides a convenient place for loading components and performing functions that are needed by all
|
||||
* your controllers. Extend this class in any new controllers: class Home extends BaseController
|
||||
*
|
||||
|
|
|
@ -326,12 +326,8 @@ class EpisodeController extends BaseController
|
|||
$this->request->getPost('parental_advisory') !== 'undefined'
|
||||
? $this->request->getPost('parental_advisory')
|
||||
: null;
|
||||
$this->episode->number = $this->request->getPost('episode_number')
|
||||
? $this->request->getPost('episode_number')
|
||||
: null;
|
||||
$this->episode->season_number = $this->request->getPost('season_number')
|
||||
? $this->request->getPost('season_number')
|
||||
: null;
|
||||
$this->episode->number = $this->request->getPost('episode_number') ?: null;
|
||||
$this->episode->season_number = $this->request->getPost('season_number') ?: null;
|
||||
$this->episode->type = $this->request->getPost('type');
|
||||
$this->episode->is_blocked = $this->request->getPost('block') === 'yes';
|
||||
$this->episode->custom_rss_string = $this->request->getPost('custom_rss');
|
||||
|
|
|
@ -17,7 +17,7 @@ use CodeIgniter\HTTP\RedirectResponse;
|
|||
|
||||
class PageController extends BaseController
|
||||
{
|
||||
protected ?Page $page;
|
||||
protected ?Page $page = null;
|
||||
|
||||
public function _remap(string $method, string ...$params): mixed
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@ use Modules\Media\Models\MediaModel;
|
|||
|
||||
class PersonController extends BaseController
|
||||
{
|
||||
protected ?Person $person;
|
||||
protected ?Person $person = null;
|
||||
|
||||
public function _remap(string $method, string ...$params): mixed
|
||||
{
|
||||
|
|
|
@ -30,9 +30,7 @@ trait AnalyticsTrait
|
|||
|
||||
$referer = $session->get('referer');
|
||||
$domain =
|
||||
parse_url((string) $referer, PHP_URL_HOST) === null
|
||||
? '- Direct -'
|
||||
: parse_url((string) $referer, PHP_URL_HOST);
|
||||
parse_url((string) $referer, PHP_URL_HOST) ?? '- Direct -';
|
||||
parse_str((string) parse_url((string) $referer, PHP_URL_QUERY), $queries);
|
||||
$keywords = $queries['q'] ?? null;
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
use CodeIgniter\Router\RouteCollection;
|
||||
use Modules\Analytics\Config\Analytics;
|
||||
|
||||
/**
|
||||
|
|
|
@ -85,14 +85,10 @@ if (! function_exists('set_user_session_location')) {
|
|||
$city = $cityReader->city(client_ip());
|
||||
|
||||
$location = [
|
||||
'countryCode' => $city->country->isoCode === null
|
||||
? 'N/A'
|
||||
: $city->country->isoCode,
|
||||
'regionCode' => $city->subdivisions[0]->isoCode === null
|
||||
? 'N/A'
|
||||
: $city->subdivisions[0]->isoCode,
|
||||
'latitude' => round($city->location->latitude, 3),
|
||||
'longitude' => round($city->location->longitude, 3),
|
||||
'countryCode' => $city->country->isoCode ?? 'N/A',
|
||||
'regionCode' => $city->subdivisions[0]->isoCode ?? 'N/A',
|
||||
'latitude' => round($city->location->latitude, 3),
|
||||
'longitude' => round($city->location->longitude, 3),
|
||||
];
|
||||
// If things go wrong the show must go on and the user must be able to download the file
|
||||
} catch (Exception) {
|
||||
|
@ -179,9 +175,7 @@ if (! function_exists('set_user_session_referer')) {
|
|||
{
|
||||
$session = Services::session();
|
||||
|
||||
$newreferer = isset($_SERVER['HTTP_REFERER'])
|
||||
? $_SERVER['HTTP_REFERER']
|
||||
: '- Direct -';
|
||||
$newreferer = $_SERVER['HTTP_REFERER'] ?? '- Direct -';
|
||||
$newreferer =
|
||||
parse_url((string) $newreferer, PHP_URL_HOST) ===
|
||||
parse_url(current_url(false), PHP_URL_HOST)
|
||||
|
@ -250,9 +244,7 @@ if (! function_exists('podcast_hit')) {
|
|||
}
|
||||
|
||||
//We get the HTTP header field `Range`:
|
||||
$httpRange = isset($_SERVER['HTTP_RANGE'])
|
||||
? $_SERVER['HTTP_RANGE']
|
||||
: null;
|
||||
$httpRange = $_SERVER['HTTP_RANGE'] ?? null;
|
||||
|
||||
$salt = config(Analytics::class)
|
||||
->salt;
|
||||
|
|
|
@ -65,7 +65,7 @@ class EpisodeController extends Controller
|
|||
return $this->failNotFound('Episode not found');
|
||||
}
|
||||
|
||||
return $this->respond($this->mapEpisode($episode));
|
||||
return $this->respond(static::mapEpisode($episode));
|
||||
}
|
||||
|
||||
protected static function mapEpisode(Episode $episode): Episode
|
||||
|
|
|
@ -36,7 +36,7 @@ class ApiFilter implements FilterInterface
|
|||
}
|
||||
|
||||
$authHeader = $request->getHeaderLine('Authorization');
|
||||
if (substr($authHeader, 0, 6) !== 'Basic ') {
|
||||
if (! str_starts_with($authHeader, 'Basic ')) {
|
||||
$response->setStatusCode(401);
|
||||
|
||||
return $response;
|
||||
|
@ -44,7 +44,7 @@ class ApiFilter implements FilterInterface
|
|||
|
||||
$auth_token = base64_decode(substr($authHeader, 6), true);
|
||||
|
||||
list($username, $password) = explode(':', (string) $auth_token);
|
||||
[$username, $password] = explode(':', (string) $auth_token);
|
||||
|
||||
if (! ($username === $restApiConfig->basicAuthUsername && $password === $restApiConfig->basicAuthPassword)) {
|
||||
$response->setStatusCode(401);
|
||||
|
|
|
@ -11,8 +11,6 @@ use Psr\Log\LoggerInterface;
|
|||
use ViewThemes\Theme;
|
||||
|
||||
/**
|
||||
* Class ActionController
|
||||
*
|
||||
* A generic controller to handle Authentication Actions.
|
||||
*/
|
||||
class ActionController extends ShieldActionController
|
||||
|
|
|
@ -22,7 +22,7 @@ class ContributorController extends BaseController
|
|||
{
|
||||
protected Podcast $podcast;
|
||||
|
||||
protected ?User $contributor;
|
||||
protected ?User $contributor = null;
|
||||
|
||||
public function _remap(string $method, string ...$params): mixed
|
||||
{
|
||||
|
|
|
@ -8,8 +8,6 @@ use CodeIgniter\Controller;
|
|||
use CodeIgniter\HTTP\RedirectResponse;
|
||||
|
||||
/**
|
||||
* Class ActionController
|
||||
*
|
||||
* A generic controller to handle Authentication Actions.
|
||||
*/
|
||||
class InteractController extends Controller
|
||||
|
|
|
@ -11,8 +11,6 @@ use Psr\Log\LoggerInterface;
|
|||
use ViewThemes\Theme;
|
||||
|
||||
/**
|
||||
* Class RegisterController
|
||||
*
|
||||
* Handles displaying registration form, and handling actual registration flow.
|
||||
*/
|
||||
class RegisterController extends ShieldRegisterController
|
||||
|
|
|
@ -22,7 +22,7 @@ use Modules\Auth\Models\UserModel;
|
|||
|
||||
class UserController extends BaseController
|
||||
{
|
||||
protected ?User $user;
|
||||
protected ?User $user = null;
|
||||
|
||||
public function _remap(string $method, string ...$params): mixed
|
||||
{
|
||||
|
|
|
@ -102,9 +102,10 @@ if (! function_exists('add_podcast_group')) {
|
|||
if (! function_exists('get_instance_group')) {
|
||||
function get_instance_group(User $user): ?string
|
||||
{
|
||||
$instanceGroups = array_filter($user->getGroups() ?? [], static function ($group): bool {
|
||||
return ! str_starts_with($group, 'podcast#');
|
||||
});
|
||||
$instanceGroups = array_filter(
|
||||
$user->getGroups() ?? [],
|
||||
static fn ($group): bool => ! str_starts_with((string) $group, 'podcast#')
|
||||
);
|
||||
|
||||
if ($instanceGroups === []) {
|
||||
return null;
|
||||
|
@ -138,9 +139,10 @@ if (! function_exists('set_instance_group')) {
|
|||
if (! function_exists('get_podcast_group')) {
|
||||
function get_podcast_group(User $user, int $podcastId, bool $removePrefix = true): ?string
|
||||
{
|
||||
$podcastGroups = array_filter($user->getGroups() ?? [], static function ($group) use ($podcastId): bool {
|
||||
return str_starts_with($group, "podcast#{$podcastId}-");
|
||||
});
|
||||
$podcastGroups = array_filter(
|
||||
$user->getGroups() ?? [],
|
||||
static fn ($group): bool => str_starts_with((string) $group, "podcast#{$podcastId}-")
|
||||
);
|
||||
|
||||
if ($podcastGroups === []) {
|
||||
return null;
|
||||
|
@ -180,9 +182,10 @@ if (! function_exists('get_podcast_groups')) {
|
|||
*/
|
||||
function get_user_podcast_ids(User $user): array
|
||||
{
|
||||
$podcastGroups = array_filter($user->getGroups() ?? [], static function ($group): bool {
|
||||
return str_starts_with($group, 'podcast#');
|
||||
});
|
||||
$podcastGroups = array_filter(
|
||||
$user->getGroups() ?? [],
|
||||
static fn ($group): bool => str_starts_with((string) $group, 'podcast#')
|
||||
);
|
||||
|
||||
$userPodcastIds = [];
|
||||
// extract all podcast ids from groups
|
||||
|
|
|
@ -42,9 +42,7 @@ abstract class AbstractObject
|
|||
}
|
||||
|
||||
// removes all NULL, FALSE and Empty Strings but leaves 0 (zero) values
|
||||
return array_filter($array, static function ($value): bool {
|
||||
return $value !== null && $value !== false && $value !== '';
|
||||
});
|
||||
return array_filter($array, static fn ($value): bool => $value !== null && $value !== false && $value !== '');
|
||||
}
|
||||
|
||||
public function toJSON(): string
|
||||
|
|
|
@ -175,12 +175,10 @@ if (! function_exists('create_preview_card_from_url')) {
|
|||
|
||||
// Check that, at least, the url and title are set
|
||||
$newPreviewCard = new PreviewCard([
|
||||
'url' => $mediaUrl,
|
||||
'title' => $media['title'] ?? '',
|
||||
'description' => $media['description'] ?? '',
|
||||
'type' => isset($typeMapping[$media['type']])
|
||||
? $typeMapping[$media['type']]
|
||||
: 'link',
|
||||
'url' => $mediaUrl,
|
||||
'title' => $media['title'] ?? '',
|
||||
'description' => $media['description'] ?? '',
|
||||
'type' => $typeMapping[$media['type']] ?? 'link',
|
||||
'author_name' => $media['author_name'] ?? null,
|
||||
'author_url' => $media['author_url'] ?? null,
|
||||
'provider_name' => $media['provider_name'] ?? '',
|
||||
|
|
|
@ -134,7 +134,7 @@ class PostModel extends UuidModel
|
|||
$secondsToNextUnpublishedPost = $this->getSecondsToNextUnpublishedPosts($actorId);
|
||||
|
||||
cache()
|
||||
->save($cacheName, $found, $secondsToNextUnpublishedPost ? $secondsToNextUnpublishedPost : DECADE);
|
||||
->save($cacheName, $found, $secondsToNextUnpublishedPost ?: DECADE);
|
||||
}
|
||||
|
||||
return $found;
|
||||
|
|
|
@ -160,9 +160,7 @@ class InstallController extends Controller
|
|||
|
||||
if (! $this->validate($rules)) {
|
||||
return redirect()
|
||||
->to(
|
||||
(host_url() === null ? config(App::class) ->baseURL : host_url()) . config(Install::class)->gateway
|
||||
)
|
||||
->to((host_url() ?? config(App::class) ->baseURL) . config(Install::class)->gateway)
|
||||
->withInput()
|
||||
->with('errors', $this->validator->getErrors());
|
||||
}
|
||||
|
|
|
@ -85,16 +85,12 @@ class Transcript extends BaseMedia
|
|||
}
|
||||
|
||||
$transcript_format = $this->file->getExtension();
|
||||
switch ($transcript_format) {
|
||||
case 'vtt':
|
||||
$transcriptJson = $transcriptParser->loadString($transcriptContent)
|
||||
->parseVtt();
|
||||
break;
|
||||
case 'srt':
|
||||
default:
|
||||
$transcriptJson = $transcriptParser->loadString($transcriptContent)
|
||||
->parseSrt();
|
||||
}
|
||||
$transcriptJson = match ($transcript_format) {
|
||||
'vtt' => $transcriptParser->loadString($transcriptContent)
|
||||
->parseVtt(),
|
||||
default => $transcriptParser->loadString($transcriptContent)
|
||||
->parseSrt(),
|
||||
};
|
||||
|
||||
$tempFilePath = WRITEPATH . 'uploads/' . $this->file->getRandomName();
|
||||
file_put_contents($tempFilePath, $transcriptJson);
|
||||
|
|
|
@ -543,9 +543,9 @@ class VideoClipper
|
|||
|
||||
# find unique color
|
||||
do {
|
||||
$r = rand(0, 255);
|
||||
$g = rand(0, 255);
|
||||
$b = rand(0, 255);
|
||||
$r = random_int(0, 255);
|
||||
$g = random_int(0, 255);
|
||||
$b = random_int(0, 255);
|
||||
} while (imagecolorexact($src, $r, $g, $b) < 0);
|
||||
|
||||
$ns = $s * $q;
|
||||
|
|
|
@ -66,7 +66,7 @@ class PlatformModel extends Model
|
|||
}
|
||||
|
||||
foreach ($platformsData as $slug => $platform) {
|
||||
if (! in_array($slug, $knownSlugs)) {
|
||||
if (! in_array($slug, $knownSlugs, true)) {
|
||||
$found[] = new Platform([
|
||||
'podcast_id' => $podcastId,
|
||||
'slug' => $slug,
|
||||
|
|
|
@ -52,9 +52,9 @@ class PodcastImport extends BaseCommand
|
|||
|
||||
$importQueue = get_import_tasks();
|
||||
|
||||
$currentImport = current(array_filter($importQueue, static function ($task): bool {
|
||||
return $task->status === TaskStatus::Running;
|
||||
}));
|
||||
$currentImport = current(
|
||||
array_filter($importQueue, static fn ($task): bool => $task->status === TaskStatus::Running)
|
||||
);
|
||||
|
||||
if ($currentImport instanceof PodcastImportTask) {
|
||||
$currentImport->syncWithProcess();
|
||||
|
@ -68,9 +68,7 @@ class PodcastImport extends BaseCommand
|
|||
}
|
||||
|
||||
// Get the next queued import
|
||||
$queuedImports = array_filter($importQueue, static function ($task): bool {
|
||||
return $task->status === TaskStatus::Queued;
|
||||
});
|
||||
$queuedImports = array_filter($importQueue, static fn ($task): bool => $task->status === TaskStatus::Queued);
|
||||
$nextImport = end($queuedImports);
|
||||
|
||||
if (! $nextImport instanceof PodcastImportTask) {
|
||||
|
@ -527,9 +525,7 @@ class PodcastImport extends BaseCommand
|
|||
->get()
|
||||
->getResultArray();
|
||||
|
||||
return array_map(static function (array $element) {
|
||||
return $element['guid'];
|
||||
}, $result);
|
||||
return array_map(static fn (array $element) => $element['guid'], $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,11 +26,10 @@ if (! function_exists('get_import_tasks')) {
|
|||
}
|
||||
|
||||
if ($podcastHandle !== null) {
|
||||
$podcastImportsQueue = array_filter($podcastImportsQueue, static function ($importTask) use (
|
||||
$podcastHandle
|
||||
): bool {
|
||||
return $importTask->handle === $podcastHandle;
|
||||
});
|
||||
$podcastImportsQueue = array_filter(
|
||||
$podcastImportsQueue,
|
||||
static fn ($importTask): bool => $importTask->handle === $podcastHandle
|
||||
);
|
||||
}
|
||||
|
||||
usort($podcastImportsQueue, static function (PodcastImportTask $a, PodcastImportTask $b): int {
|
||||
|
|
47
rector.php
47
rector.php
|
@ -2,6 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Rector\CodeQuality\Rector\ClassMethod\ExplicitReturnNullRector;
|
||||
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
|
||||
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
|
||||
use Rector\CodingStyle\Rector\String_\SymplifyQuoteEscapeRector;
|
||||
|
@ -12,31 +13,22 @@ use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector;
|
|||
use Rector\EarlyReturn\Rector\If_\ChangeOrIfContinueToMultiContinueRector;
|
||||
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
|
||||
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
use Rector\ValueObject\PhpVersion;
|
||||
|
||||
return static function (RectorConfig $rectorConfig): void {
|
||||
$rectorConfig->paths([__DIR__ . '/app', __DIR__ . '/modules', __DIR__ . '/tests', __DIR__ . '/public']);
|
||||
|
||||
// do you need to include constants, class aliases or custom autoloader? files listed will be executed
|
||||
$rectorConfig->bootstrapFiles([__DIR__ . '/vendor/codeigniter4/framework/system/Test/bootstrap.php']);
|
||||
|
||||
// Define what rule sets will be applied
|
||||
$rectorConfig->sets([
|
||||
SetList::PHP_81,
|
||||
SetList::TYPE_DECLARATION,
|
||||
SetList::CODE_QUALITY,
|
||||
SetList::CODING_STYLE,
|
||||
SetList::EARLY_RETURN,
|
||||
SetList::DEAD_CODE,
|
||||
]);
|
||||
|
||||
// auto import fully qualified class names
|
||||
$rectorConfig->importNames();
|
||||
|
||||
$rectorConfig->phpVersion(PhpVersion::PHP_81);
|
||||
|
||||
$rectorConfig->skip([
|
||||
return RectorConfig::configure()
|
||||
->withPaths([__DIR__ . '/app', __DIR__ . '/modules', __DIR__ . '/tests', __DIR__ . '/public'])
|
||||
->withBootstrapFiles([__DIR__ . '/vendor/codeigniter4/framework/system/Test/bootstrap.php'])
|
||||
->withPhpVersion(PhpVersion::PHP_81)
|
||||
->withPhpSets(php81: true)
|
||||
->withPreparedSets(
|
||||
typeDeclarations: true,
|
||||
codeQuality: true,
|
||||
codingStyle: true,
|
||||
earlyReturn: true,
|
||||
deadCode: true,
|
||||
)
|
||||
->withImportNames(true, true, true, true)
|
||||
->withSkip([
|
||||
// .mp3 files were somehow processed by rector, so skip all media files
|
||||
__DIR__ . '/public/media/*',
|
||||
|
||||
|
@ -50,6 +42,7 @@ return static function (RectorConfig $rectorConfig): void {
|
|||
EncapsedStringsToSprintfRector::class,
|
||||
RemoveExtraParametersRector::class,
|
||||
UnwrapFutureCompatibleIfPhpVersionRector::class,
|
||||
ExplicitReturnNullRector::class,
|
||||
|
||||
// skip rule in specific directory
|
||||
StringClassNameToClassConstantRector::class => [
|
||||
|
@ -65,9 +58,5 @@ return static function (RectorConfig $rectorConfig): void {
|
|||
],
|
||||
|
||||
ChangeAndIfToEarlyReturnRector::class => [__DIR__ . '/modules/Install/Controllers/InstallController.php'],
|
||||
]);
|
||||
|
||||
// Path to phpstan with extensions, that PHPStan in Rector uses to determine types
|
||||
$rectorConfig->phpstanConfig(__DIR__ . '/phpstan.neon');
|
||||
$rectorConfig->phpstanConfigs(['vendor/codeigniter/phpstan-codeigniter/extension.neon']);
|
||||
};
|
||||
])
|
||||
->withPHPStanConfigs([__DIR__ . '/phpstan.neon', 'vendor/codeigniter/phpstan-codeigniter/extension.neon']);
|
||||
|
|
2
spark
2
spark
|
@ -1,6 +1,8 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of CodeIgniter 4 framework.
|
||||
*
|
||||
|
|
|
@ -36,8 +36,6 @@ namespace Tests\Support\Libraries;
|
|||
use Config\App;
|
||||
|
||||
/**
|
||||
* Class ConfigReader
|
||||
*
|
||||
* An extension of BaseConfig that prevents the constructor from loading external values. Used to read actual local
|
||||
* values from a config file.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue