Exemplo n.º 1
0
 public static function canCreate(Party $parent, Party $child, AccountabilityType $accountabilityType)
 {
     if ($parent == $child) {
         return false;
     } elseif ($parent->ancestorsInclude($child, $accountabilityType)) {
         return false;
     } else {
         return $accountabilityType->canCreateAccountability($parent, $child);
     }
 }