mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-01-06 04:41:00 +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) {
|
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;
|
$this->name = $name;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,20 @@ final class ArcanistUnitTestResult extends Phobject {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setName($name) {
|
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;
|
$this->name = $name;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue