Code Duplication    Length = 5-5 lines in 2 locations

framework/Web/UI/TTemplate.php 2 locations

@@ 816-820 (lines=5) @@
813
				} else {
814
					// a simple property
815
					if (! ($class->hasMethod('set' . $name) || $class->hasMethod('setjs' . $name) || $this->isClassBehaviorMethod($class, 'set' . $name))) {
816
						if ($class->hasMethod('get' . $name) || $class->hasMethod('getjs' . $name)) {
817
							throw new TConfigurationException('template_property_readonly', $type, $name);
818
						} else {
819
							throw new TConfigurationException('template_property_unknown', $type, $name);
820
						}
821
					} elseif (is_array($att) && $att[0] !== self::CONFIG_EXPRESSION) {
822
						if (strcasecmp($name, 'id') === 0) {
823
							throw new TConfigurationException('template_controlid_invalid', $type);
@@ 846-850 (lines=5) @@
843
				} else {
844
					// id is still alowed for TComponent, even if id property doesn't exist
845
					if (strcasecmp($name, 'id') !== 0 && !($class->hasMethod('set' . $name) || $this->isClassBehaviorMethod($class, 'set' . $name))) {
846
						if ($class->hasMethod('get' . $name)) {
847
							throw new TConfigurationException('template_property_readonly', $type, $name);
848
						} else {
849
							throw new TConfigurationException('template_property_unknown', $type, $name);
850
						}
851
					}
852
				}
853
			}