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.

DateTimeHelperTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 2
c 2
b 1
f 1
lcom 1
cbo 1
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDateTimeHelper() 0 7 2
1
<?php
2
/**
3
 * DateTime helper trait
4
 *
5
 * @author Kachit
6
 * @package Kachit\Helper
7
 */
8
namespace Kachit\Helper;
9
10
trait DateTimeHelperTrait
11
{
12
    /**
13
     * @var StringHelper
14
     */
15
    protected $DateTimeHelper;
16
17
    /**
18
     * Get date time helper
19
     *
20
     * @return DateTimeHelper
21
     */
22
    protected function getDateTimeHelper()
23
    {
24
        if(empty($this->DateTimeHelper)) {
25
            $this->DateTimeHelper = new DateTimeHelper();
0 ignored issues
show
Documentation Bug introduced by
It seems like new \Kachit\Helper\DateTimeHelper() of type object<Kachit\Helper\DateTimeHelper> is incompatible with the declared type object<Kachit\Helper\StringHelper> of property $DateTimeHelper.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
26
        }
27
        return $this->DateTimeHelper;
28
    }
29
}