Skip to content

Commit 83434f0

Browse files
committed
chore: skip Cell for static closure
1 parent 69d1438 commit 83434f0

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎structarmed.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* the LICENSE file that was distributed with this source code.
1212
*/
1313

14+
use Boundwize\StructArmed\Preset\Presets\CodeQualityPreset;
1415
use CodeIgniter\Cache\ResponseCache;
1516
use CodeIgniter\HTTP\CLIRequest;
1617
use CodeIgniter\HTTP\Header;
@@ -45,6 +46,9 @@
4546
__DIR__ . '/tests/system/Config/fixtures',
4647
],
4748
__DIR__ . '/system/ThirdParty',
49+
CodeQualityPreset::ANONYMOUS_FUNCTIONS_MUST_BE_STATIC => [
50+
__DIR__ . '/system/View/Cells/Cell.php',
51+
],
4852
])
4953
->cacheDirectory(is_dir('/tmp') ? '/tmp/structarmed' : null)
5054
->withPresets(Preset::PSR4(), Preset::CODEQUALITY())

‎system/View/Cells/Cell.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ final protected function view(?string $view, array $data = []): string
111111

112112
$foundView = current($candidateViews);
113113

114-
return (static function () use ($properties, $foundView): string {
114+
return (function () use ($properties, $foundView): string {
115115
extract($properties);
116116
ob_start();
117117
include $foundView;

0 commit comments

Comments
 (0)