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

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