🤖 Auto commit for release 'develop' on 2026-01-23

This commit is contained in:
JC5
2026-01-23 15:14:29 +01:00
parent 8f15a32bd6
commit eeeba86d38
888 changed files with 10732 additions and 10387 deletions

View File

@@ -55,7 +55,7 @@ class TriggerController extends Controller
parent::__construct();
$this->middleware(function ($request, $next) {
/** @var User $user */
$user = auth()->user();
$user = auth()->user();
$this->ruleGroupRepository = app(RuleGroupRepositoryInterface::class);
$this->ruleGroupRepository->setUser($user);
@@ -72,14 +72,14 @@ class TriggerController extends Controller
*/
public function testGroup(TestRequest $request, RuleGroup $group): JsonResponse
{
$rules = $this->ruleGroupRepository->getActiveRules($group);
$rules = $this->ruleGroupRepository->getActiveRules($group);
if (0 === $rules->count()) {
throw new FireflyException('200023: No rules in this rule group.');
}
$parameters = $request->getTestParameters();
$parameters = $request->getTestParameters();
/** @var RuleEngineInterface $ruleEngine */
$ruleEngine = app(RuleEngineInterface::class);
$ruleEngine = app(RuleEngineInterface::class);
$ruleEngine->setRules($rules);
// overrule the rule(s) if necessary.
@@ -101,21 +101,21 @@ class TriggerController extends Controller
$count = $transactions->count();
// enrich
$enrichment = new TransactionGroupEnrichment();
$enrichment = new TransactionGroupEnrichment();
$enrichment->setUser($group->user);
$transactions = $enrichment->enrich($transactions);
$paginator = new LengthAwarePaginator($transactions, $count, 31337, $this->parameters->get('page'));
$paginator->setPath(route('api.v1.rule-groups.test', [$group->id]) . $this->buildParams());
$paginator = new LengthAwarePaginator($transactions, $count, 31337, $this->parameters->get('page'));
$paginator->setPath(route('api.v1.rule-groups.test', [$group->id]).$this->buildParams());
// resulting list is presented as JSON thing.
$manager = $this->getManager();
$manager = $this->getManager();
/** @var TransactionGroupTransformer $transformer */
$transformer = app(TransactionGroupTransformer::class);
$transformer = app(TransactionGroupTransformer::class);
$transformer->setParameters($this->parameters);
$resource = new FractalCollection($transactions, $transformer, 'transactions');
$resource = new FractalCollection($transactions, $transformer, 'transactions');
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
@@ -131,7 +131,7 @@ class TriggerController extends Controller
*/
public function triggerGroup(TriggerRequest $request, RuleGroup $group): JsonResponse
{
$rules = $this->ruleGroupRepository->getActiveRules($group);
$rules = $this->ruleGroupRepository->getActiveRules($group);
if (0 === $rules->count()) {
throw new FireflyException('200023: No rules in this rule group.');
}