Code Duplication    Length = 6-6 lines in 3 locations

Ubiquity/orm/traits/OrmUtilsRelationsTrait.php 2 locations

@@ 63-68 (lines=6) @@
60
				$result[$joinColumn["name"]]=$member;
61
			}
62
		}
63
		if ($manyToMany=self::getAnnotationInfo($class, "#manyToMany")) {
64
			$manyToMany=array_keys($manyToMany);
65
			foreach ($manyToMany as $member){
66
				$result[$member . "Ids"]=$member;
67
			}
68
		}
69
		if ($oneToMany=self::getAnnotationInfo($class, "#oneToMany")) {
70
			$oneToMany=array_keys($oneToMany);
71
			foreach ($oneToMany as $member){
@@ 69-74 (lines=6) @@
66
				$result[$member . "Ids"]=$member;
67
			}
68
		}
69
		if ($oneToMany=self::getAnnotationInfo($class, "#oneToMany")) {
70
			$oneToMany=array_keys($oneToMany);
71
			foreach ($oneToMany as $member){
72
				$result[$member . "Ids"]=$member;
73
			}
74
		}
75
		return ["relations"=>$result,"manyToOne"=>$manyToOne,"manyToMany"=>$manyToMany,"oneToMany"=>$oneToMany];
76
	}
77
	

Ubiquity/orm/traits/OrmUtilsFieldsTrait.php 1 location

@@ 66-71 (lines=6) @@
63
				$result[]=$joinColumn["name"];
64
			}
65
		}
66
		if ($manyToMany=self::getAnnotationInfo($class, "#manyToMany")) {
67
			$manyToMany=array_keys($manyToMany);
68
			foreach ($manyToMany as $member){
69
				$result[]=$member . "Ids";
70
			}
71
		}
72
		return $result;
73
	}
74
}