Completed
Push — master ( 8934bd...535042 )
by Ventaquil
02:34
created

AbstractPoint::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * @author ventaquil <[email protected]>
5
 * @licence MIT
6
 */
7
8
namespace PHPAlgorithms\GraphTools;
9
10
use PHPAlgorithms\GraphTools\Interfaces\PointInterface;
11
use PHPAlgorithms\GraphTools\Traits\MagicGet;
12
use PHPAlgorithms\GraphTools\Traits\toArray;
13
14
/**
15
 * Class AbstractPoint
16
 * @package PHPAlgorithms\GraphTools
17
 */
18
class AbstractPoint implements PointInterface {
19
    use MagicGet, toArray;
20
21
    /**
22
     * Do nothing. For higher dimensions.
23
     */
24
    public function move() { }
25
26
    /**
27
     * Method checks if sent variable is instance of the same object.
28
     *
29
     * @param mixed $point Variable to check.
30
     * @return boolean True if sent variable is the same object or false otherwise.
31
     */
32
    public function equals($point)
33
    {
34
        return $this === $point;
35
    }
36
37
    /**
38
     * Method returns lower dimension point.
39
     *
40
     * @return null Returns null.
41
     */
42
    public function lowerDimension()
43
    {
44
        return null;
45
    }
46
}
47