Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/herald/HeraldPreCommitAdapter.php
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | abstract class HeraldPreCommitAdapter extends HeraldAdapter { | ||||
public function getActions($rule_type) { | public function getActions($rule_type) { | ||||
switch ($rule_type) { | switch ($rule_type) { | ||||
case HeraldRuleTypeConfig::RULE_TYPE_GLOBAL: | case HeraldRuleTypeConfig::RULE_TYPE_GLOBAL: | ||||
case HeraldRuleTypeConfig::RULE_TYPE_OBJECT: | case HeraldRuleTypeConfig::RULE_TYPE_OBJECT: | ||||
return array_merge( | return array_merge( | ||||
array( | array( | ||||
self::ACTION_BLOCK, | self::ACTION_BLOCK, | ||||
self::ACTION_EMAIL, | self::ACTION_EMAIL, | ||||
self::ACTION_NOTHING, | |||||
), | ), | ||||
parent::getActions($rule_type)); | parent::getActions($rule_type)); | ||||
case HeraldRuleTypeConfig::RULE_TYPE_PERSONAL: | case HeraldRuleTypeConfig::RULE_TYPE_PERSONAL: | ||||
return array_merge( | return array_merge( | ||||
array( | array( | ||||
self::ACTION_EMAIL, | self::ACTION_EMAIL, | ||||
self::ACTION_NOTHING, | |||||
), | ), | ||||
parent::getActions($rule_type)); | parent::getActions($rule_type)); | ||||
} | } | ||||
} | } | ||||
public function applyHeraldEffects(array $effects) { | public function applyHeraldEffects(array $effects) { | ||||
assert_instances_of($effects, 'HeraldEffect'); | assert_instances_of($effects, 'HeraldEffect'); | ||||
Show All 20 Lines |