本文整理汇总了PHP中PhabricatorApplicationTransaction::getActionStrength方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorApplicationTransaction::getActionStrength方法的具体用法?PHP PhabricatorApplicationTransaction::getActionStrength怎么用?PHP PhabricatorApplicationTransaction::getActionStrength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorApplicationTransaction
的用法示例。
在下文中一共展示了PhabricatorApplicationTransaction::getActionStrength方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getActionStrength
public function getActionStrength()
{
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_TITLE:
if ($old === null) {
return 3;
}
break;
case self::TYPE_ANSWERS:
return 2;
}
return parent::getActionStrength();
}
示例2: getActionStrength
public function getActionStrength()
{
switch ($this->getTransactionType()) {
case self::TYPE_TITLE:
return 1.4;
case self::TYPE_STATUS:
return 1.3;
case self::TYPE_OWNER:
return 1.2;
case self::TYPE_PRIORITY:
return 1.1;
}
return parent::getActionStrength();
}
示例3: getActionStrength
public function getActionStrength()
{
switch ($this->getTransactionType()) {
case self::TYPE_TITLE:
return 1.4;
case self::TYPE_CONTENT:
return 1.3;
case self::TYPE_DELETE:
return 1.5;
case self::TYPE_MOVE_TO:
case self::TYPE_MOVE_AWAY:
return 1.0;
}
return parent::getActionStrength();
}
示例4: getActionStrength
public function getActionStrength()
{
switch ($this->getTransactionType()) {
case self::TYPE_ACTION:
return 3;
case self::TYPE_UPDATE:
return 2;
}
return parent::getActionStrength();
}
示例5: getActionStrength
public function getActionStrength()
{
switch ($this->getTransactionType()) {
case PhabricatorMacroTransactionType::TYPE_DISABLED:
return 2.0;
case PhabricatorMacroTransactionType::TYPE_FILE:
return 1.5;
}
return parent::getActionStrength();
}
示例6: getActionStrength
public function getActionStrength()
{
return parent::getActionStrength();
}