diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results
index 317399c1..9e9a42d9 100644
--- a/.phpunit.cache/test-results
+++ b/.phpunit.cache/test-results
@@ -1 +1 @@
-{"version":1,"defects":[],"times":{"Tests\\Database\\ExampleDatabaseTest::testModelFindAll":0.003,"Tests\\Database\\ExampleDatabaseTest::testSoftDeleteLeavesRow":0.004,"modules\\Api\\Rest\\V1\\PodcastTest::testList":0.033,"modules\\Api\\Rest\\V1\\PodcastTest::testView":0.004,"modules\\Api\\Rest\\V1\\PodcastTest::testViewNotFound":0.01,"modules\\Api\\Rest\\V1\\PodcastTest::testListEmpty":4.313,"Tests\\Session\\ExampleSessionTest::testSessionSimple":0,"HealthTest::testIsDefinedAppPath":0,"HealthTest::testBaseUrlHasBeenSet":0.005}}
\ No newline at end of file
+{"version":1,"defects":[],"times":{"Tests\\Database\\ExampleDatabaseTest::testModelFindAll":0.002,"Tests\\Database\\ExampleDatabaseTest::testSoftDeleteLeavesRow":0.002,"modules\\Api\\Rest\\V1\\PodcastTest::testList":0.008,"modules\\Api\\Rest\\V1\\PodcastTest::testView":0.003,"modules\\Api\\Rest\\V1\\PodcastTest::testViewNotFound":0.002,"modules\\Api\\Rest\\V1\\PodcastTest::testListEmpty":0.633,"Tests\\Session\\ExampleSessionTest::testSessionSimple":0,"HealthTest::testIsDefinedAppPath":0,"HealthTest::testBaseUrlHasBeenSet":0.001}}
\ No newline at end of file
diff --git a/app/Config/Database.php b/app/Config/Database.php
index dbafc1f2..7871428c 100644
--- a/app/Config/Database.php
+++ b/app/Config/Database.php
@@ -49,8 +49,6 @@ class Database extends Config
/**
* This database connection is used when running PHPUnit database tests.
*
- * @noRector StringClassNameToClassConstantRector
- *
* @var array
*/
public array $tests = [
@@ -84,7 +82,6 @@ class Database extends Config
// Ensure that we always set the database group to 'tests' if
// we are currently running an automated test suite, so that
// we don't overwrite live data on accident.
- /** @noRector RemoveAlwaysTrueIfConditionRector */
if (ENVIRONMENT === 'testing') {
$this->defaultGroup = 'tests';
}
diff --git a/app/Config/Events.php b/app/Config/Events.php
index 6d7f32bb..30419869 100644
--- a/app/Config/Events.php
+++ b/app/Config/Events.php
@@ -7,6 +7,7 @@ namespace Config;
use App\Entities\Actor;
use App\Entities\Post;
use App\Models\EpisodeModel;
+use CodeIgniter\Debug\Toolbar\Collectors\Database;
use CodeIgniter\Events\Events;
use CodeIgniter\Exceptions\FrameworkException;
@@ -47,7 +48,7 @@ Events::on('pre_system', static function () {
* If you delete, they will no longer be collected.
*/
if (CI_DEBUG && ! is_cli()) {
- Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect');
+ Events::on('DBQuery', Database::class . '::collect');
Services::toolbar()->respond();
}
});
diff --git a/app/Config/Pager.php b/app/Config/Pager.php
index b98b2d8f..6579aad1 100644
--- a/app/Config/Pager.php
+++ b/app/Config/Pager.php
@@ -21,8 +21,6 @@ class Pager extends BaseConfig
* and the desired group as $pagerGroup;
*
* @var array
- *
- * @noRector Rector\Php55\Rector\String_\StringClassNameToClassConstantRector
*/
public $templates = [
'default_full' => 'App\Views\pager\default_full',
diff --git a/app/Config/Services.php b/app/Config/Services.php
index 3fa2e092..48a3554d 100644
--- a/app/Config/Services.php
+++ b/app/Config/Services.php
@@ -27,8 +27,6 @@ class Services extends BaseService
/**
* The Router class uses a RouteCollection's array of routes, and determines the correct Controller and Method to
* execute.
- *
- * @noRector PHPStan\Reflection\MissingMethodFromReflectionException
*/
public static function router(
?RouteCollectionInterface $routes = null,
@@ -48,8 +46,6 @@ class Services extends BaseService
/**
* The Negotiate class provides the content negotiation features for working the request to determine correct
* language, encoding, charset, and more.
- *
- * @noRector PHPStan\Reflection\MissingMethodFromReflectionException
*/
public static function negotiator(?RequestInterface $request = null, bool $getShared = true): Negotiate
{
diff --git a/app/Controllers/ColorsController.php b/app/Controllers/ColorsController.php
index 50a44db8..87875a49 100644
--- a/app/Controllers/ColorsController.php
+++ b/app/Controllers/ColorsController.php
@@ -15,9 +15,6 @@ use CodeIgniter\HTTP\Response;
class ColorsController extends Controller
{
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function index(): Response
{
$cacheName = 'colors.css';
diff --git a/app/Controllers/EpisodeAudioController.php b/app/Controllers/EpisodeAudioController.php
index 8566c64a..6d2baf17 100644
--- a/app/Controllers/EpisodeAudioController.php
+++ b/app/Controllers/EpisodeAudioController.php
@@ -74,7 +74,7 @@ class EpisodeAudioController extends Controller
if (
($episode = (new EpisodeModel())->getEpisodeBySlug($params[0], $params[1])) === null
- ) {
+ ) {
throw PageNotFoundException::forPageNotFound();
}
diff --git a/app/Controllers/EpisodeCommentController.php b/app/Controllers/EpisodeCommentController.php
index 9aaf2b5a..9f0a67c8 100644
--- a/app/Controllers/EpisodeCommentController.php
+++ b/app/Controllers/EpisodeCommentController.php
@@ -55,7 +55,7 @@ class EpisodeCommentController extends BaseController
if (
($episode = (new EpisodeModel())->getEpisodeBySlug($params[0], $params[1])) === null
- ) {
+ ) {
throw PageNotFoundException::forPageNotFound();
}
@@ -120,9 +120,6 @@ class EpisodeCommentController extends BaseController
return $cachedView;
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function commentObject(): Response
{
$commentObject = new CommentObject($this->comment);
@@ -132,9 +129,6 @@ class EpisodeCommentController extends BaseController
->setBody($commentObject->toJSON());
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function replies(): Response
{
/**
diff --git a/app/Controllers/EpisodeController.php b/app/Controllers/EpisodeController.php
index 5b59cf55..455006ae 100644
--- a/app/Controllers/EpisodeController.php
+++ b/app/Controllers/EpisodeController.php
@@ -51,7 +51,7 @@ class EpisodeController extends BaseController
if (
($episode = (new EpisodeModel())->getEpisodeBySlug($params[0], $params[1])) === null
- ) {
+ ) {
throw PageNotFoundException::forPageNotFound();
}
@@ -274,9 +274,6 @@ class EpisodeController extends BaseController
return $this->response->setXML($oembed);
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function episodeObject(): Response
{
$podcastObject = new PodcastEpisode($this->episode);
@@ -286,9 +283,6 @@ class EpisodeController extends BaseController
->setBody($podcastObject->toJSON());
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function comments(): Response
{
/**
diff --git a/app/Controllers/PodcastController.php b/app/Controllers/PodcastController.php
index 06377d4b..7cc17a47 100644
--- a/app/Controllers/PodcastController.php
+++ b/app/Controllers/PodcastController.php
@@ -47,9 +47,6 @@ class PodcastController extends BaseController
return $this->{$method}(...$params);
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function podcastActor(): Response
{
$podcastActor = new PodcastActor($this->podcast);
@@ -285,9 +282,6 @@ class PodcastController extends BaseController
return $cachedView;
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function episodeCollection(): Response
{
if ($this->podcast->type === 'serial') {
diff --git a/app/Controllers/PostController.php b/app/Controllers/PostController.php
index b2bf8e8d..285603fe 100644
--- a/app/Controllers/PostController.php
+++ b/app/Controllers/PostController.php
@@ -45,7 +45,7 @@ class PostController extends FediversePostController
public function _remap(string $method, string ...$params): mixed
{
if (
- ($podcast = (new PodcastModel())->getPodcastByHandle($params[0],)) === null
+ ($podcast = (new PodcastModel())->getPodcastByHandle($params[0])) === null
) {
throw PageNotFoundException::forPageNotFound();
}
diff --git a/app/Entities/Category.php b/app/Entities/Category.php
index d7f57736..fd9ec35e 100644
--- a/app/Entities/Category.php
+++ b/app/Entities/Category.php
@@ -36,9 +36,6 @@ class Category extends Entity
'google_category' => 'string',
];
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function getParent(): ?self
{
if ($this->parent_id === null) {
diff --git a/app/Entities/Credit.php b/app/Entities/Credit.php
index dc12349d..358578b6 100644
--- a/app/Entities/Credit.php
+++ b/app/Entities/Credit.php
@@ -92,9 +92,6 @@ class Credit extends Entity
return $this->episode;
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function getGroupLabel(): string
{
if ($this->person_group === null) {
@@ -104,9 +101,6 @@ class Credit extends Entity
return lang("PersonsTaxonomy.persons.{$this->person_group}.label");
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function getRoleLabel(): string
{
if ($this->person_group === '') {
diff --git a/app/Entities/Episode.php b/app/Entities/Episode.php
index 12c20281..cf1fd027 100644
--- a/app/Entities/Episode.php
+++ b/app/Entities/Episode.php
@@ -450,7 +450,7 @@ class Episode extends Entity
public function getEmbedUrl(string $theme = null): string
{
return $theme
- ? url_to('embed-theme', esc($this->getPodcast()->handle), esc($this->attributes['slug']), $theme,)
+ ? url_to('embed-theme', esc($this->getPodcast()->handle), esc($this->attributes['slug']), $theme)
: url_to('embed', esc($this->getPodcast()->handle), esc($this->attributes['slug']));
}
diff --git a/app/Entities/EpisodeComment.php b/app/Entities/EpisodeComment.php
index 95deefb4..561f7d0b 100644
--- a/app/Entities/EpisodeComment.php
+++ b/app/Entities/EpisodeComment.php
@@ -87,8 +87,6 @@ class EpisodeComment extends UuidEntity
/**
* Returns the comment's actor
- *
- * @noRector ReturnTypeDeclarationRector
*/
public function getActor(): ?Actor
{
@@ -125,9 +123,6 @@ class EpisodeComment extends UuidEntity
return $this->getReplies() !== [];
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function getReplyToComment(): ?self
{
if ($this->in_reply_to_id === null) {
diff --git a/app/Entities/Podcast.php b/app/Entities/Podcast.php
index b9fb35a8..47c62e4d 100644
--- a/app/Entities/Podcast.php
+++ b/app/Entities/Podcast.php
@@ -215,9 +215,6 @@ class Podcast extends Entity
return '@' . $this->handle;
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function getActor(): ?Actor
{
if ($this->actor_id === 0) {
diff --git a/app/Helpers/form_helper.php b/app/Helpers/form_helper.php
index 85808f64..68238513 100644
--- a/app/Helpers/form_helper.php
+++ b/app/Helpers/form_helper.php
@@ -61,7 +61,7 @@ if (! function_exists('parse_form_attributes')) {
}
}
- if (! empty($attributes)) {
+ if ($attributes !== []) {
$default = array_merge($default, $attributes);
}
}
diff --git a/app/Helpers/misc_helper.php b/app/Helpers/misc_helper.php
index 22dbd172..e4a5dc93 100644
--- a/app/Helpers/misc_helper.php
+++ b/app/Helpers/misc_helper.php
@@ -239,7 +239,6 @@ if (! function_exists('generate_random_salt')) {
if (! function_exists('file_upload_max_size')) {
-
/**
* Returns a file size limit in bytes based on the PHP upload_max_filesize and post_max_size Adapted from:
* https://stackoverflow.com/a/25370978
diff --git a/app/Helpers/rss_helper.php b/app/Helpers/rss_helper.php
index 28d81e31..c4329f77 100644
--- a/app/Helpers/rss_helper.php
+++ b/app/Helpers/rss_helper.php
@@ -125,7 +125,7 @@ if (! function_exists('get_rss_feed')) {
$castopodSocialElement->addAttribute('accountUrl', $podcast->link);
foreach ($podcast->social_platforms as $socialPlatform) {
- $socialElement = $channel->addChild('social', null, $podcastNamespace,);
+ $socialElement = $channel->addChild('social', null, $podcastNamespace);
$socialElement->addAttribute('priority', '2');
$socialElement->addAttribute('platform', $socialPlatform->slug);
@@ -202,7 +202,7 @@ if (! function_exists('get_rss_feed')) {
foreach ($podcast->persons as $person) {
foreach ($person->roles as $role) {
- $personElement = $channel->addChild('person', $person->full_name, $podcastNamespace,);
+ $personElement = $channel->addChild('person', $person->full_name, $podcastNamespace);
$personElement->addAttribute('img', $person->avatar->medium_url);
@@ -294,7 +294,7 @@ if (! function_exists('get_rss_feed')) {
$item->addChild('guid', $episode->guid);
$item->addChild('pubDate', $episode->published_at->format(DATE_RFC1123));
if ($episode->location !== null) {
- $locationElement = $item->addChild('location', $episode->location->name, $podcastNamespace,);
+ $locationElement = $item->addChild('location', $episode->location->name, $podcastNamespace);
if ($episode->location->geo !== null) {
$locationElement->addAttribute('geo', $episode->location->geo);
}
@@ -376,11 +376,11 @@ if (! function_exists('get_rss_feed')) {
foreach ($episode->persons as $person) {
foreach ($person->roles as $role) {
- $personElement = $item->addChild('person', esc($person->full_name), $podcastNamespace,);
+ $personElement = $item->addChild('person', esc($person->full_name), $podcastNamespace);
$personElement->addAttribute(
'role',
- esc(lang("PersonsTaxonomy.persons.{$role->group}.roles.{$role->role}.label", [], 'en'),),
+ esc(lang("PersonsTaxonomy.persons.{$role->group}.roles.{$role->role}.label", [], 'en')),
);
$personElement->addAttribute(
diff --git a/app/Libraries/Router.php b/app/Libraries/Router.php
index f42f7491..6bb71997 100644
--- a/app/Libraries/Router.php
+++ b/app/Libraries/Router.php
@@ -30,7 +30,6 @@ class Router extends CodeIgniterRouter
*/
protected function checkRoutes(string $uri): bool
{
- /** @noRector RemoveExtraParametersRector */
$routes = $this->collection->getRoutes($this->collection->getHTTPVerb());
// Don't waste any time
diff --git a/app/Libraries/TranscriptParser.php b/app/Libraries/TranscriptParser.php
index c54fec4e..b0f7f364 100644
--- a/app/Libraries/TranscriptParser.php
+++ b/app/Libraries/TranscriptParser.php
@@ -86,7 +86,6 @@ class TranscriptParser
}
break;
-
}
}
diff --git a/app/Libraries/Vite/Vite.php b/app/Libraries/Vite/Vite.php
index e85a3b5b..57d7ddc0 100644
--- a/app/Libraries/Vite/Vite.php
+++ b/app/Libraries/Vite/Vite.php
@@ -70,7 +70,6 @@ class Vite
if (array_key_exists('imports', $manifestElement)) {
foreach ($manifestElement['imports'] as $importPath) {
if (array_key_exists($importPath, $this->manifestData)) {
-
// import css dependencies if any
if (array_key_exists('css', $this->manifestData[$importPath])) {
foreach ($this->manifestData[$importPath]['css'] as $cssFile) {
@@ -98,11 +97,11 @@ class Vite
'css' => <<
CODE_SAMPLE
-,
+ ,
'js' => <<
CODE_SAMPLE
-,
+ ,
default => '',
};
}
diff --git a/app/Models/ClipModel.php b/app/Models/ClipModel.php
index d4e01dcf..cd52b043 100644
--- a/app/Models/ClipModel.php
+++ b/app/Models/ClipModel.php
@@ -53,9 +53,6 @@ class ClipModel extends Model
'job_ended_at',
];
- /**
- * @noRector
- */
protected $returnType = BaseClip::class;
/**
diff --git a/app/Models/EpisodeCommentModel.php b/app/Models/EpisodeCommentModel.php
index 2c35b0c7..91479f09 100644
--- a/app/Models/EpisodeCommentModel.php
+++ b/app/Models/EpisodeCommentModel.php
@@ -195,8 +195,6 @@ class EpisodeCommentModel extends UuidModel
* Retrieves all published posts for a given episode ordered by publication date
*
* @return EpisodeComment[]
- *
- * @noRector ReturnTypeDeclarationRector
*/
public function getEpisodeComments(int $episodeId): array
{
diff --git a/app/Models/MediaModel.php b/app/Models/MediaModel.php
index 7acb9608..c35263ba 100644
--- a/app/Models/MediaModel.php
+++ b/app/Models/MediaModel.php
@@ -28,9 +28,6 @@ class MediaModel extends Model
*/
protected $table = 'media';
- /**
- * @noRector
- */
protected $returnType = Document::class;
/**
@@ -135,8 +132,6 @@ class MediaModel extends Model
/**
* @param Document|Audio|Video|Image|Transcript|Chapters $media
- *
- * @noRector ReturnTypeDeclarationRector
*/
public function saveMedia(object $media): int | false
{
@@ -150,8 +145,6 @@ class MediaModel extends Model
/**
* @param Document|Audio|Video|Image|Transcript|Chapters $media
- *
- * @noRector ReturnTypeDeclarationRector
*/
public function updateMedia(object $media): bool
{
diff --git a/app/Views/errors/html/error_exception.php b/app/Views/errors/html/error_exception.php
index e0723098..99ce24a0 100644
--- a/app/Views/errors/html/error_exception.php
+++ b/app/Views/errors/html/error_exception.php
@@ -70,7 +70,7 @@ $error_id = uniqid('error', true); ?>
} else {
echo esc(clean_path($row['file']) . ' : ' . $row['line']);
}
- ?>
+ ?>
{PHP internal code}
@@ -85,14 +85,14 @@ $error_id = uniqid('error', true); ?>
getParameters();
- }
+ $params = null;
+ // Reflection by name is not available for closure function
+ if (substr($row['function'], -1) !== '}') {
+ $mirror = isset($row['class']) ? new \ReflectionMethod($row['class'], $row['function']) : new \ReflectionFunction($row['function']);
+ $params = $mirror->getParameters();
+ }
- foreach ($row['args'] as $key => $value) : ?>
+ foreach ($row['args'] as $key => $value) : ?>
= esc(isset($params[$key]) ? '$' . $params[$key]->name : "#{$key}") ?>
= esc(print_r($value, true)) ?>
@@ -310,8 +310,8 @@ $error_id = uniqid('error', true); ?>
setStatusCode(http_response_code());
- ?>
+$response->setStatusCode(http_response_code());
+?>
diff --git a/app/Views/pager/default_full.php b/app/Views/pager/default_full.php
index 7d942e38..e82fefa8 100644
--- a/app/Views/pager/default_full.php
+++ b/app/Views/pager/default_full.php
@@ -11,18 +11,18 @@ $pager->setSurroundCount(2);
hasPreviousPage()): ?>
+ 'Pager.first',
+ ) ?>" class="block px-3 py-2 text-skin-muted hover:bg-highlight">
= lang('Pager.first') ?>
+ 'Pager.previous',
+ ) ?>" class="block px-3 py-2 text-skin-muted hover:bg-highlight">
= lang(
- 'Pager.previous',
-) ?>
+ 'Pager.previous',
+ ) ?>
@@ -34,9 +34,7 @@ $pager->setSurroundCount(2);
= $link['title'] ?>
-
+
= $link['title'] ?>
@@ -46,15 +44,15 @@ $pager->setSurroundCount(2);
hasNextPage()): ?>
+ 'Pager.next',
+ ) ?>" class="block px-3 py-2 text-skin-muted hover:bg-highlight">
= lang('Pager.next') ?>
+ 'Pager.last',
+ ) ?>" class="block px-3 py-2 text-skin-muted hover:bg-highlight">
= lang('Pager.last') ?>
diff --git a/modules/Admin/Controllers/PodcastPlatformController.php b/modules/Admin/Controllers/PodcastPlatformController.php
index 82cdfc77..46a94c9c 100644
--- a/modules/Admin/Controllers/PodcastPlatformController.php
+++ b/modules/Admin/Controllers/PodcastPlatformController.php
@@ -89,7 +89,7 @@ class PodcastPlatformController extends BaseController
array_key_exists('visible', $podcastPlatform) &&
$podcastPlatform['visible'] === 'yes',
'is_on_embed' =>
- array_key_exists('on_embed', $podcastPlatform,) && $podcastPlatform['on_embed'] === 'yes',
+ array_key_exists('on_embed', $podcastPlatform) && $podcastPlatform['on_embed'] === 'yes',
];
}
diff --git a/modules/Admin/Controllers/SchedulerController.php b/modules/Admin/Controllers/SchedulerController.php
index d13a29e4..9246557b 100644
--- a/modules/Admin/Controllers/SchedulerController.php
+++ b/modules/Admin/Controllers/SchedulerController.php
@@ -47,7 +47,6 @@ class SchedulerController extends Controller
// Loop through clips to generate them
foreach ($scheduledClips as $scheduledClip) {
try {
-
// set clip to pending
(new ClipModel())
->update($scheduledClip->id, [
diff --git a/modules/Admin/Controllers/SoundbiteController.php b/modules/Admin/Controllers/SoundbiteController.php
index e389e645..020785b7 100644
--- a/modules/Admin/Controllers/SoundbiteController.php
+++ b/modules/Admin/Controllers/SoundbiteController.php
@@ -117,7 +117,7 @@ class SoundbiteController extends BaseController
$newSoundbite = new Soundbite([
'title' => $this->request->getPost('title'),
'start_time' => (float) $this->request->getPost('start_time'),
- 'duration' => (float) $this->request->getPost('duration',),
+ 'duration' => (float) $this->request->getPost('duration'),
'type' => 'audio',
'status' => '',
'podcast_id' => $this->podcast->id,
diff --git a/modules/Admin/Controllers/VideoClipsController.php b/modules/Admin/Controllers/VideoClipsController.php
index 02ab95cf..cac087e5 100644
--- a/modules/Admin/Controllers/VideoClipsController.php
+++ b/modules/Admin/Controllers/VideoClipsController.php
@@ -165,7 +165,7 @@ class VideoClipsController extends BaseController
$videoClip = new VideoClip([
'title' => $this->request->getPost('title'),
'start_time' => (float) $this->request->getPost('start_time'),
- 'duration' => (float) $this->request->getPost('duration',),
+ 'duration' => (float) $this->request->getPost('duration'),
'theme' => $theme,
'format' => $this->request->getPost('format'),
'type' => 'video',
diff --git a/modules/Analytics/Config/Routes.php b/modules/Analytics/Config/Routes.php
index 0526f1d8..d6399e9d 100644
--- a/modules/Analytics/Config/Routes.php
+++ b/modules/Analytics/Config/Routes.php
@@ -57,8 +57,8 @@ $routes->group('', [
/**
* @deprecated Route for podcast audio file analytics (/audio/pack(podcast_id,episode_id,bytes_threshold,filesize,duration,date)/podcast_folder/filename.mp3)
*/
- $routes->head('audio/(:base64)/(:any)', 'EpisodeAnalyticsController::hit/$1/$2',);
- $routes->get('audio/(:base64)/(:any)', 'EpisodeAnalyticsController::hit/$1/$2',);
+ $routes->head('audio/(:base64)/(:any)', 'EpisodeAnalyticsController::hit/$1/$2');
+ $routes->get('audio/(:base64)/(:any)', 'EpisodeAnalyticsController::hit/$1/$2');
});
// Show the Unknown UserAgents
diff --git a/modules/Analytics/Entities/AnalyticsPodcastsByCountry.php b/modules/Analytics/Entities/AnalyticsPodcastsByCountry.php
index 30b9dfb5..60f9883d 100644
--- a/modules/Analytics/Entities/AnalyticsPodcastsByCountry.php
+++ b/modules/Analytics/Entities/AnalyticsPodcastsByCountry.php
@@ -39,9 +39,6 @@ class AnalyticsPodcastsByCountry extends Entity
'hits' => 'integer',
];
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function getLabels(): string
{
return lang('Countries.' . $this->attributes['labels']);
diff --git a/modules/Analytics/Entities/AnalyticsPodcastsByRegion.php b/modules/Analytics/Entities/AnalyticsPodcastsByRegion.php
index 5de71693..d359890e 100644
--- a/modules/Analytics/Entities/AnalyticsPodcastsByRegion.php
+++ b/modules/Analytics/Entities/AnalyticsPodcastsByRegion.php
@@ -44,9 +44,6 @@ class AnalyticsPodcastsByRegion extends Entity
'hits' => 'integer',
];
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function getCountryCode(): string
{
return lang('Countries.' . $this->attributes['country_code']);
diff --git a/modules/Fediverse/Controllers/ActivityPubController.php b/modules/Fediverse/Controllers/ActivityPubController.php
index fe94c9a1..d8fbbe86 100644
--- a/modules/Fediverse/Controllers/ActivityPubController.php
+++ b/modules/Fediverse/Controllers/ActivityPubController.php
@@ -15,9 +15,6 @@ use CodeIgniter\HTTP\Response;
class ActivityPubController extends Controller
{
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function preflight(): Response
{
return $this->response->setHeader('Access-Control-Allow-Origin', '*') // for allowing any domain, insecure
diff --git a/modules/Fediverse/Controllers/ActorController.php b/modules/Fediverse/Controllers/ActorController.php
index bf232890..e84250c4 100644
--- a/modules/Fediverse/Controllers/ActorController.php
+++ b/modules/Fediverse/Controllers/ActorController.php
@@ -56,9 +56,6 @@ class ActorController extends Controller
return $this->{$method}(...$params);
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function index(): ResponseInterface
{
$actorObjectClass = $this->config->actorObject;
@@ -71,8 +68,6 @@ class ActorController extends Controller
/**
* Handles incoming requests from fediverse servers
- *
- * @noRector ReturnTypeDeclarationRector
*/
public function inbox(): ResponseInterface
{
@@ -264,9 +259,6 @@ class ActorController extends Controller
}
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function outbox(): ResponseInterface
{
// get published activities by publication date
@@ -297,9 +289,6 @@ class ActorController extends Controller
->setBody($collection->toJSON());
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function followers(): ResponseInterface
{
$tablesPrefix = config('Fediverse')
@@ -386,9 +375,6 @@ class ActorController extends Controller
);
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function activity(string $activityId): ResponseInterface
{
if (
diff --git a/modules/Fediverse/Controllers/PostController.php b/modules/Fediverse/Controllers/PostController.php
index a00efb83..bf8d1b16 100644
--- a/modules/Fediverse/Controllers/PostController.php
+++ b/modules/Fediverse/Controllers/PostController.php
@@ -53,9 +53,6 @@ class PostController extends Controller
return $this->{$method}(...$params);
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function index(): Response
{
$noteObjectClass = $this->config->noteObject;
@@ -66,9 +63,6 @@ class PostController extends Controller
->setBody($noteObject->toJSON());
}
- /**
- * @noRector ReturnTypeDeclarationRector
- */
public function replies(): Response
{
/**
diff --git a/modules/Fediverse/Models/PostModel.php b/modules/Fediverse/Models/PostModel.php
index 2dec8b49..70ab5563 100644
--- a/modules/Fediverse/Models/PostModel.php
+++ b/modules/Fediverse/Models/PostModel.php
@@ -539,7 +539,7 @@ class PostModel extends BaseUuidModel
->first();
$announceActivity = new AnnounceActivity($reblogPost);
- $announceActivity->set('id', url_to('activity', $reblogPost->actor->username, $activity->id),);
+ $announceActivity->set('id', url_to('activity', $reblogPost->actor->username, $activity->id));
$undoActivity
->set('actor', $reblogPost->actor->uri)
diff --git a/modules/Install/Controllers/InstallController.php b/modules/Install/Controllers/InstallController.php
index 20cbc056..b9b88922 100644
--- a/modules/Install/Controllers/InstallController.php
+++ b/modules/Install/Controllers/InstallController.php
@@ -115,19 +115,13 @@ class InstallController extends Controller
}
try {
- $db = db_connect();
-
// Check if instance owner has been created, meaning install was completed
- if (
- $db->tableExists('users') &&
- (new UserModel())->where('is_owner', true)
- ->first() !== null
- ) {
+ if ((new UserModel())->where('is_owner', true)
+ ->first() !== null
+ ) {
// if so, show a 404 page
throw PageNotFoundException::forPageNotFound();
}
-
- /** @noRector */
} catch (DatabaseException) {
// Could not connect to the database
// show database config view to fix value
diff --git a/modules/PremiumPodcasts/Models/SubscriptionModel.php b/modules/PremiumPodcasts/Models/SubscriptionModel.php
index 5f79271a..ec5eb4eb 100644
--- a/modules/PremiumPodcasts/Models/SubscriptionModel.php
+++ b/modules/PremiumPodcasts/Models/SubscriptionModel.php
@@ -42,9 +42,6 @@ class SubscriptionModel extends Model
'updated_by',
];
- /**
- * @noRector
- */
protected $returnType = Subscription::class;
/**
diff --git a/modules/WebSub/Controllers/WebSubController.php b/modules/WebSub/Controllers/WebSubController.php
index 11a0a2d7..0ca59e9c 100644
--- a/modules/WebSub/Controllers/WebSubController.php
+++ b/modules/WebSub/Controllers/WebSubController.php
@@ -20,7 +20,6 @@ class WebSubController extends Controller
{
public function publish(): void
{
- /** @noRector RemoveAlwaysTrueIfConditionRector */
if (ENVIRONMENT !== 'production') {
return;
}
diff --git a/tests/modules/Api/Rest/V1/PodcastTest.php b/tests/modules/Api/Rest/V1/PodcastTest.php
index 6131ad90..d7e926a1 100644
--- a/tests/modules/Api/Rest/V1/PodcastTest.php
+++ b/tests/modules/Api/Rest/V1/PodcastTest.php
@@ -46,12 +46,9 @@ class PodcastTest extends CIUnitTestCase
private readonly string $podcastApiUrl;
- /**
- * @param array $data
- */
- public function __construct(?string $name = null, array $data = [], $dataName = '')
+ public function __construct(?string $name = null)
{
- parent::__construct($name, $data, $dataName);
+ parent::__construct($name);
$this->podcast = FakeSinglePodcastApiSeeder::podcast();
$this->podcast['created_at'] = [];
$this->podcast['updated_at'] = [];
diff --git a/themes/cp_admin/_partials/_nav_header.php b/themes/cp_admin/_partials/_nav_header.php
index d3ec1f3c..279bd1d2 100644
--- a/themes/cp_admin/_partials/_nav_header.php
+++ b/themes/cp_admin/_partials/_nav_header.php
@@ -8,13 +8,13 @@ $userPodcasts = get_podcasts_user_can_interact_with(auth()->user()); ?>
class="h-full pr-1 text-xl md:hidden focus:ring-accent focus:ring-inset" aria-label="= lang('Navigation.toggle_sidebar') ?>">= icon('menu') ?>
+ 'admin',
+ ) ?>" class="inline-flex items-center h-full px-2 border-r border-navigation focus:ring-inset focus:ring-accent">
= (isset($podcast) ? icon('arrow-left', 'mr-2') : '') . svg('castopod-logo-base', 'h-6') ?>
+ 'home',
+ ) ?>" class="inline-flex items-center h-full px-6 text-sm font-semibold hover:underline focus:ring-inset focus:ring-accent">
= lang('Navigation.go_to_website') ?>
= icon('external-link', 'ml-1 opacity-60') ?>
@@ -27,26 +27,26 @@ $userPodcasts = get_podcasts_user_can_interact_with(auth()->user()); ?>
'html',
- 'content' => esc(<<
'html',
+ 'content' => esc(<<{$notificationsTitle}
CODE_SAMPLE),
- ],
- ];
+ ],
+];
- if ($userPodcasts !== []) {
- foreach ($userPodcasts as $userPodcast) {
- $userPodcastTitle = esc($userPodcast->title);
+if ($userPodcasts !== []) {
+ foreach ($userPodcasts as $userPodcast) {
+ $userPodcastTitle = esc($userPodcast->title);
- $unreadNotificationDotDisplayClass = in_array($userPodcast->actor_id, $actorIdsWithUnreadNotifications, true) ? '' : 'hidden';
+ $unreadNotificationDotDisplayClass = in_array($userPodcast->actor_id, $actorIdsWithUnreadNotifications, true) ? '' : 'hidden';
- $items[] = [
- 'type' => 'link',
- 'title' => << 'link',
+ 'title' => <<
@@ -55,20 +55,20 @@ $userPodcasts = get_podcasts_user_can_interact_with(auth()->user()); ?>
{$userPodcastTitle}
CODE_SAMPLE
- ,
- 'uri' => route_to('notification-list', $userPodcast->id),
- ];
- }
- } else {
- $noNotificationsText = lang('Notifications.no_notifications');
- $items[] = [
- 'type' => 'html',
- 'content' => esc(<< route_to('notification-list', $userPodcast->id),
+ ];
+ }
+} else {
+ $noNotificationsText = lang('Notifications.no_notifications');
+ $items[] = [
+ 'type' => 'html',
+ 'content' => esc(<<{$noNotificationsText}
CODE_SAMPLE),
- ];
- }
- ?>
+ ];
+}
+?>
user()); ?>
= icon('caret-down', 'ml-auto text-2xl') ?>
actor_id ? icon('check', 'ml-2 bg-accent-base text-accent-contrast rounded-full') : '';
- $userPodcastTitle = esc($userPodcast->title);
+$interactButtons = '';
+foreach ($userPodcasts as $userPodcast) {
+ $checkMark = interact_as_actor_id() === $userPodcast->actor_id ? icon('check', 'ml-2 bg-accent-base text-accent-contrast rounded-full') : '';
+ $userPodcastTitle = esc($userPodcast->title);
- $interactButtons .= <<
{$userPodcastTitle} {$checkMark}
CODE_SAMPLE;
- }
+}
- $interactAsText = lang('Common.choose_interact');
- $interactAsRoute = route_to('interact-as-actor');
- $csrfField = csrf_field();
+$interactAsText = lang('Common.choose_interact');
+$interactAsRoute = route_to('interact-as-actor');
+$csrfField = csrf_field();
- $menuItems = [
- [
- 'type' => 'link',
- 'title' => lang('Navigation.account.my-account'),
- 'uri' => route_to('my-account'),
- ],
- [
- 'type' => 'link',
- 'title' => lang('Navigation.account.change-password'),
- 'uri' => route_to('change-password'),
- ],
- [
- 'type' => 'separator',
- ],
- [
- 'type' => 'link',
- 'title' => lang('Navigation.account.logout'),
- 'uri' => route_to('logout'),
- ],
- ];
+$menuItems = [
+ [
+ 'type' => 'link',
+ 'title' => lang('Navigation.account.my-account'),
+ 'uri' => route_to('my-account'),
+ ],
+ [
+ 'type' => 'link',
+ 'title' => lang('Navigation.account.change-password'),
+ 'uri' => route_to('change-password'),
+ ],
+ [
+ 'type' => 'separator',
+ ],
+ [
+ 'type' => 'link',
+ 'title' => lang('Navigation.account.logout'),
+ 'uri' => route_to('logout'),
+ ],
+];
- if ($userPodcasts !== []) {
- $menuItems = array_merge([
- [
- 'type' => 'html',
- 'content' => esc(<< 'html',
+ 'content' => esc(<<
{$interactAsText}
CODE_SAMPLE),
- ],
- [
- 'type' => 'separator',
- ],
- ], $menuItems);
- }
- ?>
+ ],
+ [
+ 'type' => 'separator',
+ ],
+ ], $menuItems);
+}
+?>
\ No newline at end of file
diff --git a/themes/cp_admin/episode/_card.php b/themes/cp_admin/episode/_card.php
index c46b30ae..eac048ef 100644
--- a/themes/cp_admin/episode/_card.php
+++ b/themes/cp_admin/episode/_card.php
@@ -53,23 +53,23 @@
'type' => 'separator',
],
];
- if ($episode->published_at === null) {
- $items[] = [
- 'type' => 'link',
- 'title' => lang('Episode.delete'),
- 'uri' => route_to('episode-delete', $episode->podcast->id, $episode->id),
- 'class' => 'font-semibold text-red-600',
- ];
- } else {
- $label = lang('Episode.delete');
- $icon = icon('forbid', 'mr-2');
- $title = lang('Episode.messages.unpublishBeforeDeleteTip');
- $items[] = [
- 'type' => 'html',
- 'content' => esc(<<published_at === null) {
+ $items[] = [
+ 'type' => 'link',
+ 'title' => lang('Episode.delete'),
+ 'uri' => route_to('episode-delete', $episode->podcast->id, $episode->id),
+ 'class' => 'font-semibold text-red-600',
+ ];
+} else {
+ $label = lang('Episode.delete');
+ $icon = icon('forbid', 'mr-2');
+ $title = lang('Episode.messages.unpublishBeforeDeleteTip');
+ $items[] = [
+ 'type' => 'html',
+ 'content' => esc(<<{$icon}{$label}
CODE_SAMPLE),
- ];
- } ?>
+ ];
+} ?>
\ No newline at end of file
diff --git a/themes/cp_admin/episode/_sidebar.php b/themes/cp_admin/episode/_sidebar.php
index fc3291e8..fe675faf 100644
--- a/themes/cp_admin/episode/_sidebar.php
+++ b/themes/cp_admin/episode/_sidebar.php
@@ -34,12 +34,12 @@ $podcastNavigation = [
@@ -49,19 +49,19 @@ $podcastNavigation = [
= icon($data['icon'], 'opacity-60 text-2xl mr-4') .
- lang('EpisodeNavigation.' . $section) ?>
+ lang('EpisodeNavigation.' . $section) ?>
diff --git a/themes/cp_admin/episode/create.php b/themes/cp_admin/episode/create.php
index 64e3f995..90aff523 100644
--- a/themes/cp_admin/episode/create.php
+++ b/themes/cp_admin/episode/create.php
@@ -32,7 +32,7 @@
name="cover"
label="= lang('Episode.form.cover') ?>"
hint="= lang('Episode.form.cover_hint') ?>"
- helper="= lang('Episode.form.cover_size_hint', ) ?>"
+ helper="= lang('Episode.form.cover_size_hint') ?>"
type="file"
accept=".jpg,.jpeg,.png" />
diff --git a/themes/cp_admin/episode/edit.php b/themes/cp_admin/episode/edit.php
index 346ec7da..55fe2fea 100644
--- a/themes/cp_admin/episode/edit.php
+++ b/themes/cp_admin/episode/edit.php
@@ -172,13 +172,13 @@
transcript) : ?>
= anchor(
- $episode->transcript->file_url,
- icon('file-download', 'mr-1 text-skin-muted text-xl') . lang('Episode.form.transcript_download'),
- [
- 'class' => 'flex-1 font-semibold hover:underline inline-flex items-center text-xs',
- 'download' => '',
- ],
- ) .
+ $episode->transcript->file_url,
+ icon('file-download', 'mr-1 text-skin-muted text-xl') . lang('Episode.form.transcript_download'),
+ [
+ 'class' => 'flex-1 font-semibold hover:underline inline-flex items-center text-xs',
+ 'download' => '',
+ ],
+ ) .
anchor(
route_to(
'transcript-delete',
@@ -227,13 +227,13 @@
chapters) : ?>
= anchor(
- $episode->chapters->file_url,
- icon('file-download', 'mr-1 text-skin-muted text-xl') . lang('Episode.form.chapters_download'),
- [
- 'class' => 'flex-1 font-semibold hover:underline inline-flex items-center text-xs',
- 'download' => '',
- ],
- ) .
+ $episode->chapters->file_url,
+ icon('file-download', 'mr-1 text-skin-muted text-xl') . lang('Episode.form.chapters_download'),
+ [
+ 'class' => 'flex-1 font-semibold hover:underline inline-flex items-center text-xs',
+ 'download' => '',
+ ],
+ ) .
anchor(
route_to(
'chapters-delete',
diff --git a/themes/cp_admin/episode/publish.php b/themes/cp_admin/episode/publish.php
index 50cc5049..264e73bd 100644
--- a/themes/cp_admin/episode/publish.php
+++ b/themes/cp_admin/episode/publish.php
@@ -47,11 +47,11 @@
= esc($episode->title) ?>
= episode_numbering(
- $episode->number,
- $episode->season_number,
- 'text-xs font-semibold text-skin-muted !no-underline border px-1 border-gray-500',
- true,
- ) ?>
+ $episode->number,
+ $episode->season_number,
+ 'text-xs font-semibold text-skin-muted !no-underline border px-1 border-gray-500',
+ true,
+ ) ?>
diff --git a/themes/cp_admin/episode/publish_edit.php b/themes/cp_admin/episode/publish_edit.php
index 216d1e70..797a131d 100644
--- a/themes/cp_admin/episode/publish_edit.php
+++ b/themes/cp_admin/episode/publish_edit.php
@@ -49,11 +49,11 @@
= esc($episode->title) ?>
= episode_numbering(
- $episode->number,
- $episode->season_number,
- 'text-xs font-semibold text-skin-muted !no-underline border px-1 border-gray-500',
- true,
- ) ?>
+ $episode->number,
+ $episode->season_number,
+ 'text-xs font-semibold text-skin-muted !no-underline border px-1 border-gray-500',
+ true,
+ ) ?>
= relative_time($episode->published_at) ?>
@@ -76,8 +76,8 @@
publication_status === 'published'): ?>
= lang(
- 'Episode.publish_form.publication_date',
- ) ?>
+ 'Episode.publish_form.publication_date',
+ ) ?>
= lang('Episode.publish_form.publication_method.now') ?>
+ 'analytics-filtered-data',
+ $podcast->id,
+ 'PodcastByEpisode',
+ 'ByDay',
+ $episode->id,
+ ) ?>"/>
+ 'analytics-filtered-data',
+ $podcast->id,
+ 'PodcastByEpisode',
+ 'ByMonth',
+ $episode->id,
+ ) ?>"/>
diff --git a/themes/cp_admin/podcast/_sidebar.php b/themes/cp_admin/podcast/_sidebar.php
index 360d531c..66798944 100644
--- a/themes/cp_admin/podcast/_sidebar.php
+++ b/themes/cp_admin/podcast/_sidebar.php
@@ -58,12 +58,12 @@ $counts = [
@@ -73,16 +73,16 @@ $counts = [
= icon($data['icon'], 'opacity-60 text-2xl mr-4') .
- lang('PodcastNavigation.' . $section) ?>
+ lang('PodcastNavigation.' . $section) ?>
id)); ?>
+ 'analytics-data',
+ $podcast->id,
+ 'Podcast',
+ 'ByDay',
+ ) ?>"/>
+ 'analytics-data',
+ $podcast->id,
+ 'Podcast',
+ 'ByMonth',
+ ) ?>"/>
+ 'analytics-data',
+ $podcast->id,
+ 'Podcast',
+ 'BandwidthByDay',
+ ) ?>"/>
= service('vite')
diff --git a/themes/cp_admin/podcast/analytics/listening_time.php b/themes/cp_admin/podcast/analytics/listening_time.php
index a835497a..362528ed 100644
--- a/themes/cp_admin/podcast/analytics/listening_time.php
+++ b/themes/cp_admin/podcast/analytics/listening_time.php
@@ -12,18 +12,18 @@
+ 'analytics-data',
+ $podcast->id,
+ 'Podcast',
+ 'TotalListeningTimeByDay',
+ ) ?>"/>
+ 'analytics-data',
+ $podcast->id,
+ 'Podcast',
+ 'TotalListeningTimeByMonth',
+ ) ?>"/>
= service('vite')
diff --git a/themes/cp_admin/podcast/analytics/locations.php b/themes/cp_admin/podcast/analytics/locations.php
index 2e009430..b5544184 100644
--- a/themes/cp_admin/podcast/analytics/locations.php
+++ b/themes/cp_admin/podcast/analytics/locations.php
@@ -12,22 +12,22 @@
+ 'analytics-data',
+ $podcast->id,
+ 'PodcastByCountry',
+ 'Weekly',
+ ) ?>" />
+ 'analytics-data',
+ $podcast->id,
+ 'PodcastByCountry',
+ 'Yearly',
+ ) ?>" />
+ 'analytics-full-data',
+ $podcast->id,
+ 'PodcastByRegion',
+ ) ?>" />
diff --git a/themes/cp_admin/podcast/analytics/players.php b/themes/cp_admin/podcast/analytics/players.php
index 38be6fa0..f728ca78 100644
--- a/themes/cp_admin/podcast/analytics/players.php
+++ b/themes/cp_admin/podcast/analytics/players.php
@@ -12,35 +12,35 @@
+ 'analytics-data',
+ $podcast->id,
+ 'PodcastByPlayer',
+ 'ByAppWeekly',
+ ) ?>" />
+ 'analytics-data',
+ $podcast->id,
+ 'PodcastByService',
+ 'ByServiceWeekly',
+ ) ?>" />
+ 'analytics-data',
+ $podcast->id,
+ 'PodcastByPlayer',
+ 'ByDeviceWeekly',
+ ) ?>" />
+ 'analytics-data',
+ $podcast->id,
+ 'PodcastByPlayer',
+ 'ByOsWeekly',
+ ) ?>" />
+ 'analytics-data',
+ $podcast->id,
+ 'PodcastByPlayer',
+ 'Bots',
+ ) ?>" />
= service('vite')
diff --git a/themes/cp_admin/podcast/analytics/time_periods.php b/themes/cp_admin/podcast/analytics/time_periods.php
index 46a4db2f..bd656741 100644
--- a/themes/cp_admin/podcast/analytics/time_periods.php
+++ b/themes/cp_admin/podcast/analytics/time_periods.php
@@ -12,16 +12,16 @@
+ 'analytics-data',
+ $podcast->id,
+ 'Podcast',
+ 'ByWeekday',
+ ) ?>" />
+ 'analytics-full-data',
+ $podcast->id,
+ 'PodcastByHour',
+ ) ?>" />
= service('vite')
diff --git a/themes/cp_admin/podcast/analytics/unique_listeners.php b/themes/cp_admin/podcast/analytics/unique_listeners.php
index d4de1c72..29b40cab 100644
--- a/themes/cp_admin/podcast/analytics/unique_listeners.php
+++ b/themes/cp_admin/podcast/analytics/unique_listeners.php
@@ -12,18 +12,18 @@
+ 'analytics-data',
+ $podcast->id,
+ 'Podcast',
+ 'UniqueListenersByDay',
+ ) ?>"/>
+ 'analytics-data',
+ $podcast->id,
+ 'Podcast',
+ 'UniqueListenersByMonth',
+ ) ?>"/>
= service('vite')
diff --git a/themes/cp_admin/podcast/analytics/webpages.php b/themes/cp_admin/podcast/analytics/webpages.php
index 9ede392b..82acfd5c 100644
--- a/themes/cp_admin/podcast/analytics/webpages.php
+++ b/themes/cp_admin/podcast/analytics/webpages.php
@@ -12,27 +12,27 @@
+ 'analytics-data',
+ $podcast->id,
+ 'WebsiteByReferer',
+ 'ByDomainWeekly',
+ ) ?>" />
+ 'analytics-data',
+ $podcast->id,
+ 'WebsiteByReferer',
+ 'ByDomainYearly',
+ ) ?>" />
+ 'analytics-full-data',
+ $podcast->id,
+ 'WebsiteByEntryPage',
+ ) ?>" />
+ 'analytics-full-data',
+ $podcast->id,
+ 'WebsiteByBrowser',
+ ) ?>" />
diff --git a/themes/cp_admin/podcast/create.php b/themes/cp_admin/podcast/create.php
index 74492e18..330f9426 100644
--- a/themes/cp_admin/podcast/create.php
+++ b/themes/cp_admin/podcast/create.php
@@ -111,11 +111,11 @@
= lang('Podcast.form.parental_advisory.clean', ) ?>
+ isChecked="false" >= lang('Podcast.form.parental_advisory.clean') ?>
= lang('Podcast.form.parental_advisory.explicit', ) ?>
+ isChecked="false" >= lang('Podcast.form.parental_advisory.explicit') ?>
diff --git a/themes/cp_admin/podcast/edit.php b/themes/cp_admin/podcast/edit.php
index 4995fd7f..794e446c 100644
--- a/themes/cp_admin/podcast/edit.php
+++ b/themes/cp_admin/podcast/edit.php
@@ -128,11 +128,11 @@
= lang('Podcast.form.parental_advisory.clean', ) ?>
+ isChecked="= $podcast->parental_advisory === 'clean' ? 'true' : 'false' ?>" >= lang('Podcast.form.parental_advisory.clean') ?>
= lang('Podcast.form.parental_advisory.explicit', ) ?>
+ isChecked="= $podcast->parental_advisory === 'explicit' ? 'true' : 'false' ?>" >= lang('Podcast.form.parental_advisory.explicit') ?>
diff --git a/themes/cp_admin/podcast/latest_episodes.php b/themes/cp_admin/podcast/latest_episodes.php
index 337005c6..6070dff7 100644
--- a/themes/cp_admin/podcast/latest_episodes.php
+++ b/themes/cp_admin/podcast/latest_episodes.php
@@ -2,9 +2,9 @@
= lang('Podcast.latest_episodes') ?>
+ 'episode-list',
+ $podcast->id,
+ ) ?>" class="inline-flex items-center text-sm underline hover:no-underline focus:ring-accent">
= lang('Podcast.see_all_episodes') ?>
= icon('chevron-right', 'ml-2') ?>
@@ -13,8 +13,8 @@
= view('episode/_card', [
- 'episode' => $episode,
- ]) ?>
+ 'episode' => $episode,
+ ]) ?>
diff --git a/themes/cp_admin/podcast/notifications.php b/themes/cp_admin/podcast/notifications.php
index 3b960d0b..025d1a8c 100644
--- a/themes/cp_admin/podcast/notifications.php
+++ b/themes/cp_admin/podcast/notifications.php
@@ -19,47 +19,47 @@
read_at === null ? 'bg-heading-background' : 'bg-base';
- ?>
+ $backgroundColor = $notification->read_at === null ? 'bg-heading-background' : 'bg-base';
+ ?>
post_id !== null ? $notification->post : null;
+ $post = $notification->post_id !== null ? $notification->post : null;
- $actorUsername = '@' . esc($notification->actor
- ->username) .
- ($notification->actor->is_local
- ? ''
- : '@' . esc($notification->actor->domain));
+ $actorUsername = '@' . esc($notification->actor
+ ->username) .
+ ($notification->actor->is_local
+ ? ''
+ : '@' . esc($notification->actor->domain));
- $actorUsernameHtml = <<
{$actorUsername}
CODE_SAMPLE;
- $targetActorUsername = '@' . esc($notification->target_actor->username);
+ $targetActorUsername = '@' . esc($notification->target_actor->username);
- $targetActorUsernameHtml = <<{$targetActorUsername}
CODE_SAMPLE;
- $notificationTitle = match ($notification->type) {
- 'reply' => lang('Notifications.reply', [
- 'actor_username' => $actorUsernameHtml,
- ], null, false),
- 'like' => lang('Notifications.favourite', [
- 'actor_username' => $actorUsernameHtml,
- ], null, false),
- 'share' => lang('Notifications.reblog', [
- 'actor_username' => $actorUsernameHtml,
- ], null, false),
- 'follow' => lang('Notifications.follow', [
- 'actor_username' => $actorUsernameHtml,
- ], null, false),
- default => '',
- };
- $notificationContent = $post !== null ? $post->message_html : null;
+ $notificationTitle = match ($notification->type) {
+ 'reply' => lang('Notifications.reply', [
+ 'actor_username' => $actorUsernameHtml,
+ ], null, false),
+ 'like' => lang('Notifications.favourite', [
+ 'actor_username' => $actorUsernameHtml,
+ ], null, false),
+ 'share' => lang('Notifications.reblog', [
+ 'actor_username' => $actorUsernameHtml,
+ ], null, false),
+ 'follow' => lang('Notifications.follow', [
+ 'actor_username' => $actorUsernameHtml,
+ ], null, false),
+ default => '',
+ };
+ $notificationContent = $post !== null ? $post->message_html : null;
- $postLink = $post !== null ? route_to('post', esc($podcast->handle), $post->id) : route_to('podcast-activity', esc($podcast->handle));
- $link = $notification->read_at !== null ? $postLink : route_to('notification-mark-as-read', $podcast->id, $notification->id);
+ $postLink = $post !== null ? route_to('post', esc($podcast->handle), $post->id) : route_to('podcast-activity', esc($podcast->handle));
+ $link = $notification->read_at !== null ? $postLink : route_to('notification-mark-as-read', $podcast->id, $notification->id);
?>
@@ -76,7 +76,7 @@
'follow' => icon('user-follow', 'text-violet-500 text-base'),
default => '',
};
- ?>
+ ?>
= $icon ?>
diff --git a/themes/cp_admin/podcast/platforms.php b/themes/cp_admin/podcast/platforms.php
index 45771d39..511cb080 100644
--- a/themes/cp_admin/podcast/platforms.php
+++ b/themes/cp_admin/podcast/platforms.php
@@ -23,28 +23,28 @@
submit_url === ''): ?>
= icon(
- esc($platform->slug),
- 'text-skin-muted text-4xl',
- $platform->type
-) ?>
+ esc($platform->slug),
+ 'text-skin-muted text-4xl',
+ $platform->type
+ ) ?>
= anchor(
- $platform->submit_url,
- icon(
- esc($platform->slug),
- 'text-skin-muted text-4xl',
- $platform->type
- ),
- [
- 'class' => 'text-skin-muted hover:text-skin-base',
- 'target' => '_blank',
- 'rel' => 'noopener noreferrer',
- 'data-tooltip' => 'bottom',
- 'title' => lang('Platforms.submit_url', [
- 'platformName' => $platform->label,
- ]),
- ],
-) ?>
+ $platform->submit_url,
+ icon(
+ esc($platform->slug),
+ 'text-skin-muted text-4xl',
+ $platform->type
+ ),
+ [
+ 'class' => 'text-skin-muted hover:text-skin-base',
+ 'target' => '_blank',
+ 'rel' => 'noopener noreferrer',
+ 'data-tooltip' => 'bottom',
+ 'title' => lang('Platforms.submit_url', [
+ 'platformName' => $platform->label,
+ ]),
+ ],
+ ) ?>
= anchor($platform->home_url, icon('external-link', 'mx-auto'), [
@@ -57,37 +57,37 @@
]),
]) ?>
= $platform->submit_url
- ? anchor($platform->submit_url, icon('add', 'mx-auto'), [
- 'class' => 'flex-1 text-skin-muted hover:text-skin-base',
- 'target' => '_blank',
- 'rel' => 'noopener noreferrer',
- 'data-tooltip' => 'bottom',
- 'title' => lang('Platforms.submit_url', [
- 'platformName' => $platform->label,
- ]),
- ])
- : '' ?>
+ ? anchor($platform->submit_url, icon('add', 'mx-auto'), [
+ 'class' => 'flex-1 text-skin-muted hover:text-skin-base',
+ 'target' => '_blank',
+ 'rel' => 'noopener noreferrer',
+ 'data-tooltip' => 'bottom',
+ 'title' => lang('Platforms.submit_url', [
+ 'platformName' => $platform->label,
+ ]),
+ ])
+ : '' ?>
= $platform->link_url
- ? anchor(
- route_to(
- 'podcast-platform-remove',
- $podcast->id,
- esc($platform->slug),
- ),
- icon('delete-bin', 'mx-auto'),
- [
- 'class' =>
- 'absolute right-0 p-1 bg-red-100 rounded-full text-red-700 hover:text-red-900',
- 'data-tooltip' => 'bottom',
- 'title' => lang('Platforms.remove', [
- 'platformName' => $platform->label,
- ]),
- ],
- )
- : '' ?>
+ ? anchor(
+ route_to(
+ 'podcast-platform-remove',
+ $podcast->id,
+ esc($platform->slug),
+ ),
+ icon('delete-bin', 'mx-auto'),
+ [
+ 'class' =>
+ 'absolute right-0 p-1 bg-red-100 rounded-full text-red-700 hover:text-red-900',
+ 'data-tooltip' => 'bottom',
+ 'title' => lang('Platforms.remove', [
+ 'platformName' => $platform->label,
+ ]),
+ ],
+ )
+ : '' ?>
= $platform->label ?>
= lang(
- 'Podcast.publish_form.publication_date',
-) ?>
+ 'Podcast.publish_form.publication_date',
+ ) ?>
= lang('Podcast.publish_form.publication_method.now') ?>
expires_at): ?>
podcast->language_code, IntlDateFormatter::LONG, IntlDateFormatter::LONG);
- $translatedDate = $subscription->expires_at->toLocalizedString($formatter->getPattern());
+ $translatedDate = $subscription->expires_at->toLocalizedString($formatter->getPattern());
?>
= lang('Subscription.emails.edited_expires', [
'podcastTitle' => '
' . $subscription->podcast->title . ' ',
diff --git a/themes/cp_admin/subscription/email/welcome.php b/themes/cp_admin/subscription/email/welcome.php
index 8fa9c848..73b5fc32 100644
--- a/themes/cp_admin/subscription/email/welcome.php
+++ b/themes/cp_admin/subscription/email/welcome.php
@@ -11,7 +11,7 @@
expires_at): ?>
podcast->language_code, IntlDateFormatter::LONG, IntlDateFormatter::LONG);
- $translatedDate = $subscription->expires_at->toLocalizedString($formatter->getPattern());
+ $translatedDate = $subscription->expires_at->toLocalizedString($formatter->getPattern());
?>
= lang('Subscription.emails.welcome_expires', ['
' . $translatedDate . ' '], $subscription->podcast->language_code, false) ?>
diff --git a/themes/cp_admin/subscription/list.php b/themes/cp_admin/subscription/list.php
index c63833a6..db3b1791 100644
--- a/themes/cp_admin/subscription/list.php
+++ b/themes/cp_admin/subscription/list.php
@@ -32,99 +32,99 @@
= data_table(
- [
- [
- 'header' => lang('Subscription.list.number'),
- 'cell' => function ($subscription) {
- return '#' . $subscription->id;
- },
- ],
- [
- 'header' => lang('Subscription.list.email'),
- 'cell' => function ($subscription) {
- return esc($subscription->email);
- },
- ],
- [
- 'header' => lang('Subscription.list.expiration_date'),
- 'cell' => function ($subscription) {
- return $subscription->expires_at ? local_date($subscription->expires_at) : lang('Subscription.list.unlimited');
- },
- ],
- [
- 'header' => lang('Subscription.list.downloads'),
- 'cell' => function ($subscription) {
- return $subscription->downloads_last_3_months;
- },
- ],
- [
- 'header' => lang('Subscription.list.status'),
- 'cell' => function ($subscription) {
- $statusMapping = [
- 'active' => 'success',
- 'suspended' => 'warning',
- 'expired' => 'default',
- ];
+ [
+ [
+ 'header' => lang('Subscription.list.number'),
+ 'cell' => function ($subscription) {
+ return '#' . $subscription->id;
+ },
+ ],
+ [
+ 'header' => lang('Subscription.list.email'),
+ 'cell' => function ($subscription) {
+ return esc($subscription->email);
+ },
+ ],
+ [
+ 'header' => lang('Subscription.list.expiration_date'),
+ 'cell' => function ($subscription) {
+ return $subscription->expires_at ? local_date($subscription->expires_at) : lang('Subscription.list.unlimited');
+ },
+ ],
+ [
+ 'header' => lang('Subscription.list.downloads'),
+ 'cell' => function ($subscription) {
+ return $subscription->downloads_last_3_months;
+ },
+ ],
+ [
+ 'header' => lang('Subscription.list.status'),
+ 'cell' => function ($subscription) {
+ $statusMapping = [
+ 'active' => 'success',
+ 'suspended' => 'warning',
+ 'expired' => 'default',
+ ];
- return '
' . lang('Subscription.status.' . $subscription->status) . ' ';
- },
- ],
- [
- 'header' => lang('Common.actions'),
- 'cell' => function ($subscription, $podcast) {
- $items = [
- [
- 'type' => 'link',
- 'title' => lang('Subscription.view'),
- 'uri' => route_to('subscription-view', $podcast->id, $subscription->id),
- ],
- [
- 'type' => 'link',
- 'title' => lang('Subscription.edit'),
- 'uri' => route_to('subscription-edit', $podcast->id, $subscription->id),
- ],
- [
- 'type' => 'link',
- 'title' => lang('Subscription.regenerate_token'),
- 'uri' => route_to('subscription-regenerate-token', $podcast->id, $subscription->id),
- ],
- [
- 'type' => 'separator',
- ],
- [
- 'type' => 'link',
- 'title' => lang('Subscription.delete'),
- 'uri' => route_to('subscription-delete', $podcast->id, $subscription->id),
- 'class' => 'font-semibold text-red-600',
- ],
- ];
+ return '
' . lang('Subscription.status.' . $subscription->status) . ' ';
+ },
+ ],
+ [
+ 'header' => lang('Common.actions'),
+ 'cell' => function ($subscription, $podcast) {
+ $items = [
+ [
+ 'type' => 'link',
+ 'title' => lang('Subscription.view'),
+ 'uri' => route_to('subscription-view', $podcast->id, $subscription->id),
+ ],
+ [
+ 'type' => 'link',
+ 'title' => lang('Subscription.edit'),
+ 'uri' => route_to('subscription-edit', $podcast->id, $subscription->id),
+ ],
+ [
+ 'type' => 'link',
+ 'title' => lang('Subscription.regenerate_token'),
+ 'uri' => route_to('subscription-regenerate-token', $podcast->id, $subscription->id),
+ ],
+ [
+ 'type' => 'separator',
+ ],
+ [
+ 'type' => 'link',
+ 'title' => lang('Subscription.delete'),
+ 'uri' => route_to('subscription-delete', $podcast->id, $subscription->id),
+ 'class' => 'font-semibold text-red-600',
+ ],
+ ];
- if ($subscription->status === 'suspended') {
- $suspendAction = [[
- 'type' => 'link',
- 'title' => lang('Subscription.resume'),
- 'uri' => route_to('subscription-resume', $podcast->id, $subscription->id),
- ]];
- } else {
- $suspendAction = [[
- 'type' => 'link',
- 'title' => lang('Subscription.suspend'),
- 'uri' => route_to('subscription-suspend', $podcast->id, $subscription->id),
- ]];
- }
+ if ($subscription->status === 'suspended') {
+ $suspendAction = [[
+ 'type' => 'link',
+ 'title' => lang('Subscription.resume'),
+ 'uri' => route_to('subscription-resume', $podcast->id, $subscription->id),
+ ]];
+ } else {
+ $suspendAction = [[
+ 'type' => 'link',
+ 'title' => lang('Subscription.suspend'),
+ 'uri' => route_to('subscription-suspend', $podcast->id, $subscription->id),
+ ]];
+ }
- array_splice($items, 3, 0, $suspendAction);
+ array_splice($items, 3, 0, $suspendAction);
- return '
' .
- icon('more') .
- ' ' .
- '';
- },
- ],
- ],
- $podcast->subscriptions,
- '',
- $podcast,
- ) ?>
+ return '
' .
+ icon('more') .
+ ' ' .
+ '';
+ },
+ ],
+ ],
+ $podcast->subscriptions,
+ '',
+ $podcast,
+) ?>
= $this->endSection() ?>
diff --git a/themes/cp_app/_admin_navbar.php b/themes/cp_app/_admin_navbar.php
index f17ea0d8..8e31084e 100644
--- a/themes/cp_app/_admin_navbar.php
+++ b/themes/cp_app/_admin_navbar.php
@@ -7,7 +7,7 @@ $userPodcasts = get_podcasts_user_can_interact_with(auth()->user()); ?>
= svg('castopod-logo-base', 'h-6') ?>
-
+
= lang('Navigation.go_to_admin') ?>
= icon('external-link', 'ml-1 opacity-60') ?>
@@ -23,24 +23,24 @@ $userPodcasts = get_podcasts_user_can_interact_with(auth()->user()); ?>
'html',
- 'content' => esc(<<
'html',
+ 'content' => esc(<<{$notificationsTitle}
CODE_SAMPLE),
- ],
- ];
+ ],
+];
- if ($userPodcasts !== []) {
- foreach ($userPodcasts as $userPodcast) {
- $userPodcastTitle = esc($userPodcast->title);
+if ($userPodcasts !== []) {
+ foreach ($userPodcasts as $userPodcast) {
+ $userPodcastTitle = esc($userPodcast->title);
- $unreadNotificationDotDisplayClass = in_array($userPodcast->actor_id, $actorIdsWithUnreadNotifications, true) ? '' : 'hidden';
+ $unreadNotificationDotDisplayClass = in_array($userPodcast->actor_id, $actorIdsWithUnreadNotifications, true) ? '' : 'hidden';
- $items[] = [
- 'type' => 'link',
- 'title' => << 'link',
+ 'title' => <<
@@ -49,20 +49,20 @@ $userPodcasts = get_podcasts_user_can_interact_with(auth()->user()); ?>
{$userPodcastTitle}
CODE_SAMPLE
- ,
- 'uri' => route_to('notification-list', $userPodcast->id),
- ];
- }
- } else {
- $noNotificationsText = lang('Notifications.no_notifications');
- $items[] = [
- 'type' => 'html',
- 'content' => esc(<< route_to('notification-list', $userPodcast->id),
+ ];
+ }
+} else {
+ $noNotificationsText = lang('Notifications.no_notifications');
+ $items[] = [
+ 'type' => 'html',
+ 'content' => esc(<<{$noNotificationsText}
CODE_SAMPLE),
- ];
- }
- ?>
+ ];
+}
+?>
user()); ?>
= esc(auth()->user()->username) ?>
= icon('caret-down', 'ml-auto text-2xl') ?>
user(), $userPodcast->id, 'interact-as')) {
- $checkMark = interact_as_actor_id() === $userPodcast->actor_id ? icon('check', 'ml-2 bg-accent-base text-accent-contrast rounded-full') : '';
- $userPodcastTitle = esc($userPodcast->title);
+$interactButtons = '';
+foreach ($userPodcasts as $userPodcast) {
+ if (can_podcast(auth()->user(), $userPodcast->id, 'interact-as')) {
+ $checkMark = interact_as_actor_id() === $userPodcast->actor_id ? icon('check', 'ml-2 bg-accent-base text-accent-contrast rounded-full') : '';
+ $userPodcastTitle = esc($userPodcast->title);
- $interactButtons .= <<
{$userPodcastTitle} {$checkMark}
CODE_SAMPLE;
- }
- }
+ }
+}
- $interactAsText = lang('Common.choose_interact');
- $interactAsRoute = route_to('interact-as-actor');
- $csrfField = csrf_field();
+$interactAsText = lang('Common.choose_interact');
+$interactAsRoute = route_to('interact-as-actor');
+$csrfField = csrf_field();
- $menuItems = [
- [
- 'type' => 'link',
- 'title' => lang('Navigation.account.my-account'),
- 'uri' => route_to('my-account'),
- ],
- [
- 'type' => 'link',
- 'title' => lang('Navigation.account.change-password'),
- 'uri' => route_to('change-password'),
- ],
- [
- 'type' => 'separator',
- ],
- [
- 'type' => 'link',
- 'title' => lang('Navigation.account.logout'),
- 'uri' => route_to('logout'),
- ],
- ];
+$menuItems = [
+ [
+ 'type' => 'link',
+ 'title' => lang('Navigation.account.my-account'),
+ 'uri' => route_to('my-account'),
+ ],
+ [
+ 'type' => 'link',
+ 'title' => lang('Navigation.account.change-password'),
+ 'uri' => route_to('change-password'),
+ ],
+ [
+ 'type' => 'separator',
+ ],
+ [
+ 'type' => 'link',
+ 'title' => lang('Navigation.account.logout'),
+ 'uri' => route_to('logout'),
+ ],
+];
- if ($userPodcasts !== []) {
- $menuItems = array_merge([
- [
- 'type' => 'html',
- 'content' => esc(<< 'html',
+ 'content' => esc(<<
{$interactAsText}
CODE_SAMPLE),
- ],
- [
- 'type' => 'separator',
- ],
- ], $menuItems);
- }
- ?>
+ ],
+ [
+ 'type' => 'separator',
+ ],
+ ], $menuItems);
+}
+?>
\ No newline at end of file
diff --git a/themes/cp_app/_persons_modal.php b/themes/cp_app/_persons_modal.php
index 6294fe90..237fefee 100644
--- a/themes/cp_app/_persons_modal.php
+++ b/themes/cp_app/_persons_modal.php
@@ -27,17 +27,17 @@
= implode(
- ', ',
- array_map(function ($role) {
- return lang(
- 'PersonsTaxonomy.persons.' .
- $role->group .
- '.roles.' .
- $role->role .
- '.label',
- );
- }, $person->roles),
-) ?>
+ ', ',
+ array_map(function ($role) {
+ return lang(
+ 'PersonsTaxonomy.persons.' .
+ $role->group .
+ '.roles.' .
+ $role->role .
+ '.label',
+ );
+ }, $person->roles),
+ ) ?>
diff --git a/themes/cp_app/episode/_layout.php b/themes/cp_app/episode/_layout.php
index 48e1a0ed..8bf65fd3 100644
--- a/themes/cp_app/episode/_layout.php
+++ b/themes/cp_app/episode/_layout.php
@@ -63,18 +63,18 @@
= anchor_popup(
- route_to('follow', esc($podcast->handle)),
- icon(
- 'social/castopod',
- 'mr-2 text-xl text-black/75 group-hover:text-black',
- ) . lang('Podcast.follow'),
- [
- 'width' => 420,
- 'height' => 620,
- 'class' =>
- 'group inline-flex items-center px-3 leading-8 text-xs tracking-wider font-semibold text-black uppercase rounded-full shadow focus:ring-accent bg-white',
- ],
- ) ?>
+ route_to('follow', esc($podcast->handle)),
+ icon(
+ 'social/castopod',
+ 'mr-2 text-xl text-black/75 group-hover:text-black',
+ ) . lang('Podcast.follow'),
+ [
+ 'width' => 420,
+ 'height' => 620,
+ 'class' =>
+ 'group inline-flex items-center px-3 leading-8 text-xs tracking-wider font-semibold text-black uppercase rounded-full shadow focus:ring-accent bg-white',
+ ],
+ ) ?>
@@ -98,9 +98,10 @@
persons as $person): ?>
-
+
= lang('Episode.persons', [
diff --git a/themes/cp_app/episode/_partials/comment_actions.php b/themes/cp_app/episode/_partials/comment_actions.php
index 0272c769..d978fa15 100644
--- a/themes/cp_app/episode/_partials/comment_actions.php
+++ b/themes/cp_app/episode/_partials/comment_actions.php
@@ -3,41 +3,41 @@
replies_count): ?>
= anchor(
- route_to('episode-comment', esc($comment->episode->podcast->handle), esc($comment->episode->slug), $comment->id),
- icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
- 'numberOfReplies' => $comment->replies_count,
- ]),
- [
- 'class' => 'inline-flex items-center text-xs hover:underline',
- ]
-) ?>
+ route_to('episode-comment', esc($comment->episode->podcast->handle), esc($comment->episode->slug), $comment->id),
+ icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
+ 'numberOfReplies' => $comment->replies_count,
+ ]),
+ [
+ 'class' => 'inline-flex items-center text-xs hover:underline',
+ ]
+ ) ?>
= icon('heart', 'text-xl mr-1 text-skin-muted') . $comment->likes_count ?>
+ 'Comment.like',
+ [
+ 'numberOfLikes' => $comment->likes_count,
+ ],
+ ) ?>">= icon('heart', 'text-xl mr-1 text-skin-muted') . $comment->likes_count ?>
replies_count): ?>
= anchor(
- route_to('episode-comment', esc($comment->episode->podcast->handle), esc($comment->episode->slug), $comment->id),
- icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
- 'numberOfReplies' => $comment->replies_count,
- ]),
- [
- 'class' => 'inline-flex items-center text-xs hover:underline',
- ]
-) ?>
+ route_to('episode-comment', esc($comment->episode->podcast->handle), esc($comment->episode->slug), $comment->id),
+ icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
+ 'numberOfReplies' => $comment->replies_count,
+ ]),
+ [
+ 'class' => 'inline-flex items-center text-xs hover:underline',
+ ]
+ ) ?>
diff --git a/themes/cp_app/episode/_partials/comment_actions_from_post.php b/themes/cp_app/episode/_partials/comment_actions_from_post.php
index 803b53b6..1cf35210 100644
--- a/themes/cp_app/episode/_partials/comment_actions_from_post.php
+++ b/themes/cp_app/episode/_partials/comment_actions_from_post.php
@@ -3,47 +3,47 @@
replies_count): ?>
= anchor(
- route_to('post', esc($podcast->handle), $comment->id),
- icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
- 'numberOfReplies' => $comment->replies_count,
- ]),
- [
- 'class' => 'inline-flex items-center text-xs hover:underline',
- ]
-) ?>
+ route_to('post', esc($podcast->handle), $comment->id),
+ icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
+ 'numberOfReplies' => $comment->replies_count,
+ ]),
+ [
+ 'class' => 'inline-flex items-center text-xs hover:underline',
+ ]
+ ) ?>
= anchor_popup(
- route_to('post-remote-action', esc($podcast->handle), $comment->id, 'favourite'),
- icon('heart', 'text-xl mr-1 opacity-40') . $comment->likes_count,
- [
- 'class' => 'inline-flex items-center hover:underline',
- 'width' => 420,
- 'height' => 620,
- 'title' => lang('Post.favourites', [
- 'numberOfFavourites' => $comment->likes_count,
- ]),
- ],
-) ?>
+ route_to('post-remote-action', esc($podcast->handle), $comment->id, 'favourite'),
+ icon('heart', 'text-xl mr-1 opacity-40') . $comment->likes_count,
+ [
+ 'class' => 'inline-flex items-center hover:underline',
+ 'width' => 420,
+ 'height' => 620,
+ 'title' => lang('Post.favourites', [
+ 'numberOfFavourites' => $comment->likes_count,
+ ]),
+ ],
+ ) ?>
replies_count): ?>
= anchor(
- route_to('post', esc($podcast->handle), $comment->id),
- icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
- 'numberOfReplies' => $comment->replies_count,
- ]),
- [
- 'class' => 'inline-flex items-center text-xs hover:underline',
- ]
-) ?>
+ route_to('post', esc($podcast->handle), $comment->id),
+ icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
+ 'numberOfReplies' => $comment->replies_count,
+ ]),
+ [
+ 'class' => 'inline-flex items-center text-xs hover:underline',
+ ]
+ ) ?>
diff --git a/themes/cp_app/episode/_partials/comment_card.php b/themes/cp_app/episode/_partials/comment_card.php
index bb937715..eac26a0f 100644
--- a/themes/cp_app/episode/_partials/comment_card.php
+++ b/themes/cp_app/episode/_partials/comment_card.php
@@ -25,29 +25,29 @@
= csrf_field() ?>
= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . lang(
- 'Comment.likes',
- [
- 'numberOfLikes' => $comment->likes_count,
- ],
- ) ?>
+ 'Comment.likes',
+ [
+ 'numberOfLikes' => $comment->likes_count,
+ ],
+ ) ?>">= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . lang(
+ 'Comment.likes',
+ [
+ 'numberOfLikes' => $comment->likes_count,
+ ],
+ ) ?>
= icon('heart', 'text-xl mr-1 text-skin-muted') . lang(
- 'Comment.likes',
- [
- 'numberOfLikes' => $comment->likes_count,
- ],
- ) ?>
+ 'Comment.likes',
+ [
+ 'numberOfLikes' => $comment->likes_count,
+ ],
+ ) ?>">= icon('heart', 'text-xl mr-1 text-skin-muted') . lang(
+ 'Comment.likes',
+ [
+ 'numberOfLikes' => $comment->likes_count,
+ ],
+ ) ?>
diff --git a/themes/cp_app/episode/_partials/comment_reply_actions.php b/themes/cp_app/episode/_partials/comment_reply_actions.php
index 837f73d5..f4f3464e 100644
--- a/themes/cp_app/episode/_partials/comment_reply_actions.php
+++ b/themes/cp_app/episode/_partials/comment_reply_actions.php
@@ -4,31 +4,31 @@
= csrf_field() ?>
= icon('heart', 'text-lg mr-1 text-gray-400 group-hover:text-red-600') . $reply->likes_count ?>
+ 'Comment.likes',
+ [
+ 'numberOfLikes' => $reply->likes_count,
+ ],
+ ) ?>">= icon('heart', 'text-lg mr-1 text-gray-400 group-hover:text-red-600') . $reply->likes_count ?>
= lang('Comment.reply') ?>
= icon('heart', 'text-lg mr-1 text-skin-muted') . $reply->likes_count ?>
+ 'Comment.likes',
+ [
+ 'numberOfLikes' => $reply->likes_count,
+ ],
+ ) ?>">= icon('heart', 'text-lg mr-1 text-skin-muted') . $reply->likes_count ?>
replies_count): ?>
= anchor(
- route_to('episode-comment', esc($reply->episode->podcast->handle), esc($reply->episode->slug), $reply->id),
- icon('chat', 'text-2xl mr-1 opacity-40') . $reply->replies_count,
- [
- 'class' => 'inline-flex items-center hover:underline',
- 'title' => lang('Comment.replies', [
- 'numberOfReplies' => $reply->replies_count,
- ]),
- ],
-) ?>
+ route_to('episode-comment', esc($reply->episode->podcast->handle), esc($reply->episode->slug), $reply->id),
+ icon('chat', 'text-2xl mr-1 opacity-40') . $reply->replies_count,
+ [
+ 'class' => 'inline-flex items-center hover:underline',
+ 'title' => lang('Comment.replies', [
+ 'numberOfReplies' => $reply->replies_count,
+ ]),
+ ],
+ ) ?>
diff --git a/themes/cp_app/episode/comment.php b/themes/cp_app/episode/comment.php
index 18d26a11..a7a54ce6 100644
--- a/themes/cp_app/episode/comment.php
+++ b/themes/cp_app/episode/comment.php
@@ -5,9 +5,9 @@
= icon(
- 'arrow-left',
- 'mr-2 text-lg',
-) . lang('Comment.back_to_comments') ?>
+ 'arrow-left',
+ 'mr-2 text-lg',
+ ) . lang('Comment.back_to_comments') ?>
= $this->include('episode/_partials/comment_with_replies') ?>
diff --git a/themes/cp_app/home.php b/themes/cp_app/home.php
index b04f2994..aa6eedda 100644
--- a/themes/cp_app/home.php
+++ b/themes/cp_app/home.php
@@ -39,8 +39,8 @@
= $this->renderSection(
- 'title',
- ) ?>
+ 'title',
+ ) ?>
= view('_message_block') ?>
= $this->renderSection('content') ?>
diff --git a/themes/cp_auth/register.php b/themes/cp_auth/register.php
index c8eeccc2..af5e06df 100644
--- a/themes/cp_auth/register.php
+++ b/themes/cp_auth/register.php
@@ -53,10 +53,10 @@
= lang(
- 'Auth.haveAccount',
-) ?> = lang('Auth.login') ?>
+ 'Auth.haveAccount',
+ ) ?> = lang('Auth.login') ?>
= $this->endSection() ?>
diff --git a/themes/cp_install/cache_config.php b/themes/cp_install/cache_config.php
index abc477e0..093f3e16 100644
--- a/themes/cp_install/cache_config.php
+++ b/themes/cp_install/cache_config.php
@@ -12,8 +12,8 @@
= lang(
- 'Install.form.cache_config_hint',
-) ?>
+ 'Install.form.cache_config_hint',
+ ) ?>
lang('Install.form.cacheHandlerOptions.file'),
+ 'redis' => lang('Install.form.cacheHandlerOptions.redis'),
+ 'predis' => lang('Install.form.cacheHandlerOptions.predis'),
+ ])) ?>"
selected="file"
required="true" />
diff --git a/themes/cp_install/database_config.php b/themes/cp_install/database_config.php
index 90a4f550..2357d659 100644
--- a/themes/cp_install/database_config.php
+++ b/themes/cp_install/database_config.php
@@ -9,13 +9,13 @@
2/4
= lang(
- 'Install.form.database_config',
-) ?>
+ 'Install.form.database_config',
+ ) ?>
= lang(
- 'Install.form.database_config_hint',
-) ?>
+ 'Install.form.database_config_hint',
+ ) ?>