Code Duplication    Length = 4-4 lines in 2 locations

forms/CompositeField.php 2 locations

@@ 284-287 (lines=4) @@
281
	public function performReadonlyTransformation() {
282
		$newChildren = new FieldList();
283
		$clone = clone $this;
284
		if($clone->getChildren()) foreach($clone->getChildren() as $idx => $child) {
285
			if(is_object($child)) $child = $child->transform(new ReadonlyTransformation());
286
			$newChildren->push($child, $idx);
287
		}
288
289
		$clone->children = $newChildren;
290
		$clone->readonly = true;
@@ 306-309 (lines=4) @@
303
	public function performDisabledTransformation() {
304
		$newChildren = new FieldList();
305
		$clone = clone $this;
306
		if($clone->getChildren()) foreach($clone->getChildren() as $idx => $child) {
307
			if(is_object($child)) $child = $child->transform(new DisabledTransformation());
308
			$newChildren->push($child, $idx);
309
		}
310
311
		$clone->children = $newChildren;
312
		$clone->readonly = true;