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

@@ 91-102 (lines=12) @@
88
			}
89
		}
90
91
		public function __call( $name, $arguments ) {
92
			if (($name[0]==='_')) {
93
				$realName = substr($name, 1);
94
				if (ar_pinp::isAllowed($this, $realName)) {
95
					return call_user_func_array(array($this, $realName), $arguments);
96
				} else {
97
					trigger_error("Method $realName not found in class ".get_class($this), E_USER_WARNING);
98
				}
99
			} else {
100
				trigger_error("Method $name not found in class ".get_class($this), E_USER_WARNING);
101
			}
102
		}
103
104
		public function __get( $name ) {
105
			return $this->query->{$name};