Code Duplication    Length = 11-11 lines in 2 locations

includes/classes/ContainerAccessors.php 1 location

@@ 83-93 (lines=11) @@
80
   *
81
   * @throws Exception
82
   */
83
  public function assignAccessor($varName, $type, $callable) {
84
    if (empty($callable)) {
85
      return;
86
    }
87
88
    if (is_callable($callable)) {
89
      $this->accessors[$varName][$type] = $callable;
90
    } else {
91
      throw new Exception('Error assigning callable in ' . get_called_class() . '! Callable typed [' . $type . '] is not a callable or not accessible in the scope');
92
    }
93
  }
94
95
  /**
96
   * Performs $processor operation on property with specified name

includes/classes/EntityModel.php 1 location

@@ 62-72 (lines=11) @@
59
   */
60
  protected $accessors = array();
61
62
  protected function assignAccessor($varName, $type, $callable) {
63
    if (empty($callable)) {
64
      return;
65
    }
66
67
    if (is_callable($callable)) {
68
      $this->accessors[$varName][$type] = $callable;
69
    } else {
70
      throw new \Exception('Error assigning callable in ' . get_called_class() . '! Callable typed [' . $type . '] is not a callable or not accessible in the scope');
71
    }
72
  }
73
74
75
  /**