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.
Test Setup Failed
Push — master ( d82979...8d3b0f )
by Vinicius
02:03
created

src/Point.php (2 issues)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Viny;
4
5
/**
6
 * Class Point
7
 * @package Uello\ValueObject
8
 */
9
class Point
10
{
11
    /**
12
     * @param float $latitude
13
     * @param float $longitude
14
     */
15
    public function __construct(float $latitude, float $longitude)
16
    {
17
        $this->latitude  = $latitude;
0 ignored issues
show
The property latitude does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
18
        $this->longitude = $longitude;
0 ignored issues
show
The property longitude does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
19
    }
20
21
    /**
22
     * @return float
23
     */
24
    public function getLatitude(): float
25
    {
26
        return $this->latitude;
27
    }
28
29
    /**
30
     * @return float
31
     */
32
    public function getLongitude(): float
33
    {
34
        return $this->longitude;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function __toString(): string
41
    {
42
        return sprintf('POINT(%f %f)', $this->latitude, $this->longitude);
43
    }
44
}
45