Changeset View
Changeset View
Standalone View
Standalone View
src/lint/ArcanistLintMessage.php
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | public function setSeverity($severity) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getSeverity() { | public function getSeverity() { | ||||
return $this->severity; | return $this->severity; | ||||
} | } | ||||
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; | ||||
} | } | ||||
public function getName() { | public function getName() { | ||||
return $this->name; | return $this->name; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |