mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-24 13:38:19 +01:00
f47e69c015
Summary: Add some more `pht`izations. Test Plan: Eyeball it. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: hach-que, Korvin, epriestley Differential Revision: https://secure.phabricator.com/D13200
38 lines
910 B
PHP
38 lines
910 B
PHP
<?php
|
|
|
|
final class PhabricatorApplicationTransactionNoEffectException
|
|
extends Exception {
|
|
|
|
private $transactions;
|
|
private $anyEffect;
|
|
private $hasComment;
|
|
|
|
public function __construct(array $transactions, $any_effect, $has_comment) {
|
|
assert_instances_of($transactions, 'PhabricatorApplicationTransaction');
|
|
|
|
$this->transactions = $transactions;
|
|
$this->anyEffect = $any_effect;
|
|
$this->hasComment = $has_comment;
|
|
|
|
$message = array();
|
|
$message[] = pht('Transactions have no effect:');
|
|
foreach ($this->transactions as $transaction) {
|
|
$message[] = ' - '.$transaction->getNoEffectDescription();
|
|
}
|
|
|
|
parent::__construct(implode("\n", $message));
|
|
}
|
|
|
|
public function getTransactions() {
|
|
return $this->transactions;
|
|
}
|
|
|
|
public function hasAnyEffect() {
|
|
return $this->anyEffect;
|
|
}
|
|
|
|
public function hasComment() {
|
|
return $this->hasComment;
|
|
}
|
|
|
|
}
|