Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Nov 1, 2023
1 parent aff8516 commit 4a19fbc
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/Data/UserPolicyData.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of fof/terms.
*
* Copyright (c) FriendsOfFlarum.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace FoF\Terms\Data;

use Blomstra\Gdpr\Data\Type;
Expand Down Expand Up @@ -35,16 +44,15 @@ protected function constructExportData(Policy $policy): array
$accepted_at = $userPolicies->has($policy->id) ? Carbon::parse($userPolicies->get($policy->id)->pivot->accepted_at) : null;
$has_update = !$accepted_at || (($policy->terms_updated_at !== null) && $policy->terms_updated_at->gt($accepted_at));


return [
'name' => $policy->name,
'url' => $policy->url,
'created_at' => $policy->created_at,
'update_message' => $policy->update_message,
'name' => $policy->name,
'url' => $policy->url,
'created_at' => $policy->created_at,
'update_message' => $policy->update_message,
'terms_updated_at' => $policy->terms_updated_at,
'accepted_at' => $accepted_at,
'has_update' => $has_update,
'must_accept' => $has_update && !$this->user->can('postponeAccept', $policy),
'accepted_at' => $accepted_at,
'has_update' => $has_update,
'must_accept' => $has_update && !$this->user->can('postponeAccept', $policy),
];
}

Expand Down

0 comments on commit 4a19fbc

Please sign in to comment.