Code Duplication    Length = 4-4 lines in 4 locations

src/Meta/Extension/TProperty.php 4 locations

@@ 21-24 (lines=4) @@
18
trait TProperty {
19
20
  public function __get($name) {
21
    if (method_exists($this, ($method = 'get'.ucfirst($name))))
22
      return $this->$method();
23
    else
24
      throw new \BadMethodCallException("Method $method is not implemented for property $name.");
25
  }
26
27
  public function __isset($name) {
@@ 28-31 (lines=4) @@
25
  }
26
27
  public function __isset($name) {
28
    if (method_exists($this, ($method = 'isset'.ucfirst($name))))
29
      return $this->$method();
30
    else
31
      throw new \BadMethodCallException("Method $method is not implemented for property $name.");
32
  }
33
34
  public function __set($name, $value) {
@@ 35-38 (lines=4) @@
32
  }
33
34
  public function __set($name, $value) {
35
    if (method_exists($this, ($method = 'set'.ucfirst($name))))
36
      $this->$method($value);
37
    else
38
      throw new \BadMethodCallException("Method $method is not implemented for property $name.");
39
  }
40
41
  public function __unset($name) {
@@ 42-45 (lines=4) @@
39
  }
40
41
  public function __unset($name) {
42
    if (method_exists($this, ($method = 'unset'.ucfirst($name))))
43
      $this->$method();
44
    else
45
      throw new \BadMethodCallException("Method $method is not implemented for property $name.");
46
  }
47
48
}