Skip to content

Commit 9ffb532

Browse files
committed
Add is*Many methods
1 parent 46adc39 commit 9ffb532

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Ubiquity/attributes/AttributesEngine.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,14 @@ public static function isMany(object $annotation): bool {
137137
return ($annotation instanceof OneToMany) || ($annotation instanceof ManyToMany);
138138
}
139139

140+
public static function isOneToMany(object $annotation): bool {
141+
return $annotation instanceof OneToMany;
142+
}
143+
144+
public static function isManyToMany(object $annotation): bool {
145+
return $annotation instanceof ManyToMany;
146+
}
147+
140148
public function is(string $key, object $annotation): bool {
141149
$class = self::$registry[$key] ?? null;
142150
if ($class !== null) {

0 commit comments

Comments
 (0)