Total Complexity | 4 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
31 | class ServerInfo { |
||
32 | use Extension\TProperty; |
||
33 | |||
34 | /** @name Properties */ |
||
35 | //!@{ |
||
|
|||
36 | |||
37 | //! CouchDB MOTD (Message Of The Day). |
||
38 | private $motd; |
||
39 | |||
40 | //! CouchDB server version. |
||
41 | private $version; |
||
42 | |||
43 | //!@} |
||
44 | |||
45 | |||
46 | /** |
||
47 | * @brief Creates the object. |
||
48 | */ |
||
49 | public function __construct($motd, $version) { |
||
50 | $this->motd = $motd; |
||
51 | $this->version = "CouchDB ".$version; |
||
52 | } |
||
53 | |||
54 | |||
55 | /** |
||
56 | * @brief Overrides the magic method to convert the object to a string. |
||
57 | */ |
||
58 | public function __toString() { |
||
59 | return $this->motd.PHP_EOL.$this->version.PHP_EOL; |
||
60 | } |
||
61 | |||
62 | |||
63 | //! @cond HIDDEN_SYMBOLS |
||
64 | |||
65 | public function getMotd() { |
||
66 | return $this->motd; |
||
67 | } |
||
68 | |||
69 | |||
70 | public function getVersion() { |
||
72 | } |
||
73 | |||
74 | //! @endcond |
||
75 | |||
76 | } |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.