mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-01-01 10:20:58 +01:00
(stable) Promote 2017 Week 37
This commit is contained in:
commit
c67dcb00a4
2 changed files with 29 additions and 0 deletions
|
@ -126,6 +126,21 @@ final class ArcanistLintMessage extends Phobject {
|
|||
}
|
||||
|
||||
public function setName($name) {
|
||||
$maximum_bytes = 255;
|
||||
$actual_bytes = strlen($name);
|
||||
|
||||
if ($actual_bytes > $maximum_bytes) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Parameter ("%s") passed to "%s" when constructing a lint message '.
|
||||
'must be a string with a maximum length of %s bytes, but is %s '.
|
||||
'bytes in length.',
|
||||
$name,
|
||||
'setName()',
|
||||
new PhutilNumber($maximum_bytes),
|
||||
new PhutilNumber($actual_bytes)));
|
||||
}
|
||||
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,20 @@ final class ArcanistUnitTestResult extends Phobject {
|
|||
}
|
||||
|
||||
public function setName($name) {
|
||||
$maximum_bytes = 255;
|
||||
$actual_bytes = strlen($name);
|
||||
|
||||
if ($actual_bytes > $maximum_bytes) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Parameter ("%s") passed to "%s" when constructing a unit test '.
|
||||
'message must be a string with a maximum length of %s bytes, but '.
|
||||
'is %s bytes in length.',
|
||||
$name,
|
||||
'setName()',
|
||||
new PhutilNumber($maximum_bytes),
|
||||
new PhutilNumber($actual_bytes)));
|
||||
}
|
||||
$this->name = $name;
|
||||
return $this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue