Compare commits

...

2 Commits

Author SHA1 Message Date
Yassine Doghri 3426be6233 Merge branch 'chore/update-ci' into 'develop'
chore: update codeigniter to 4.5.1 + other dependencies to latest

See merge request adaures/castopod!342
2024-04-25 13:28:39 +00:00
Yassine Doghri edbee96db5 chore: change rector and ecs configs + update devcontainer to php 8.2 2024-04-24 17:33:02 +00:00
54 changed files with 258 additions and 382 deletions

View File

@ -4,7 +4,7 @@
# ⚠️ NOT optimized for production # ⚠️ NOT optimized for production
# should be used only for development purposes # should be used only for development purposes
#--------------------------------------------------- #---------------------------------------------------
FROM php:8.1-fpm FROM php:8.2-fpm
LABEL maintainer="Yassine Doghri <yassine@doghri.fr>" LABEL maintainer="Yassine Doghri <yassine@doghri.fr>"

View File

@ -83,7 +83,7 @@ class App extends BaseConfig
* DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! * DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
* *
*/ */
public string $permittedURIChars = 'a-z 0-9~%.:_\-'; public string $permittedURIChars = 'a-z 0-9~%.:_\-@';
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------

View File

@ -62,7 +62,6 @@ class Autoload extends AutoloadConfig
/** /**
* ------------------------------------------------------------------- * -------------------------------------------------------------------
* Class Map
* ------------------------------------------------------------------- * -------------------------------------------------------------------
* The class map provides a map of class names and their exact * The class map provides a map of class names and their exact
* location on the drive. Classes loaded in this manner will have * location on the drive. Classes loaded in this manner will have

View File

@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
namespace Config; namespace Config;
use CodeIgniter\Config\BaseConfig; use CodeIgniter\Config\BaseConfig;

View File

@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
namespace Config; namespace Config;
/** /**

View File

@ -37,8 +37,8 @@ class Services extends BaseService
return static::getSharedInstance('router', $routes, $request); return static::getSharedInstance('router', $routes, $request);
} }
$routes = $routes ?? static::routes(); $routes ??= static::routes();
$request = $request ?? static::request(); $request ??= static::request();
return new Router($routes, $request); return new Router($routes, $request);
} }
@ -53,7 +53,7 @@ class Services extends BaseService
return static::getSharedInstance('negotiator', $request); return static::getSharedInstance('negotiator', $request);
} }
$request = $request ?? static::request(); $request ??= static::request();
return new Negotiate($request); return new Negotiate($request);
} }

View File

@ -13,8 +13,6 @@ use Psr\Log\LoggerInterface;
use ViewThemes\Theme; use ViewThemes\Theme;
/** /**
* Class BaseController
*
* BaseController provides a convenient place for loading components and performing functions that are needed by all * 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 * your controllers. Extend this class in any new controllers: class Home extends BaseController
* *

View File

@ -106,9 +106,7 @@ class EpisodeController extends BaseController
// The page cache is set to a decade so it is deleted manually upon podcast update // The page cache is set to a decade so it is deleted manually upon podcast update
return view('episode/comments', $data, [ return view('episode/comments', $data, [
'cache' => $secondsToNextUnpublishedEpisode 'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
? $secondsToNextUnpublishedEpisode
: DECADE,
'cache_name' => $cacheName, '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 // The page cache is set to a decade so it is deleted manually upon podcast update
return view('episode/activity', $data, [ return view('episode/activity', $data, [
'cache' => $secondsToNextUnpublishedEpisode 'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
? $secondsToNextUnpublishedEpisode
: DECADE,
'cache_name' => $cacheName, '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 // The page cache is set to a decade so it is deleted manually upon podcast update
return view('episode/chapters', $data, [ return view('episode/chapters', $data, [
'cache' => $secondsToNextUnpublishedEpisode 'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
? $secondsToNextUnpublishedEpisode
: DECADE,
'cache_name' => $cacheName, '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 // The page cache is set to a decade so it is deleted manually upon podcast update
return view('episode/transcript', $data, [ return view('episode/transcript', $data, [
'cache' => $secondsToNextUnpublishedEpisode 'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
? $secondsToNextUnpublishedEpisode
: DECADE,
'cache_name' => $cacheName, '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 // The page cache is set to a decade so it is deleted manually upon podcast update
return view('embed', $data, [ return view('embed', $data, [
'cache' => $secondsToNextUnpublishedEpisode 'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
? $secondsToNextUnpublishedEpisode
: DECADE,
'cache_name' => $cacheName, 'cache_name' => $cacheName,
]); ]);
} }
@ -420,11 +410,9 @@ class EpisodeController extends BaseController
* get comments: aggregated replies from posts referring to the episode * get comments: aggregated replies from posts referring to the episode
*/ */
$episodeComments = model(PostModel::class) $episodeComments = model(PostModel::class)
->whereIn('in_reply_to_id', function (BaseBuilder $builder): BaseBuilder { ->whereIn('in_reply_to_id', fn (BaseBuilder $builder): BaseBuilder => $builder->select('id')
return $builder->select('id') ->from('fediverse_posts')
->from('fediverse_posts') ->where('episode_id', $this->episode->id))
->where('episode_id', $this->episode->id);
})
->where('`published_at` <= UTC_TIMESTAMP()', null, false) ->where('`published_at` <= UTC_TIMESTAMP()', null, false)
->orderBy('published_at', 'ASC'); ->orderBy('published_at', 'ASC');

View File

@ -79,13 +79,7 @@ class FeedController extends Controller
); );
cache() cache()
->save( ->save($cacheName, $found, $secondsToNextUnpublishedEpisode ?: DECADE);
$cacheName,
$found,
$secondsToNextUnpublishedEpisode
? $secondsToNextUnpublishedEpisode
: DECADE,
);
} }
return $this->response->setXML($found); return $this->response->setXML($found);

View File

@ -96,9 +96,7 @@ class PodcastController extends BaseController
); );
return view('podcast/activity', $data, [ return view('podcast/activity', $data, [
'cache' => $secondsToNextUnpublishedEpisode 'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
? $secondsToNextUnpublishedEpisode
: DECADE,
'cache_name' => $cacheName, 'cache_name' => $cacheName,
]); ]);
} }
@ -148,9 +146,7 @@ class PodcastController extends BaseController
); );
return view('podcast/about', $data, [ return view('podcast/about', $data, [
'cache' => $secondsToNextUnpublishedEpisode 'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
? $secondsToNextUnpublishedEpisode
: DECADE,
'cache_name' => $cacheName, 'cache_name' => $cacheName,
]); ]);
} }
@ -270,9 +266,7 @@ class PodcastController extends BaseController
$this->podcast->id, $this->podcast->id,
); );
return view('podcast/episodes', $data, [ return view('podcast/episodes', $data, [
'cache' => $secondsToNextUnpublishedEpisode 'cache' => $secondsToNextUnpublishedEpisode ?: DECADE,
? $secondsToNextUnpublishedEpisode
: DECADE,
'cache_name' => $cacheName, 'cache_name' => $cacheName,
]); ]);
} }

View File

@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
namespace App\Database\Migrations; namespace App\Database\Migrations;
use CodeIgniter\Database\Migration; use CodeIgniter\Database\Migration;

View File

@ -77,34 +77,32 @@ class FakePodcastsAnalyticsSeeder extends Seeder
for ( for (
$lineNumber = 0; $lineNumber = 0;
$lineNumber < rand(1, (int) $probability1); $lineNumber < random_int(1, (int) $probability1);
++$lineNumber ++$lineNumber
) { ) {
$probability2 = floor(exp(6 - $age / 20)) + 10; $probability2 = floor(exp(6 - $age / 20)) + 10;
$player = $player =
$jsonUserAgents[ $jsonUserAgents[
rand(1, count($jsonUserAgents) - 1) random_int(1, count($jsonUserAgents) - 1)
]; ];
$service = $service =
$jsonRSSUserAgents[ $jsonRSSUserAgents[
rand(1, count($jsonRSSUserAgents) - 1) random_int(1, count($jsonRSSUserAgents) - 1)
]['slug']; ]['slug'];
$app = isset($player['app']) ? $player['app'] : ''; $app = $player['app'] ?? '';
$device = isset($player['device']) $device = $player['device'] ?? '';
? $player['device'] $os = $player['os'] ?? '';
: ''; $isBot = $player['bot'] ?? 0;
$os = isset($player['os']) ? $player['os'] : '';
$isBot = isset($player['bot']) ? $player['bot'] : 0;
$fakeIp = $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'); $cityReader = new Reader(WRITEPATH . 'uploads/GeoLite2-City/GeoLite2-City.mmdb');
@ -115,9 +113,7 @@ class FakePodcastsAnalyticsSeeder extends Seeder
try { try {
$city = $cityReader->city($fakeIp); $city = $cityReader->city($fakeIp);
$countryCode = $city->country->isoCode === null $countryCode = $city->country->isoCode ?? 'N/A';
? 'N/A'
: $city->country->isoCode;
$regionCode = $city->subdivisions === [] $regionCode = $city->subdivisions === []
? 'N/A' ? 'N/A'
@ -128,20 +124,20 @@ class FakePodcastsAnalyticsSeeder extends Seeder
//Bad luck, bad IP, nothing to do. //Bad luck, bad IP, nothing to do.
} }
$hits = rand(0, (int) $probability2); $hits = random_int(0, (int) $probability2);
$analyticsPodcasts[] = [ $analyticsPodcasts[] = [
'podcast_id' => $podcast->id, 'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date), 'date' => date('Y-m-d', $date),
'duration' => rand(60, 3600), 'duration' => random_int(60, 3600),
'bandwidth' => rand(1000000, 10000000), 'bandwidth' => random_int(1000000, 10000000),
'hits' => $hits, 'hits' => $hits,
'unique_listeners' => $hits, 'unique_listeners' => $hits,
]; ];
$analyticsPodcastsByHour[] = [ $analyticsPodcastsByHour[] = [
'podcast_id' => $podcast->id, 'podcast_id' => $podcast->id,
'date' => date('Y-m-d', $date), 'date' => date('Y-m-d', $date),
'hour' => rand(0, 23), 'hour' => random_int(0, 23),
'hits' => $hits, 'hits' => $hits,
]; ];
$analyticsPodcastsByCountry[] = [ $analyticsPodcastsByCountry[] = [

View File

@ -216,23 +216,23 @@ class FakeWebsiteAnalyticsSeeder extends Seeder
for ( for (
$lineNumber = 0; $lineNumber = 0;
$lineNumber < rand(1, $probability1); $lineNumber < random_int(1, $probability1);
++$lineNumber ++$lineNumber
) { ) {
$probability2 = (int) floor(exp(6 - $age / 20)) + 10; $probability2 = (int) floor(exp(6 - $age / 20)) + 10;
$domain = $domain =
$this->domains[rand(0, count($this->domains) - 1)]; $this->domains[random_int(0, count($this->domains) - 1)];
$keyword = $keyword =
$this->keywords[ $this->keywords[
rand(0, count($this->keywords) - 1) random_int(0, count($this->keywords) - 1)
]; ];
$browser = $browser =
$this->browsers[ $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[] = [ $websiteByBrowser[] = [
'podcast_id' => $podcast->id, 'podcast_id' => $podcast->id,

View File

@ -483,7 +483,7 @@ class Episode extends Entity
public function setGuid(?string $guid = null): static public function setGuid(?string $guid = null): static
{ {
$this->attributes['guid'] = $guid === null ? $this->getLink() : $guid; $this->attributes['guid'] = $guid ?? $this->getLink();
return $this; return $this;
} }

View File

@ -42,24 +42,16 @@ if (! function_exists('write_audio_file_tags')) {
// populate data array // populate data array
$TagData = [ $TagData = [
'title' => [esc($episode->title)], 'title' => [esc($episode->title)],
'artist' => [ 'artist' => [$episode->podcast->publisher ?? esc($episode->podcast->owner_name)],
$episode->podcast->publisher === null
? esc($episode->podcast->owner_name)
: $episode->podcast->publisher,
],
'album' => [esc($episode->podcast->title)], 'album' => [esc($episode->podcast->title)],
'year' => [$episode->published_at instanceof Time ? $episode->published_at->format('Y') : ''], 'year' => [$episode->published_at instanceof Time ? $episode->published_at->format('Y') : ''],
'genre' => ['Podcast'], 'genre' => ['Podcast'],
'comment' => [$episode->description], 'comment' => [$episode->description],
'track_number' => [(string) $episode->number], 'track_number' => [(string) $episode->number],
'copyright_message' => [$episode->podcast->copyright], 'copyright_message' => [$episode->podcast->copyright],
'publisher' => [ 'publisher' => [$episode->podcast->publisher ?? esc($episode->podcast->owner_name)],
$episode->podcast->publisher === null 'encoded_by' => ['Castopod'],
? esc($episode->podcast->owner_name)
: $episode->podcast->publisher,
],
'encoded_by' => ['Castopod'],
// TODO: find a way to add the remaining tags for podcasts as the library doesn't seem to allow it // TODO: find a way to add the remaining tags for podcasts as the library doesn't seem to allow it
// 'website' => [$podcast_url], // 'website' => [$podcast_url],

View File

@ -164,7 +164,7 @@ if (! function_exists('parse_size')) {
$size = (float) preg_replace('~[^0-9\.]~', '', $size); // Remove the non-numeric characters from the size. $size = (float) preg_replace('~[^0-9\.]~', '', $size); // Remove the non-numeric characters from the size.
if ($unit !== '') { if ($unit !== '') {
// Find the position of the unit in the ordered string which is the power of magnitude to multiply a kilobyte by. // 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); return round($size);
@ -183,7 +183,7 @@ if (! function_exists('format_bytes')) {
$pow = floor(($bytes ? log($bytes) : 0) / log($is_binary ? 1024 : 1000)); $pow = floor(($bytes ? log($bytes) : 0) / log($is_binary ? 1024 : 1000));
$pow = min($pow, count($units) - 1); $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]; return round($bytes, $precision) . $units[$pow];
} }

View File

@ -260,12 +260,7 @@ if (! function_exists('get_rss_feed')) {
$itunesNamespace, $itunesNamespace,
); );
$channel->addChild( $channel->addChild('author', $podcast->publisher ?: $podcast->owner_name, $itunesNamespace, false);
'author',
$podcast->publisher ? $podcast->publisher : $podcast->owner_name,
$itunesNamespace,
false
);
$channel->addChild('link', $podcast->link); $channel->addChild('link', $podcast->link);
$owner = $channel->addChild('owner', null, $itunesNamespace); $owner = $channel->addChild('owner', null, $itunesNamespace);
@ -354,7 +349,7 @@ if (! function_exists('get_rss_feed')) {
$item->addChild('episodeType', $episode->type, $itunesNamespace); $item->addChild('episodeType', $episode->type, $itunesNamespace);
// If episode is of type trailer, add podcast:trailer tag on channel level // 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 = $channel->addChild('trailer', $episode->title, $podcastNamespace);
$trailer->addAttribute('pubdate', $episode->published_at->format(DATE_RFC2822)); $trailer->addAttribute('pubdate', $episode->published_at->format(DATE_RFC2822));
$trailer->addAttribute( $trailer->addAttribute(

View File

@ -48,7 +48,7 @@ class Router extends CodeIgniterRouter
$matchedKey = $routeKey; $matchedKey = $routeKey;
// Are we dealing with a locale? // Are we dealing with a locale?
if (strpos($routeKey, '{locale}') !== false) { if (str_contains($routeKey, '{locale}')) {
$routeKey = str_replace('{locale}', '[^/]+', $routeKey); $routeKey = str_replace('{locale}', '[^/]+', $routeKey);
} }
@ -73,7 +73,7 @@ class Router extends CodeIgniterRouter
// Store our locale so CodeIgniter object can // Store our locale so CodeIgniter object can
// assign it to the Request. // assign it to the Request.
if (strpos($matchedKey, '{locale}') !== false) { if (str_contains($matchedKey, '{locale}')) {
preg_match( preg_match(
'#^' . str_replace('{locale}', '(?<locale>[^/]+)', $matchedKey) . '$#u', '#^' . str_replace('{locale}', '(?<locale>[^/]+)', $matchedKey) . '$#u',
$uri, $uri,
@ -183,13 +183,13 @@ class Router extends CodeIgniterRouter
[$controller] = explode('::', (string) $handler); [$controller] = explode('::', (string) $handler);
// Checks `/` in controller name // Checks `/` in controller name
if (strpos($controller, '/') !== false) { if (str_contains($controller, '/')) {
throw RouterException::forInvalidControllerName($handler); throw RouterException::forInvalidControllerName($handler);
} }
if (strpos((string) $handler, '$') !== false && strpos($routeKey, '(') !== false) { if (str_contains((string) $handler, '$') && str_contains($routeKey, '(')) {
// Checks dynamic controller // Checks dynamic controller
if (strpos($controller, '$') !== false) { if (str_contains($controller, '$')) {
throw RouterException::forDynamicController($handler); throw RouterException::forDynamicController($handler);
} }

View File

@ -7,8 +7,6 @@ namespace ViewComponents;
use CodeIgniter\View\ViewDecoratorInterface; use CodeIgniter\View\ViewDecoratorInterface;
/** /**
* Class Decorator
*
* Enables rendering of View Components into the views. * Enables rendering of View Components into the views.
* *
* Borrowed and adapted from https://github.com/lonnieezell/Bonfire2/ * Borrowed and adapted from https://github.com/lonnieezell/Bonfire2/

View File

@ -19,7 +19,7 @@ class Theme
protected static $defaultTheme = 'app'; protected static $defaultTheme = 'app';
/** /**
* @var string * @var ?string
*/ */
protected static $currentTheme; protected static $currentTheme;
@ -71,9 +71,7 @@ class Theme
*/ */
public static function current(): string public static function current(): string
{ {
return static::$currentTheme !== null return static::$currentTheme ?? static::$defaultTheme;
? static::$currentTheme
: static::$defaultTheme;
} }
/** /**

View File

@ -272,13 +272,7 @@ class EpisodeModel extends UuidModel
$secondsToNextUnpublishedEpisode = $this->getSecondsToNextUnpublishedEpisode($podcastId); $secondsToNextUnpublishedEpisode = $this->getSecondsToNextUnpublishedEpisode($podcastId);
cache() cache()
->save( ->save($cacheName, $found, $secondsToNextUnpublishedEpisode ?: DECADE);
$cacheName,
$found,
$secondsToNextUnpublishedEpisode
? $secondsToNextUnpublishedEpisode
: DECADE,
);
} }
return $found; return $found;

View File

@ -259,13 +259,7 @@ class PodcastModel extends Model
$secondsToNextUnpublishedEpisode = $episodeModel->getSecondsToNextUnpublishedEpisode($podcastId); $secondsToNextUnpublishedEpisode = $episodeModel->getSecondsToNextUnpublishedEpisode($podcastId);
cache() cache()
->save( ->save($cacheName, $found, $secondsToNextUnpublishedEpisode ?: DECADE);
$cacheName,
$found,
$secondsToNextUnpublishedEpisode
? $secondsToNextUnpublishedEpisode
: DECADE,
);
} }
return $found; return $found;
@ -295,13 +289,7 @@ class PodcastModel extends Model
$secondsToNextUnpublishedEpisode = $episodeModel->getSecondsToNextUnpublishedEpisode($podcastId); $secondsToNextUnpublishedEpisode = $episodeModel->getSecondsToNextUnpublishedEpisode($podcastId);
cache() cache()
->save( ->save($cacheName, $found, $secondsToNextUnpublishedEpisode ?: DECADE);
$cacheName,
$found,
$secondsToNextUnpublishedEpisode
? $secondsToNextUnpublishedEpisode
: DECADE,
);
} }
return $found; return $found;
@ -335,11 +323,7 @@ class PodcastModel extends Model
$secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode($podcastId); $secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode($podcastId);
cache() cache()
->save( ->save($cacheName, $defaultQuery, $secondsToNextUnpublishedEpisode ?: DECADE);
$cacheName,
$defaultQuery,
$secondsToNextUnpublishedEpisode ? $secondsToNextUnpublishedEpisode : DECADE
);
} }
return $defaultQuery; return $defaultQuery;

View File

@ -42,7 +42,7 @@ class Alert extends Component
$this->variant = 'default'; $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>'; $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; $class = 'inline-flex w-full p-2 text-sm border rounded ' . $variants[$this->variant]['class'] . ' ' . $this->class;

2
builds
View File

@ -1,6 +1,8 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
declare(strict_types=1);
define('LATEST_RELEASE', '^4.0'); define('LATEST_RELEASE', '^4.0');
define('GITHUB_URL', 'https://github.com/codeigniter4/codeigniter4'); define('GITHUB_URL', 'https://github.com/codeigniter4/codeigniter4');

View File

@ -37,8 +37,8 @@
"phpstan/phpstan": "^1.10.67", "phpstan/phpstan": "^1.10.67",
"phpunit/phpunit": "^10.5.20", "phpunit/phpunit": "^10.5.20",
"rector/rector": "^1.0.4", "rector/rector": "^1.0.4",
"symplify/coding-standard": "^12.0.7", "symplify/coding-standard": "^12.1.4",
"symplify/easy-coding-standard": "^12.0.13" "symplify/easy-coding-standard": "^12.1.14"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

216
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "ee508475cbce65e22e5904fbb358f8b3", "content-hash": "214fb8dbb7be84011c98ac2ab2df7c9d",
"packages": [ "packages": [
{ {
"name": "adaures/ipcat-php", "name": "adaures/ipcat-php",
@ -5536,47 +5536,46 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v6.4.6", "version": "v7.0.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "a2708a5da5c87d1d0d52937bdeac625df659e11f" "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/a2708a5da5c87d1d0d52937bdeac625df659e11f", "url": "https://api.github.com/repos/symfony/console/zipball/fde915cd8e7eb99b3d531d3d5c09531429c3f9e5",
"reference": "a2708a5da5c87d1d0d52937bdeac625df659e11f", "reference": "fde915cd8e7eb99b3d531d3d5c09531429c3f9e5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.2",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-mbstring": "~1.0",
"symfony/service-contracts": "^2.5|^3", "symfony/service-contracts": "^2.5|^3",
"symfony/string": "^5.4|^6.0|^7.0" "symfony/string": "^6.4|^7.0"
}, },
"conflict": { "conflict": {
"symfony/dependency-injection": "<5.4", "symfony/dependency-injection": "<6.4",
"symfony/dotenv": "<5.4", "symfony/dotenv": "<6.4",
"symfony/event-dispatcher": "<5.4", "symfony/event-dispatcher": "<6.4",
"symfony/lock": "<5.4", "symfony/lock": "<6.4",
"symfony/process": "<5.4" "symfony/process": "<6.4"
}, },
"provide": { "provide": {
"psr/log-implementation": "1.0|2.0|3.0" "psr/log-implementation": "1.0|2.0|3.0"
}, },
"require-dev": { "require-dev": {
"psr/log": "^1|^2|^3", "psr/log": "^1|^2|^3",
"symfony/config": "^5.4|^6.0|^7.0", "symfony/config": "^6.4|^7.0",
"symfony/dependency-injection": "^5.4|^6.0|^7.0", "symfony/dependency-injection": "^6.4|^7.0",
"symfony/event-dispatcher": "^5.4|^6.0|^7.0", "symfony/event-dispatcher": "^6.4|^7.0",
"symfony/http-foundation": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0",
"symfony/http-kernel": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0",
"symfony/lock": "^5.4|^6.0|^7.0", "symfony/lock": "^6.4|^7.0",
"symfony/messenger": "^5.4|^6.0|^7.0", "symfony/messenger": "^6.4|^7.0",
"symfony/process": "^5.4|^6.0|^7.0", "symfony/process": "^6.4|^7.0",
"symfony/stopwatch": "^5.4|^6.0|^7.0", "symfony/stopwatch": "^6.4|^7.0",
"symfony/var-dumper": "^5.4|^6.0|^7.0" "symfony/var-dumper": "^6.4|^7.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -5601,7 +5600,7 @@
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"keywords": ["cli", "command-line", "console", "terminal"], "keywords": ["cli", "command-line", "console", "terminal"],
"support": { "support": {
"source": "https://github.com/symfony/console/tree/v6.4.6" "source": "https://github.com/symfony/console/tree/v7.0.6"
}, },
"funding": [ "funding": [
{ {
@ -5617,28 +5616,28 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-03-29T19:07:53+00:00" "time": "2024-04-01T11:04:53+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v6.4.3", "version": "v7.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "ae9d3a6f3003a6caf56acd7466d8d52378d44fef" "reference": "834c28d533dd0636f910909d01b9ff45cc094b5e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ae9d3a6f3003a6caf56acd7466d8d52378d44fef", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/834c28d533dd0636f910909d01b9ff45cc094b5e",
"reference": "ae9d3a6f3003a6caf56acd7466d8d52378d44fef", "reference": "834c28d533dd0636f910909d01b9ff45cc094b5e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.2",
"symfony/event-dispatcher-contracts": "^2.5|^3" "symfony/event-dispatcher-contracts": "^2.5|^3"
}, },
"conflict": { "conflict": {
"symfony/dependency-injection": "<5.4", "symfony/dependency-injection": "<6.4",
"symfony/service-contracts": "<2.5" "symfony/service-contracts": "<2.5"
}, },
"provide": { "provide": {
@ -5647,13 +5646,13 @@
}, },
"require-dev": { "require-dev": {
"psr/log": "^1|^2|^3", "psr/log": "^1|^2|^3",
"symfony/config": "^5.4|^6.0|^7.0", "symfony/config": "^6.4|^7.0",
"symfony/dependency-injection": "^5.4|^6.0|^7.0", "symfony/dependency-injection": "^6.4|^7.0",
"symfony/error-handler": "^5.4|^6.0|^7.0", "symfony/error-handler": "^6.4|^7.0",
"symfony/expression-language": "^5.4|^6.0|^7.0", "symfony/expression-language": "^6.4|^7.0",
"symfony/http-foundation": "^5.4|^6.0|^7.0", "symfony/http-foundation": "^6.4|^7.0",
"symfony/service-contracts": "^2.5|^3", "symfony/service-contracts": "^2.5|^3",
"symfony/stopwatch": "^5.4|^6.0|^7.0" "symfony/stopwatch": "^6.4|^7.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -5677,7 +5676,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v6.4.3" "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.3"
}, },
"funding": [ "funding": [
{ {
@ -5693,7 +5692,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-01-23T14:51:35+00:00" "time": "2024-01-23T15:02:46+00:00"
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
@ -5771,20 +5770,20 @@
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "v6.4.6", "version": "v7.0.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/filesystem.git", "url": "https://github.com/symfony/filesystem.git",
"reference": "9919b5509ada52cc7f66f9a35c86a4a29955c9d3" "reference": "408105dff4c104454100730bdfd1a9cdd993f04d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/9919b5509ada52cc7f66f9a35c86a4a29955c9d3", "url": "https://api.github.com/repos/symfony/filesystem/zipball/408105dff4c104454100730bdfd1a9cdd993f04d",
"reference": "9919b5509ada52cc7f66f9a35c86a4a29955c9d3", "reference": "408105dff4c104454100730bdfd1a9cdd993f04d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.2",
"symfony/polyfill-ctype": "~1.8", "symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.8" "symfony/polyfill-mbstring": "~1.8"
}, },
@ -5810,7 +5809,7 @@
"description": "Provides basic utilities for the filesystem", "description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/filesystem/tree/v6.4.6" "source": "https://github.com/symfony/filesystem/tree/v7.0.6"
}, },
"funding": [ "funding": [
{ {
@ -5826,27 +5825,27 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-03-21T19:36:20+00:00" "time": "2024-03-21T19:37:36+00:00"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v6.4.0", "version": "v7.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "11d736e97f116ac375a81f96e662911a34cd50ce" "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/11d736e97f116ac375a81f96e662911a34cd50ce", "url": "https://api.github.com/repos/symfony/finder/zipball/6e5688d69f7cfc4ed4a511e96007e06c2d34ce56",
"reference": "11d736e97f116ac375a81f96e662911a34cd50ce", "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1" "php": ">=8.2"
}, },
"require-dev": { "require-dev": {
"symfony/filesystem": "^6.0|^7.0" "symfony/filesystem": "^6.4|^7.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -5870,7 +5869,7 @@
"description": "Finds files and directories via an intuitive fluent interface", "description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/finder/tree/v6.4.0" "source": "https://github.com/symfony/finder/tree/v7.0.0"
}, },
"funding": [ "funding": [
{ {
@ -5886,24 +5885,24 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-10-31T17:30:12+00:00" "time": "2023-10-31T17:59:56+00:00"
}, },
{ {
"name": "symfony/options-resolver", "name": "symfony/options-resolver",
"version": "v6.4.0", "version": "v7.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/options-resolver.git", "url": "https://github.com/symfony/options-resolver.git",
"reference": "22301f0e7fdeaacc14318928612dee79be99860e" "reference": "700ff4096e346f54cb628ea650767c8130f1001f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/22301f0e7fdeaacc14318928612dee79be99860e", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/700ff4096e346f54cb628ea650767c8130f1001f",
"reference": "22301f0e7fdeaacc14318928612dee79be99860e", "reference": "700ff4096e346f54cb628ea650767c8130f1001f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.2",
"symfony/deprecation-contracts": "^2.5|^3" "symfony/deprecation-contracts": "^2.5|^3"
}, },
"type": "library", "type": "library",
@ -5929,7 +5928,7 @@
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"keywords": ["config", "configuration", "options"], "keywords": ["config", "configuration", "options"],
"support": { "support": {
"source": "https://github.com/symfony/options-resolver/tree/v6.4.0" "source": "https://github.com/symfony/options-resolver/tree/v7.0.0"
}, },
"funding": [ "funding": [
{ {
@ -5945,7 +5944,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-08-08T10:16:24+00:00" "time": "2023-08-08T10:20:21+00:00"
}, },
{ {
"name": "symfony/polyfill-intl-grapheme", "name": "symfony/polyfill-intl-grapheme",
@ -6163,20 +6162,20 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v6.4.4", "version": "v7.0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "710e27879e9be3395de2b98da3f52a946039f297" "reference": "0e7727191c3b71ebec6d529fa0e50a01ca5679e9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/710e27879e9be3395de2b98da3f52a946039f297", "url": "https://api.github.com/repos/symfony/process/zipball/0e7727191c3b71ebec6d529fa0e50a01ca5679e9",
"reference": "710e27879e9be3395de2b98da3f52a946039f297", "reference": "0e7727191c3b71ebec6d529fa0e50a01ca5679e9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1" "php": ">=8.2"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -6200,7 +6199,7 @@
"description": "Executes commands in sub-processes", "description": "Executes commands in sub-processes",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/process/tree/v6.4.4" "source": "https://github.com/symfony/process/tree/v7.0.4"
}, },
"funding": [ "funding": [
{ {
@ -6216,7 +6215,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-02-20T12:31:00+00:00" "time": "2024-02-22T20:27:20+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
@ -6298,20 +6297,20 @@
}, },
{ {
"name": "symfony/stopwatch", "name": "symfony/stopwatch",
"version": "v6.4.3", "version": "v7.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/stopwatch.git", "url": "https://github.com/symfony/stopwatch.git",
"reference": "416596166641f1f728b0a64f5b9dd07cceb410c1" "reference": "983900d6fddf2b0cbaacacbbad07610854bd8112"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/416596166641f1f728b0a64f5b9dd07cceb410c1", "url": "https://api.github.com/repos/symfony/stopwatch/zipball/983900d6fddf2b0cbaacacbbad07610854bd8112",
"reference": "416596166641f1f728b0a64f5b9dd07cceb410c1", "reference": "983900d6fddf2b0cbaacacbbad07610854bd8112",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.2",
"symfony/service-contracts": "^2.5|^3" "symfony/service-contracts": "^2.5|^3"
}, },
"type": "library", "type": "library",
@ -6336,7 +6335,7 @@
"description": "Provides a way to profile code", "description": "Provides a way to profile code",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/stopwatch/tree/v6.4.3" "source": "https://github.com/symfony/stopwatch/tree/v7.0.3"
}, },
"funding": [ "funding": [
{ {
@ -6352,24 +6351,24 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-01-23T14:35:58+00:00" "time": "2024-01-23T15:02:46+00:00"
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v6.4.4", "version": "v7.0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/string.git", "url": "https://github.com/symfony/string.git",
"reference": "4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9" "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9", "url": "https://api.github.com/repos/symfony/string/zipball/f5832521b998b0bec40bee688ad5de98d4cf111b",
"reference": "4e465a95bdc32f49cf4c7f07f751b843bbd6dcd9", "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.1", "php": ">=8.2",
"symfony/polyfill-ctype": "~1.8", "symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-grapheme": "~1.0",
"symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0",
@ -6379,11 +6378,11 @@
"symfony/translation-contracts": "<2.5" "symfony/translation-contracts": "<2.5"
}, },
"require-dev": { "require-dev": {
"symfony/error-handler": "^5.4|^6.0|^7.0", "symfony/error-handler": "^6.4|^7.0",
"symfony/http-client": "^5.4|^6.0|^7.0", "symfony/http-client": "^6.4|^7.0",
"symfony/intl": "^6.2|^7.0", "symfony/intl": "^6.4|^7.0",
"symfony/translation-contracts": "^2.5|^3.0", "symfony/translation-contracts": "^2.5|^3.0",
"symfony/var-exporter": "^5.4|^6.0|^7.0" "symfony/var-exporter": "^6.4|^7.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -6409,7 +6408,7 @@
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"keywords": ["grapheme", "i18n", "string", "unicode", "utf-8", "utf8"], "keywords": ["grapheme", "i18n", "string", "unicode", "utf-8", "utf8"],
"support": { "support": {
"source": "https://github.com/symfony/string/tree/v6.4.4" "source": "https://github.com/symfony/string/tree/v7.0.4"
}, },
"funding": [ "funding": [
{ {
@ -6425,41 +6424,38 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-02-01T13:16:41+00:00" "time": "2024-02-01T13:17:36+00:00"
}, },
{ {
"name": "symplify/coding-standard", "name": "symplify/coding-standard",
"version": "12.0.7", "version": "12.1.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symplify/coding-standard.git", "url": "https://github.com/symplify/coding-standard.git",
"reference": "199f1e5e2b2bd67eac392ab1d3c6c04bf7ebce3c" "reference": "1a591e18c64e7367b243729a43a70c2e92025468"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symplify/coding-standard/zipball/199f1e5e2b2bd67eac392ab1d3c6c04bf7ebce3c", "url": "https://api.github.com/repos/symplify/coding-standard/zipball/1a591e18c64e7367b243729a43a70c2e92025468",
"reference": "199f1e5e2b2bd67eac392ab1d3c6c04bf7ebce3c", "reference": "1a591e18c64e7367b243729a43a70c2e92025468",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"friendsofphp/php-cs-fixer": "^3.40", "friendsofphp/php-cs-fixer": "^3.49",
"nette/utils": "^3.2", "nette/utils": "^3.2",
"php": ">=8.1", "php": ">=8.2",
"symplify/rule-doc-generator-contracts": "^11.1" "symplify/rule-doc-generator-contracts": "^11.1"
}, },
"require-dev": { "require-dev": {
"phpstan/extension-installer": "^1.3", "phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10.26", "phpstan/phpstan": "^1.10.58",
"phpunit/phpunit": "^10.2", "phpunit/phpunit": "^10.5",
"rector/rector": "^0.17.7", "rector/rector": "^1.0",
"squizlabs/php_codesniffer": "^3.7.2", "squizlabs/php_codesniffer": "^3.8.1",
"symplify/easy-ci": "^11.3", "symplify/easy-coding-standard": "^12.1",
"symplify/easy-coding-standard": "^12.0.11", "symplify/phpstan-extensions": "^11.4",
"symplify/phpstan-extensions": "^11.2",
"symplify/rule-doc-generator": "^12.0", "symplify/rule-doc-generator": "^12.0",
"tomasvotruba/class-leak": "^0.2", "tomasvotruba/class-leak": "^0.2",
"tomasvotruba/type-coverage": "^0.2",
"tomasvotruba/unused-public": "^0.3",
"tracy/tracy": "^2.10" "tracy/tracy": "^2.10"
}, },
"type": "library", "type": "library",
@ -6473,7 +6469,7 @@
"description": "Set of Symplify rules for PHP_CodeSniffer and PHP CS Fixer.", "description": "Set of Symplify rules for PHP_CodeSniffer and PHP CS Fixer.",
"support": { "support": {
"issues": "https://github.com/symplify/coding-standard/issues", "issues": "https://github.com/symplify/coding-standard/issues",
"source": "https://github.com/symplify/coding-standard/tree/12.0.7" "source": "https://github.com/symplify/coding-standard/tree/12.1.4"
}, },
"funding": [ "funding": [
{ {
@ -6485,29 +6481,29 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-12-07T09:18:34+00:00" "time": "2024-02-23T13:07:31+00:00"
}, },
{ {
"name": "symplify/easy-coding-standard", "name": "symplify/easy-coding-standard",
"version": "12.1.1", "version": "12.1.14",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/easy-coding-standard/easy-coding-standard.git", "url": "https://github.com/easy-coding-standard/easy-coding-standard.git",
"reference": "d082c6f90e83ae85f7e63b03ea06780dcf765834" "reference": "e3c4a241ee36704f7cf920d5931f39693e64afd5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/d082c6f90e83ae85f7e63b03ea06780dcf765834", "url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/e3c4a241ee36704f7cf920d5931f39693e64afd5",
"reference": "d082c6f90e83ae85f7e63b03ea06780dcf765834", "reference": "e3c4a241ee36704f7cf920d5931f39693e64afd5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2" "php": ">=7.2"
}, },
"conflict": { "conflict": {
"friendsofphp/php-cs-fixer": "<3.0", "friendsofphp/php-cs-fixer": "<3.46",
"phpcsstandards/php_codesniffer": "<3.6", "phpcsstandards/php_codesniffer": "<3.8",
"symplify/coding-standard": "<11.3" "symplify/coding-standard": "<12.1"
}, },
"bin": ["bin/ecs"], "bin": ["bin/ecs"],
"type": "library", "type": "library",
@ -6520,7 +6516,7 @@
"keywords": ["Code style", "automation", "fixer", "static analysis"], "keywords": ["Code style", "automation", "fixer", "static analysis"],
"support": { "support": {
"issues": "https://github.com/easy-coding-standard/easy-coding-standard/issues", "issues": "https://github.com/easy-coding-standard/easy-coding-standard/issues",
"source": "https://github.com/easy-coding-standard/easy-coding-standard/tree/12.1.1" "source": "https://github.com/easy-coding-standard/easy-coding-standard/tree/12.1.14"
}, },
"funding": [ "funding": [
{ {
@ -6532,7 +6528,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-01-05T13:20:55+00:00" "time": "2024-02-23T13:10:40+00:00"
}, },
{ {
"name": "symplify/rule-doc-generator-contracts", "name": "symplify/rule-doc-generator-contracts",

30
ecs.php
View File

@ -10,26 +10,20 @@ use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer;
use Symplify\CodingStandard\Fixer\Naming\StandardizeHereNowDocKeywordFixer; use Symplify\CodingStandard\Fixer\Naming\StandardizeHereNowDocKeywordFixer;
use Symplify\CodingStandard\Fixer\Spacing\MethodChainingNewlineFixer; use Symplify\CodingStandard\Fixer\Spacing\MethodChainingNewlineFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig; use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
return static function (ECSConfig $ecsConfig): void { return ECSConfig::configure()
// alternative to CLI arguments, easier to maintain and extend ->withPaths([
$ecsConfig->paths([
__DIR__ . '/app', __DIR__ . '/app',
__DIR__ . '/modules', __DIR__ . '/modules',
__DIR__ . '/themes', __DIR__ . '/themes',
__DIR__ . '/tests', __DIR__ . '/tests',
__DIR__ . '/public', __DIR__ . '/public',
__DIR__ . '/builds', __DIR__ . '/builds',
__DIR__ . '/ecs.php',
__DIR__ . '/preload.php',
__DIR__ . '/rector.php',
__DIR__ . '/spark', __DIR__ . '/spark',
]); ])
->withRootFiles()
$ecsConfig->sets([SetList::CLEAN_CODE, SetList::COMMON, SetList::SYMPLIFY, SetList::PSR_12]); ->withPreparedSets(cleanCode: true, common: true, symplify: true, strict: true, psr12: true)
->withSkip([
$ecsConfig->skip([
// skip specific generated files // skip specific generated files
__DIR__ . '/modules/Admin/Language/*/PersonsTaxonomy.php', __DIR__ . '/modules/Admin/Language/*/PersonsTaxonomy.php',
@ -40,11 +34,7 @@ return static function (ECSConfig $ecsConfig): void {
__DIR__ . '/app/Helpers/components_helper.php', __DIR__ . '/app/Helpers/components_helper.php',
], ],
LineLengthFixer::class => [ LineLengthFixer::class => [__DIR__ . '/app/Views/*', __DIR__ . '/modules/**/Views/*', __DIR__ . '/themes/*'],
__DIR__ . '/app/Views/*',
__DIR__ . '/modules/**/Views/*',
__DIR__ . '/themes/*',
],
IndentationTypeFixer::class => [ IndentationTypeFixer::class => [
__DIR__ . '/app/Views/*', __DIR__ . '/app/Views/*',
@ -65,11 +55,9 @@ return static function (ECSConfig $ecsConfig): void {
BinaryOperatorSpacesFixer::class => [__DIR__ . '/app/Language/*', __DIR__ . '/modules/**/Language/*'], BinaryOperatorSpacesFixer::class => [__DIR__ . '/app/Language/*', __DIR__ . '/modules/**/Language/*'],
AssignmentInConditionSniff::class, AssignmentInConditionSniff::class,
]); ])
->withConfiguredRule(BinaryOperatorSpacesFixer::class, [
$ecsConfig->ruleWithConfiguration(BinaryOperatorSpacesFixer::class, [
'operators' => [ 'operators' => [
'=>' => 'align_single_space_minimal', '=>' => 'align_single_space_minimal',
], ],
]); ]);
};

View File

@ -12,8 +12,6 @@ use Psr\Log\LoggerInterface;
use ViewThemes\Theme; use ViewThemes\Theme;
/** /**
* Class BaseController
*
* BaseController provides a convenient place for loading components and performing functions that are needed by all * 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 * your controllers. Extend this class in any new controllers: class Home extends BaseController
* *

View File

@ -326,12 +326,8 @@ class EpisodeController extends BaseController
$this->request->getPost('parental_advisory') !== 'undefined' $this->request->getPost('parental_advisory') !== 'undefined'
? $this->request->getPost('parental_advisory') ? $this->request->getPost('parental_advisory')
: null; : null;
$this->episode->number = $this->request->getPost('episode_number') $this->episode->number = $this->request->getPost('episode_number') ?: null;
? $this->request->getPost('episode_number') $this->episode->season_number = $this->request->getPost('season_number') ?: null;
: null;
$this->episode->season_number = $this->request->getPost('season_number')
? $this->request->getPost('season_number')
: null;
$this->episode->type = $this->request->getPost('type'); $this->episode->type = $this->request->getPost('type');
$this->episode->is_blocked = $this->request->getPost('block') === 'yes'; $this->episode->is_blocked = $this->request->getPost('block') === 'yes';
$this->episode->custom_rss_string = $this->request->getPost('custom_rss'); $this->episode->custom_rss_string = $this->request->getPost('custom_rss');

View File

@ -17,7 +17,7 @@ use CodeIgniter\HTTP\RedirectResponse;
class PageController extends BaseController class PageController extends BaseController
{ {
protected ?Page $page; protected ?Page $page = null;
public function _remap(string $method, string ...$params): mixed public function _remap(string $method, string ...$params): mixed
{ {

View File

@ -18,7 +18,7 @@ use Modules\Media\Models\MediaModel;
class PersonController extends BaseController class PersonController extends BaseController
{ {
protected ?Person $person; protected ?Person $person = null;
public function _remap(string $method, string ...$params): mixed public function _remap(string $method, string ...$params): mixed
{ {

View File

@ -30,9 +30,7 @@ trait AnalyticsTrait
$referer = $session->get('referer'); $referer = $session->get('referer');
$domain = $domain =
parse_url((string) $referer, PHP_URL_HOST) === null parse_url((string) $referer, PHP_URL_HOST) ?? '- Direct -';
? '- Direct -'
: parse_url((string) $referer, PHP_URL_HOST);
parse_str((string) parse_url((string) $referer, PHP_URL_QUERY), $queries); parse_str((string) parse_url((string) $referer, PHP_URL_QUERY), $queries);
$keywords = $queries['q'] ?? null; $keywords = $queries['q'] ?? null;

View File

@ -2,7 +2,6 @@
declare(strict_types=1); declare(strict_types=1);
use CodeIgniter\Router\RouteCollection;
use Modules\Analytics\Config\Analytics; use Modules\Analytics\Config\Analytics;
/** /**

View File

@ -85,14 +85,10 @@ if (! function_exists('set_user_session_location')) {
$city = $cityReader->city(client_ip()); $city = $cityReader->city(client_ip());
$location = [ $location = [
'countryCode' => $city->country->isoCode === null 'countryCode' => $city->country->isoCode ?? 'N/A',
? 'N/A' 'regionCode' => $city->subdivisions[0]->isoCode ?? 'N/A',
: $city->country->isoCode, 'latitude' => round($city->location->latitude, 3),
'regionCode' => $city->subdivisions[0]->isoCode === null 'longitude' => round($city->location->longitude, 3),
? 'N/A'
: $city->subdivisions[0]->isoCode,
'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 // If things go wrong the show must go on and the user must be able to download the file
} catch (Exception) { } catch (Exception) {
@ -179,9 +175,7 @@ if (! function_exists('set_user_session_referer')) {
{ {
$session = Services::session(); $session = Services::session();
$newreferer = isset($_SERVER['HTTP_REFERER']) $newreferer = $_SERVER['HTTP_REFERER'] ?? '- Direct -';
? $_SERVER['HTTP_REFERER']
: '- Direct -';
$newreferer = $newreferer =
parse_url((string) $newreferer, PHP_URL_HOST) === parse_url((string) $newreferer, PHP_URL_HOST) ===
parse_url(current_url(false), 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`: //We get the HTTP header field `Range`:
$httpRange = isset($_SERVER['HTTP_RANGE']) $httpRange = $_SERVER['HTTP_RANGE'] ?? null;
? $_SERVER['HTTP_RANGE']
: null;
$salt = config(Analytics::class) $salt = config(Analytics::class)
->salt; ->salt;

View File

@ -65,7 +65,7 @@ class EpisodeController extends Controller
return $this->failNotFound('Episode not found'); 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 protected static function mapEpisode(Episode $episode): Episode

View File

@ -36,7 +36,7 @@ class ApiFilter implements FilterInterface
} }
$authHeader = $request->getHeaderLine('Authorization'); $authHeader = $request->getHeaderLine('Authorization');
if (substr($authHeader, 0, 6) !== 'Basic ') { if (! str_starts_with($authHeader, 'Basic ')) {
$response->setStatusCode(401); $response->setStatusCode(401);
return $response; return $response;
@ -44,7 +44,7 @@ class ApiFilter implements FilterInterface
$auth_token = base64_decode(substr($authHeader, 6), true); $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)) { if (! ($username === $restApiConfig->basicAuthUsername && $password === $restApiConfig->basicAuthPassword)) {
$response->setStatusCode(401); $response->setStatusCode(401);

View File

@ -11,8 +11,6 @@ use Psr\Log\LoggerInterface;
use ViewThemes\Theme; use ViewThemes\Theme;
/** /**
* Class ActionController
*
* A generic controller to handle Authentication Actions. * A generic controller to handle Authentication Actions.
*/ */
class ActionController extends ShieldActionController class ActionController extends ShieldActionController

View File

@ -22,7 +22,7 @@ class ContributorController extends BaseController
{ {
protected Podcast $podcast; protected Podcast $podcast;
protected ?User $contributor; protected ?User $contributor = null;
public function _remap(string $method, string ...$params): mixed public function _remap(string $method, string ...$params): mixed
{ {

View File

@ -8,8 +8,6 @@ use CodeIgniter\Controller;
use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RedirectResponse;
/** /**
* Class ActionController
*
* A generic controller to handle Authentication Actions. * A generic controller to handle Authentication Actions.
*/ */
class InteractController extends Controller class InteractController extends Controller

View File

@ -11,8 +11,6 @@ use Psr\Log\LoggerInterface;
use ViewThemes\Theme; use ViewThemes\Theme;
/** /**
* Class RegisterController
*
* Handles displaying registration form, and handling actual registration flow. * Handles displaying registration form, and handling actual registration flow.
*/ */
class RegisterController extends ShieldRegisterController class RegisterController extends ShieldRegisterController

View File

@ -22,7 +22,7 @@ use Modules\Auth\Models\UserModel;
class UserController extends BaseController class UserController extends BaseController
{ {
protected ?User $user; protected ?User $user = null;
public function _remap(string $method, string ...$params): mixed public function _remap(string $method, string ...$params): mixed
{ {

View File

@ -102,9 +102,10 @@ if (! function_exists('add_podcast_group')) {
if (! function_exists('get_instance_group')) { if (! function_exists('get_instance_group')) {
function get_instance_group(User $user): ?string function get_instance_group(User $user): ?string
{ {
$instanceGroups = array_filter($user->getGroups() ?? [], static function ($group): bool { $instanceGroups = array_filter(
return ! str_starts_with($group, 'podcast#'); $user->getGroups() ?? [],
}); static fn ($group): bool => ! str_starts_with((string) $group, 'podcast#')
);
if ($instanceGroups === []) { if ($instanceGroups === []) {
return null; return null;
@ -138,9 +139,10 @@ if (! function_exists('set_instance_group')) {
if (! function_exists('get_podcast_group')) { if (! function_exists('get_podcast_group')) {
function get_podcast_group(User $user, int $podcastId, bool $removePrefix = true): ?string function get_podcast_group(User $user, int $podcastId, bool $removePrefix = true): ?string
{ {
$podcastGroups = array_filter($user->getGroups() ?? [], static function ($group) use ($podcastId): bool { $podcastGroups = array_filter(
return str_starts_with($group, "podcast#{$podcastId}-"); $user->getGroups() ?? [],
}); static fn ($group): bool => str_starts_with((string) $group, "podcast#{$podcastId}-")
);
if ($podcastGroups === []) { if ($podcastGroups === []) {
return null; return null;
@ -180,9 +182,10 @@ if (! function_exists('get_podcast_groups')) {
*/ */
function get_user_podcast_ids(User $user): array function get_user_podcast_ids(User $user): array
{ {
$podcastGroups = array_filter($user->getGroups() ?? [], static function ($group): bool { $podcastGroups = array_filter(
return str_starts_with($group, 'podcast#'); $user->getGroups() ?? [],
}); static fn ($group): bool => str_starts_with((string) $group, 'podcast#')
);
$userPodcastIds = []; $userPodcastIds = [];
// extract all podcast ids from groups // extract all podcast ids from groups

View File

@ -42,9 +42,7 @@ abstract class AbstractObject
} }
// removes all NULL, FALSE and Empty Strings but leaves 0 (zero) values // removes all NULL, FALSE and Empty Strings but leaves 0 (zero) values
return array_filter($array, static function ($value): bool { return array_filter($array, static fn ($value): bool => $value !== null && $value !== false && $value !== '');
return $value !== null && $value !== false && $value !== '';
});
} }
public function toJSON(): string public function toJSON(): string

View File

@ -175,12 +175,10 @@ if (! function_exists('create_preview_card_from_url')) {
// Check that, at least, the url and title are set // Check that, at least, the url and title are set
$newPreviewCard = new PreviewCard([ $newPreviewCard = new PreviewCard([
'url' => $mediaUrl, 'url' => $mediaUrl,
'title' => $media['title'] ?? '', 'title' => $media['title'] ?? '',
'description' => $media['description'] ?? '', 'description' => $media['description'] ?? '',
'type' => isset($typeMapping[$media['type']]) 'type' => $typeMapping[$media['type']] ?? 'link',
? $typeMapping[$media['type']]
: 'link',
'author_name' => $media['author_name'] ?? null, 'author_name' => $media['author_name'] ?? null,
'author_url' => $media['author_url'] ?? null, 'author_url' => $media['author_url'] ?? null,
'provider_name' => $media['provider_name'] ?? '', 'provider_name' => $media['provider_name'] ?? '',

View File

@ -134,7 +134,7 @@ class PostModel extends UuidModel
$secondsToNextUnpublishedPost = $this->getSecondsToNextUnpublishedPosts($actorId); $secondsToNextUnpublishedPost = $this->getSecondsToNextUnpublishedPosts($actorId);
cache() cache()
->save($cacheName, $found, $secondsToNextUnpublishedPost ? $secondsToNextUnpublishedPost : DECADE); ->save($cacheName, $found, $secondsToNextUnpublishedPost ?: DECADE);
} }
return $found; return $found;

View File

@ -160,9 +160,7 @@ class InstallController extends Controller
if (! $this->validate($rules)) { if (! $this->validate($rules)) {
return redirect() return redirect()
->to( ->to((host_url() ?? config(App::class) ->baseURL) . config(Install::class)->gateway)
(host_url() === null ? config(App::class) ->baseURL : host_url()) . config(Install::class)->gateway
)
->withInput() ->withInput()
->with('errors', $this->validator->getErrors()); ->with('errors', $this->validator->getErrors());
} }

View File

@ -85,16 +85,12 @@ class Transcript extends BaseMedia
} }
$transcript_format = $this->file->getExtension(); $transcript_format = $this->file->getExtension();
switch ($transcript_format) { $transcriptJson = match ($transcript_format) {
case 'vtt': 'vtt' => $transcriptParser->loadString($transcriptContent)
$transcriptJson = $transcriptParser->loadString($transcriptContent) ->parseVtt(),
->parseVtt(); default => $transcriptParser->loadString($transcriptContent)
break; ->parseSrt(),
case 'srt': };
default:
$transcriptJson = $transcriptParser->loadString($transcriptContent)
->parseSrt();
}
$tempFilePath = WRITEPATH . 'uploads/' . $this->file->getRandomName(); $tempFilePath = WRITEPATH . 'uploads/' . $this->file->getRandomName();
file_put_contents($tempFilePath, $transcriptJson); file_put_contents($tempFilePath, $transcriptJson);

View File

@ -543,9 +543,9 @@ class VideoClipper
# find unique color # find unique color
do { do {
$r = rand(0, 255); $r = random_int(0, 255);
$g = rand(0, 255); $g = random_int(0, 255);
$b = rand(0, 255); $b = random_int(0, 255);
} while (imagecolorexact($src, $r, $g, $b) < 0); } while (imagecolorexact($src, $r, $g, $b) < 0);
$ns = $s * $q; $ns = $s * $q;

View File

@ -66,7 +66,7 @@ class PlatformModel extends Model
} }
foreach ($platformsData as $slug => $platform) { foreach ($platformsData as $slug => $platform) {
if (! in_array($slug, $knownSlugs)) { if (! in_array($slug, $knownSlugs, true)) {
$found[] = new Platform([ $found[] = new Platform([
'podcast_id' => $podcastId, 'podcast_id' => $podcastId,
'slug' => $slug, 'slug' => $slug,

View File

@ -52,9 +52,9 @@ class PodcastImport extends BaseCommand
$importQueue = get_import_tasks(); $importQueue = get_import_tasks();
$currentImport = current(array_filter($importQueue, static function ($task): bool { $currentImport = current(
return $task->status === TaskStatus::Running; array_filter($importQueue, static fn ($task): bool => $task->status === TaskStatus::Running)
})); );
if ($currentImport instanceof PodcastImportTask) { if ($currentImport instanceof PodcastImportTask) {
$currentImport->syncWithProcess(); $currentImport->syncWithProcess();
@ -68,9 +68,7 @@ class PodcastImport extends BaseCommand
} }
// Get the next queued import // Get the next queued import
$queuedImports = array_filter($importQueue, static function ($task): bool { $queuedImports = array_filter($importQueue, static fn ($task): bool => $task->status === TaskStatus::Queued);
return $task->status === TaskStatus::Queued;
});
$nextImport = end($queuedImports); $nextImport = end($queuedImports);
if (! $nextImport instanceof PodcastImportTask) { if (! $nextImport instanceof PodcastImportTask) {
@ -527,9 +525,7 @@ class PodcastImport extends BaseCommand
->get() ->get()
->getResultArray(); ->getResultArray();
return array_map(static function (array $element) { return array_map(static fn (array $element) => $element['guid'], $result);
return $element['guid'];
}, $result);
} }
/** /**

View File

@ -26,11 +26,10 @@ if (! function_exists('get_import_tasks')) {
} }
if ($podcastHandle !== null) { if ($podcastHandle !== null) {
$podcastImportsQueue = array_filter($podcastImportsQueue, static function ($importTask) use ( $podcastImportsQueue = array_filter(
$podcastHandle $podcastImportsQueue,
): bool { static fn ($importTask): bool => $importTask->handle === $podcastHandle
return $importTask->handle === $podcastHandle; );
});
} }
usort($podcastImportsQueue, static function (PodcastImportTask $a, PodcastImportTask $b): int { usort($podcastImportsQueue, static function (PodcastImportTask $a, PodcastImportTask $b): int {

View File

@ -2,6 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
use Rector\CodeQuality\Rector\ClassMethod\ExplicitReturnNullRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector; use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector; use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
use Rector\CodingStyle\Rector\String_\SymplifyQuoteEscapeRector; use Rector\CodingStyle\Rector\String_\SymplifyQuoteEscapeRector;
@ -12,31 +13,22 @@ use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector;
use Rector\EarlyReturn\Rector\If_\ChangeOrIfContinueToMultiContinueRector; use Rector\EarlyReturn\Rector\If_\ChangeOrIfContinueToMultiContinueRector;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector; use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector; use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
use Rector\Set\ValueObject\SetList;
use Rector\ValueObject\PhpVersion; use Rector\ValueObject\PhpVersion;
return static function (RectorConfig $rectorConfig): void { return RectorConfig::configure()
$rectorConfig->paths([__DIR__ . '/app', __DIR__ . '/modules', __DIR__ . '/tests', __DIR__ . '/public']); ->withPaths([__DIR__ . '/app', __DIR__ . '/modules', __DIR__ . '/tests', __DIR__ . '/public'])
->withBootstrapFiles([__DIR__ . '/vendor/codeigniter4/framework/system/Test/bootstrap.php'])
// do you need to include constants, class aliases or custom autoloader? files listed will be executed ->withPhpVersion(PhpVersion::PHP_81)
$rectorConfig->bootstrapFiles([__DIR__ . '/vendor/codeigniter4/framework/system/Test/bootstrap.php']); ->withPhpSets(php81: true)
->withPreparedSets(
// Define what rule sets will be applied typeDeclarations: true,
$rectorConfig->sets([ codeQuality: true,
SetList::PHP_81, codingStyle: true,
SetList::TYPE_DECLARATION, earlyReturn: true,
SetList::CODE_QUALITY, deadCode: true,
SetList::CODING_STYLE, )
SetList::EARLY_RETURN, ->withImportNames(true, true, true, true)
SetList::DEAD_CODE, ->withSkip([
]);
// auto import fully qualified class names
$rectorConfig->importNames();
$rectorConfig->phpVersion(PhpVersion::PHP_81);
$rectorConfig->skip([
// .mp3 files were somehow processed by rector, so skip all media files // .mp3 files were somehow processed by rector, so skip all media files
__DIR__ . '/public/media/*', __DIR__ . '/public/media/*',
@ -50,6 +42,7 @@ return static function (RectorConfig $rectorConfig): void {
EncapsedStringsToSprintfRector::class, EncapsedStringsToSprintfRector::class,
RemoveExtraParametersRector::class, RemoveExtraParametersRector::class,
UnwrapFutureCompatibleIfPhpVersionRector::class, UnwrapFutureCompatibleIfPhpVersionRector::class,
ExplicitReturnNullRector::class,
// skip rule in specific directory // skip rule in specific directory
StringClassNameToClassConstantRector::class => [ StringClassNameToClassConstantRector::class => [
@ -65,9 +58,5 @@ return static function (RectorConfig $rectorConfig): void {
], ],
ChangeAndIfToEarlyReturnRector::class => [__DIR__ . '/modules/Install/Controllers/InstallController.php'], ChangeAndIfToEarlyReturnRector::class => [__DIR__ . '/modules/Install/Controllers/InstallController.php'],
]); ])
->withPHPStanConfigs([__DIR__ . '/phpstan.neon', 'vendor/codeigniter/phpstan-codeigniter/extension.neon']);
// 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']);
};

2
spark
View File

@ -1,6 +1,8 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
declare(strict_types=1);
/** /**
* This file is part of CodeIgniter 4 framework. * This file is part of CodeIgniter 4 framework.
* *

View File

@ -36,8 +36,6 @@ namespace Tests\Support\Libraries;
use Config\App; use Config\App;
/** /**
* Class ConfigReader
*
* An extension of BaseConfig that prevents the constructor from loading external values. Used to read actual local * An extension of BaseConfig that prevents the constructor from loading external values. Used to read actual local
* values from a config file. * values from a config file.
*/ */