Code Duplication    Length = 12-12 lines in 3 locations

lib/ar.php 1 location

@@ 243-254 (lines=12) @@
240
241
	class arBase {
242
243
		public function __call($name, $arguments) {
244
			if (($name[0]==='_')) {
245
				$realName = substr($name, 1);
246
				if (ar_pinp::isAllowed($this, $realName)) {
247
					return call_user_func_array(array($this, $realName), $arguments);
248
				} else {
249
					trigger_error("Method $realName not found in class ".get_class($this), E_USER_WARNING);
250
				}
251
			} else {
252
				trigger_error("Method $name not found in class ".get_class($this), E_USER_WARNING);
253
			}
254
		}
255
	}
256
257
	class arWrapper {

lib/ar/formats/csv.php 1 location

@@ 162-173 (lines=12) @@
159
			return ar_formats_csv::convertToArray( $this );
160
		}
161
162
		public function __call( $name, $arguments ) {
163
			if (($name[0]==='_')) {
164
				$realName = substr($name, 1);
165
				if (ar_pinp::isAllowed($this, $realName)) {
166
					return call_user_func_array(array($this, $realName), $arguments);
167
				} else {
168
					trigger_error("Method $realName not found in class ".get_class($this), E_USER_WARNING);
169
				}
170
			} else {
171
				trigger_error("Method $name not found in class ".get_class($this), E_USER_WARNING);
172
			}
173
		}
174
175
		public function configure( $name, $value ) {
176
			$this->configuration[$name] = $value;

lib/ar/url.php 1 location

@@ 121-132 (lines=12) @@
118
			parent::__construct( $arguments, ArrayObject::ARRAY_AS_PROPS );
119
		}
120
121
		public function __call( $name, $arguments ) {
122
			if (($name[0]==='_')) {
123
				$realName = substr($name, 1);
124
				if (ar_pinp::isAllowed($this, $realName)) {
125
					return call_user_func_array(array($this, $realName), $arguments);
126
				} else {
127
					trigger_error("Method $realName not found in class ".get_class($this), E_USER_WARNING);
128
				}
129
			} else {
130
				trigger_error("Method $name not found in class ".get_class($this), E_USER_WARNING);
131
			}
132
		}
133
134
		public function getvar( $name ) {
135
			return $this->offsetGet($name);