forked from hhvm/hhast
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuiltLintError.hack
More file actions
46 lines (38 loc) · 1.08 KB
/
Copy pathBuiltLintError.hack
File metadata and controls
46 lines (38 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* Copyright (c) 2017-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
namespace Facebook\HHAST;
class BuiltLintError extends SingleRuleLintError {
private ?(int, int) $position = null;
<<__Override>>
final public function getPosition(): ?(int, int) {
return $this->position;
}
final public function withPosition(int $line, int $character): this {
$this->position = tuple($line, $character);
return $this;
}
private ?string $blameCode = null;
<<__Override>>
final public function getBlameCode(): ?string {
return $this->blameCode;
}
final public function withBlameCode(?string $c): this {
$this->blameCode = $c;
return $this;
}
private ?string $prettyBlame = null;
<<__Override>>
final public function getPrettyBlame(): ?string {
return $this->prettyBlame ?? $this->getBlameCode();
}
final public function withPrettyBlame(string $b): this {
$this->prettyBlame = $b;
return $this;
}
}