Issues (109)

src/EoC/Info/ClientInfo.php (3 issues)

1
<?php
2
3
/**
4
 * @file ClientInfo.php
5
 * @brief This file contains the ClientInfo class.
6
 * @details
7
 * @author Filippo F. Fadda
8
 */
9
10
11
namespace EoC\Info;
12
13
14
use EoC\Couch;
15
use EoC\Version;
16
17
use Meta\Extension;
18
19
20
/**
21
 * @brief This is an information only purpose class. It's used by Couch::getClientInfo() method.
22
 * @details Since this class uses the `TProperty` trait, you don't need to call the getter methods to obtain
23
 * information about the client.
24
 * @nosubgrouping
25
 *
26
 * @cond HIDDEN_SYMBOLS
27
 *
28
 * @property string $version
29
 *
30
 * @endcond
31
 */
32
class ClientInfo {
33
  use Extension\TProperty;
34
35
  /** @name Properties */
36
  //!@{
0 ignored issues
show
Unused Code Comprehensibility introduced by
100% of this comment could be valid code. Did you maybe forget this after debugging?

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.

Loading history...
37
38
  //! @brief Client version.
39
  private $version;
40
41
  //!@}
0 ignored issues
show
Unused Code Comprehensibility introduced by
100% of this comment could be valid code. Did you maybe forget this after debugging?

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.

Loading history...
42
43
44
  /**
45
   * @brief Creates the object.
46
   */
47
  public function __construct() {
48
    $this->version = Couch::USER_AGENT_NAME." ".Version::getNumber();
49
  }
50
51
52
  /**
53
   * @brief Overrides the magic method to convert the object to a string.
54
   */
55
  public function __toString() {
56
    return $this->version.PHP_EOL;
57
  }
58
59
60
  //! @cond HIDDEN_SYMBOLS
61
62
  public function getVersion() {
63
    return $this->version;
64
  }
65
66
  //! @endcond
0 ignored issues
show
Unused Code Comprehensibility introduced by
50% of this comment could be valid code. Did you maybe forget this after debugging?

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.

Loading history...
67
68
}