Skip to content

Commit

Permalink
cs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzmg committed Apr 7, 2023
1 parent 621cdfb commit aa12b15
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/EventListener/DataContainer/NewsOrderOptionsCallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,17 @@
use Contao\CoreBundle\ServiceAnnotation\Callback;
use Contao\DataContainer;
use Contao\System;
use InspiredMinds\ContaoNewsSorting\EventListener\ModuleDataContainerListener;

/**
* @Callback(table="tl_module", target="config.onload")
*/
class NewsOrderOptionsCallback
{
public function __invoke(DataContainer $dc): array
public function __invoke(DataContainer $dc): void
{
$callback = $GLOBALS['TL_DCA'][$dc->table]['news_order']['options_callback'] ?? static function(): array { return []; };
$callback = $GLOBALS['TL_DCA'][$dc->table]['news_order']['options_callback'] ?? static fn(): array => [];

$GLOBALS['TL_DCA'][$dc->table]['news_order']['options_callback'] = static function() use ($callback, $dc): array {
$GLOBALS['TL_DCA'][$dc->table]['news_order']['options_callback'] = static function () use ($callback, $dc): array {
$defaultOptions = [];

if (\is_callable($callback)) {
Expand Down

0 comments on commit aa12b15

Please sign in to comment.