From 706b91adf677d41ee410987aafd2a5a3ce5cc580 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 16 Jul 2021 08:33:10 -0700 Subject: [PATCH] Remove "HarbormasterBuildableTransaction::TYPE_CREATE" Summary: Ref T13072. This transaction type has no writers and is mooted by EditEngine. Test Plan: Grepped for transaction constant. Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13072 Differential Revision: https://secure.phabricator.com/D21693 --- .../editor/HarbormasterBuildableTransactionEditor.php | 6 ------ .../storage/HarbormasterBuildableTransaction.php | 9 --------- 2 files changed, 15 deletions(-) diff --git a/src/applications/harbormaster/editor/HarbormasterBuildableTransactionEditor.php b/src/applications/harbormaster/editor/HarbormasterBuildableTransactionEditor.php index 3974851c0d..63121813bb 100644 --- a/src/applications/harbormaster/editor/HarbormasterBuildableTransactionEditor.php +++ b/src/applications/harbormaster/editor/HarbormasterBuildableTransactionEditor.php @@ -14,7 +14,6 @@ final class HarbormasterBuildableTransactionEditor public function getTransactionTypes() { $types = parent::getTransactionTypes(); - $types[] = HarbormasterBuildableTransaction::TYPE_CREATE; $types[] = HarbormasterBuildableTransaction::TYPE_COMMAND; return $types; @@ -25,7 +24,6 @@ final class HarbormasterBuildableTransactionEditor PhabricatorApplicationTransaction $xaction) { switch ($xaction->getTransactionType()) { - case HarbormasterBuildableTransaction::TYPE_CREATE: case HarbormasterBuildableTransaction::TYPE_COMMAND: return null; } @@ -38,8 +36,6 @@ final class HarbormasterBuildableTransactionEditor PhabricatorApplicationTransaction $xaction) { switch ($xaction->getTransactionType()) { - case HarbormasterBuildableTransaction::TYPE_CREATE: - return true; case HarbormasterBuildableTransaction::TYPE_COMMAND: return $xaction->getNewValue(); } @@ -52,7 +48,6 @@ final class HarbormasterBuildableTransactionEditor PhabricatorApplicationTransaction $xaction) { switch ($xaction->getTransactionType()) { - case HarbormasterBuildableTransaction::TYPE_CREATE: case HarbormasterBuildableTransaction::TYPE_COMMAND: return; } @@ -65,7 +60,6 @@ final class HarbormasterBuildableTransactionEditor PhabricatorApplicationTransaction $xaction) { switch ($xaction->getTransactionType()) { - case HarbormasterBuildableTransaction::TYPE_CREATE: case HarbormasterBuildableTransaction::TYPE_COMMAND: return; } diff --git a/src/applications/harbormaster/storage/HarbormasterBuildableTransaction.php b/src/applications/harbormaster/storage/HarbormasterBuildableTransaction.php index 0d7ab76e19..a4a2f1ab14 100644 --- a/src/applications/harbormaster/storage/HarbormasterBuildableTransaction.php +++ b/src/applications/harbormaster/storage/HarbormasterBuildableTransaction.php @@ -3,7 +3,6 @@ final class HarbormasterBuildableTransaction extends PhabricatorApplicationTransaction { - const TYPE_CREATE = 'harbormaster:buildable:create'; const TYPE_COMMAND = 'harbormaster:buildable:command'; public function getApplicationName() { @@ -21,10 +20,6 @@ final class HarbormasterBuildableTransaction $new = $this->getNewValue(); switch ($this->getTransactionType()) { - case self::TYPE_CREATE: - return pht( - '%s created this buildable.', - $this->renderHandleLink($author_phid)); case self::TYPE_COMMAND: switch ($new) { case HarbormasterBuildMessageRestartTransaction::MESSAGETYPE: @@ -55,8 +50,6 @@ final class HarbormasterBuildableTransaction $new = $this->getNewValue(); switch ($this->getTransactionType()) { - case self::TYPE_CREATE: - return 'fa-plus'; case self::TYPE_COMMAND: switch ($new) { case HarbormasterBuildMessageRestartTransaction::MESSAGETYPE: @@ -80,8 +73,6 @@ final class HarbormasterBuildableTransaction $new = $this->getNewValue(); switch ($this->getTransactionType()) { - case self::TYPE_CREATE: - return 'green'; case self::TYPE_COMMAND: switch ($new) { case HarbormasterBuildMessagePauseTransaction::MESSAGETYPE: