Skip to content

Commit

Permalink
chore: amend modifiers, prefer protected over private
Browse files Browse the repository at this point in the history
This makes the controller logic overridable
  • Loading branch information
pepijnolivier authored Sep 30, 2023
1 parent f11384d commit 09fb67a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Http/Controllers/FeedbackController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function store(Request $request)
], 201);
}

private function validates(Request $request)
protected function validates(Request $request)
{
return $request->validate([
'type' => [
Expand All @@ -36,7 +36,7 @@ private function validates(Request $request)
]);
}

private function storeFeedback($data, Request $request)
protected function storeFeedback($data, Request $request)
{
$feedback = new Feedback;
$feedback->type = $data['type'];
Expand All @@ -47,7 +47,7 @@ private function storeFeedback($data, Request $request)
return $feedback;
}

private function gatherUserInfo(Request $request)
protected function gatherUserInfo(Request $request)
{
return [
'url' => $request->server('HTTP_REFERER'),
Expand All @@ -59,12 +59,12 @@ private function gatherUserInfo(Request $request)
];
}

private function dispatchEvent(Feedback $feedback)
protected function dispatchEvent(Feedback $feedback)
{
event(new NewFeedback($feedback));
}

private function saveScreenshot($base64Screenshot = null)
protected function saveScreenshot($base64Screenshot = null)
{
if ($base64Screenshot and config('kustomer.screenshot')) {
$image = $base64Screenshot;
Expand Down

0 comments on commit 09fb67a

Please sign in to comment.