GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (32)

src/Models/Traits/Updatable.php (3 issues)

1
<?php
2
3
namespace AloiaCms\Models\Traits;
4
5
use Carbon\Carbon;
6
7
trait Updatable
8
{
9
    /**
10
     * Set the update date
11
     *
12
     * @param Carbon $update_date
13
     * @return $this
14
     */
15 2
    public function setUpdateDate(Carbon $update_date)
16
    {
17 2
        $this->matter['update_date'] = $update_date->toDateTimeString();
0 ignored issues
show
Bug Best Practice introduced by
The property matter does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
18
        $this->has_changes = true;
0 ignored issues
show
Bug Best Practice introduced by
The property has_changes does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
19 2
20
        return $this;
21
    }
22
23
    /**
24
     * Get the update date
25
     *
26
     * @return Carbon|null
27 3
     */
28
    public function getUpdateDate()
29 3
    {
30 1
        if (!isset($this->matter['update_date']) || empty($this->matter['update_date'])) {
31
            return null;
32
        }
33 2
34
        return Carbon::createFromFormat('Y-m-d H:i:s', $this->matter['update_date']);
0 ignored issues
show
Bug Best Practice introduced by
The expression return Carbon\Carbon::cr...>matter['update_date']) could also return false which is incompatible with the documented return type Carbon\Carbon|null. Did you maybe forget to handle an error condition?

If the returned type also contains false, it is an indicator that maybe an error condition leading to the specific return statement remains unhandled.

Loading history...
35
    }
36
}
37