Completed
Push — master ( b90e1d...11acf7 )
by Nelson
05:52
created

ToString   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 33
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A __toString() 0 4 1
A toString() 0 4 1
1
<?php
2
/**
3
 * PHP: Nelson Martell Library file
4
 *
5
 * Content:
6
 * - Class definition.
7
 *
8
 * Copyright © 2016-2017 Nelson Martell (http://nelson6e65.github.io)
9
 *
10
 * Licensed under The MIT License (MIT)
11
 * For full copyright and license information, please see the LICENSE
12
 * Redistributions of files must retain the above copyright notice.
13
 *
14
 * @copyright 2016-2017 Nelson Martell
15
 * @link      http://nelson6e65.github.io/php_nml/
16
 * @since     v0.6.0
17
 * @license   http://www.opensource.org/licenses/mit-license.php The MIT License (MIT)
18
 * */
19
20
namespace NelsonMartell\Test\DataProviders\ExampleClass;
21
22
use NelsonMartell\PropertiesHandler;
23
use NelsonMartell\IConvertibleToString;
24
25
/**
26
 * Example class to be used in PropertiesHandler test.
27
 * Not customized.
28
 *
29
 * Prefixes in member names:
30
 * 'property': using getter or setter;
31
 * 'attribute': direct access
32
 */
33
class ToString implements IConvertibleToString
34
{
35
    public function __construct()
36
    {
37
    }
38
39
    /**
40
     * @var int
41
     */
42
    public $x = -1;
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $x. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
43
44
    /**
45
     * @var int
46
     */
47
    public $y = 1;
0 ignored issues
show
Comprehensibility introduced by
Avoid variables with short names like $y. Configured minimum length is 3.

Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.

Loading history...
48
49
50
    /**
51
     * @inheritDoc
52
     */
53
    public function __toString()
54
    {
55
        return $this->toString();
56
    }
57
58
    /**
59
     * @inheritDoc
60
     */
61
    public function toString()
62
    {
63
        return $this->x.', '.$this->y;
64
    }
65
}
66