Skip to content

Commit

Permalink
PHP Linting (Pint) - Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoyigi authored and github-actions[bot] committed May 11, 2024
1 parent 50cccb1 commit 3489c14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Models/Review.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static function findBy($saleType, $saleId)
return $saleTypeModel->find($saleId);
}

public static function leaveReview(Model $reviewable = null, array $data = [])
public static function leaveReview(?Model $reviewable = null, array $data = [])
{
throw_unless($reviewable->isCompleted(), new ApplicationException(
lang('igniter.local::default.review.alert_review_status_history')
Expand All @@ -103,8 +103,9 @@ public static function leaveReview(Model $reviewable = null, array $data = [])
$review->service = array_get($data, 'service', 0);
$review->review_text = array_get($data, 'review_text', '');

if (!array_get($data, 'review_status') && ReviewSettings::autoApproveReviews())
if (!array_get($data, 'review_status') && ReviewSettings::autoApproveReviews()) {
$review->review_status = true;
}

$review->save();

Expand Down

0 comments on commit 3489c14

Please sign in to comment.