From 84a6447fd4ed5b18a8ecb4b6c248d69567c4f543 Mon Sep 17 00:00:00 2001
From: Yassine Doghri
Date: Wed, 22 Feb 2023 16:29:45 +0000
Subject: [PATCH] ci: fix lint and formatting issues
---
.phpunit.cache/test-results | 2 +-
app/Config/Database.php | 3 -
app/Config/Events.php | 3 +-
app/Config/Pager.php | 2 -
app/Config/Services.php | 4 -
app/Controllers/ColorsController.php | 3 -
app/Controllers/EpisodeAudioController.php | 2 +-
app/Controllers/EpisodeCommentController.php | 8 +-
app/Controllers/EpisodeController.php | 8 +-
app/Controllers/PodcastController.php | 6 -
app/Controllers/PostController.php | 2 +-
app/Entities/Category.php | 3 -
app/Entities/Credit.php | 6 -
app/Entities/Episode.php | 2 +-
app/Entities/EpisodeComment.php | 5 -
app/Entities/Podcast.php | 3 -
app/Helpers/form_helper.php | 2 +-
app/Helpers/misc_helper.php | 1 -
app/Helpers/rss_helper.php | 10 +-
app/Libraries/Router.php | 1 -
app/Libraries/TranscriptParser.php | 1 -
app/Libraries/Vite/Vite.php | 5 +-
app/Models/ClipModel.php | 3 -
app/Models/EpisodeCommentModel.php | 2 -
app/Models/MediaModel.php | 7 -
app/Views/errors/html/error_exception.php | 20 +-
app/Views/pager/default_full.php | 24 ++-
.../Controllers/PodcastPlatformController.php | 2 +-
.../Admin/Controllers/SchedulerController.php | 1 -
.../Admin/Controllers/SoundbiteController.php | 2 +-
.../Controllers/VideoClipsController.php | 2 +-
modules/Analytics/Config/Routes.php | 4 +-
.../Entities/AnalyticsPodcastsByCountry.php | 3 -
.../Entities/AnalyticsPodcastsByRegion.php | 3 -
.../Controllers/ActivityPubController.php | 3 -
.../Fediverse/Controllers/ActorController.php | 14 --
.../Fediverse/Controllers/PostController.php | 6 -
modules/Fediverse/Models/PostModel.php | 2 +-
.../Install/Controllers/InstallController.php | 12 +-
.../Models/SubscriptionModel.php | 3 -
.../WebSub/Controllers/WebSubController.php | 1 -
tests/modules/Api/Rest/V1/PodcastTest.php | 7 +-
themes/cp_admin/_partials/_nav_header.php | 142 +++++++-------
themes/cp_admin/episode/_card.php | 32 ++--
themes/cp_admin/episode/_sidebar.php | 26 +--
themes/cp_admin/episode/create.php | 2 +-
themes/cp_admin/episode/edit.php | 28 +--
themes/cp_admin/episode/publish.php | 10 +-
themes/cp_admin/episode/publish_edit.php | 14 +-
themes/cp_admin/episode/view.php | 24 +--
themes/cp_admin/podcast/_sidebar.php | 20 +-
themes/cp_admin/podcast/analytics/index.php | 30 +--
.../podcast/analytics/listening_time.php | 20 +-
.../cp_admin/podcast/analytics/locations.php | 28 +--
themes/cp_admin/podcast/analytics/players.php | 50 ++---
.../podcast/analytics/time_periods.php | 18 +-
.../podcast/analytics/unique_listeners.php | 20 +-
.../cp_admin/podcast/analytics/webpages.php | 36 ++--
themes/cp_admin/podcast/create.php | 4 +-
themes/cp_admin/podcast/edit.php | 4 +-
themes/cp_admin/podcast/latest_episodes.php | 10 +-
themes/cp_admin/podcast/notifications.php | 60 +++---
themes/cp_admin/podcast/platforms.php | 94 ++++-----
themes/cp_admin/podcast/publish.php | 4 +-
themes/cp_admin/subscription/email/edited.php | 2 +-
.../cp_admin/subscription/email/welcome.php | 2 +-
themes/cp_admin/subscription/list.php | 180 +++++++++---------
themes/cp_app/_admin_navbar.php | 138 +++++++-------
themes/cp_app/_persons_modal.php | 22 +--
themes/cp_app/episode/_layout.php | 31 +--
.../episode/_partials/comment_actions.php | 52 ++---
.../_partials/comment_actions_from_post.php | 64 +++----
.../cp_app/episode/_partials/comment_card.php | 40 ++--
.../_partials/comment_reply_actions.php | 38 ++--
themes/cp_app/episode/comment.php | 6 +-
themes/cp_app/home.php | 52 ++---
themes/cp_app/pages/_layout.php | 12 +-
themes/cp_app/pages/map.php | 12 +-
themes/cp_app/podcast/_layout.php | 24 +--
.../podcast/_partials/funding_links_modal.php | 8 +-
.../podcast/_partials/premium_banner.php | 4 +-
themes/cp_app/podcast/_partials/sidebar.php | 62 +++---
themes/cp_app/podcast/about.php | 7 +-
themes/cp_app/podcast/episodes.php | 30 +--
themes/cp_app/post/_partials/actions.php | 178 ++++++++---------
.../post/_partials/post_with_replies.php | 22 +--
themes/cp_app/post/_partials/preview_card.php | 12 +-
themes/cp_app/post/_partials/reblog.php | 46 ++---
.../cp_app/post/_partials/reply_actions.php | 114 +++++------
themes/cp_app/post/post.php | 18 +-
themes/cp_auth/_layout.php | 8 +-
themes/cp_auth/register.php | 8 +-
themes/cp_install/cache_config.php | 12 +-
themes/cp_install/database_config.php | 8 +-
94 files changed, 987 insertions(+), 1104 deletions(-)
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) : ?>