Skip to content

Commit

Permalink
sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 committed Nov 27, 2024
1 parent f1a5d58 commit 0d10458
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Controller/Admin/ActivitiesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public function listAction(Request $request, CustomerProviderInterface $customer
*/
public function detailAction(Request $request): Response
{
$activity = \Pimcore::getContainer()->get('cmf.activity_store')->getEntryById($request->query->getInt('activityId'));
$activityId = $request->query->getInt('activityId');
$activity = \Pimcore::getContainer()->get('cmf.activity_store')->getEntryById($activityId);

return $this->render(
'@PimcoreCustomerManagementFramework/admin/activities/detail.html.twig',
Expand Down
3 changes: 2 additions & 1 deletion src/Controller/Admin/CustomersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,8 @@ protected function addFilterDefinitionSegments(Request $request, array $filters)
}

// set to filter which segments to show
$filters['showSegments'] = $request->query->getString('apply-segment-selection') ? $filters['showSegments'] : $filterDefinition->getShowSegments();
$segmentSelection = $request->query->getString('apply-segment-selection');
$filters['showSegments'] = $segmentSelection ? $filters['showSegments'] : $filterDefinition->getShowSegments();

// return merged filters array
return $filters;
Expand Down
2 changes: 1 addition & 1 deletion src/RESTApi/SegmentsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function updateRecord(Request $request)
return new Response(
[
'success' => false,
'msg' => sprintf('segment with id %s not found', $id),
'msg' => 'segment with id ' . $id . ' not found',
],
Response::RESPONSE_CODE_NOT_FOUND
);
Expand Down

0 comments on commit 0d10458

Please sign in to comment.