Page MenuHomePhabricator

D13105.id31637.diff
No OneTemporary

D13105.id31637.diff

diff --git a/src/conduit/ConduitClient.php b/src/conduit/ConduitClient.php
--- a/src/conduit/ConduitClient.php
+++ b/src/conduit/ConduitClient.php
@@ -328,7 +328,7 @@
$out[] = strlen($data);
$out[] = ':';
$out[] = $data;
- } else if (is_integer($data)) {
+ } else if (is_int($data)) {
$out[] = 'I';
$out[] = strlen((string)$data);
$out[] = ':';
diff --git a/src/daemon/PhutilDaemonOverseer.php b/src/daemon/PhutilDaemonOverseer.php
--- a/src/daemon/PhutilDaemonOverseer.php
+++ b/src/daemon/PhutilDaemonOverseer.php
@@ -439,7 +439,7 @@
$results[(int)$pid] = array(
'type' => $type,
'command' => $command,
- 'pid' => (int) $pid,
+ 'pid' => (int)$pid,
);
}
diff --git a/src/internationalization/PhutilTranslator.php b/src/internationalization/PhutilTranslator.php
--- a/src/internationalization/PhutilTranslator.php
+++ b/src/internationalization/PhutilTranslator.php
@@ -2,7 +2,7 @@
final class PhutilTranslator {
- static private $instance;
+ private static $instance;
private $locale;
private $localeCode;
diff --git a/src/parser/__tests__/PhutilTypeSpecTestCase.php b/src/parser/__tests__/PhutilTypeSpecTestCase.php
--- a/src/parser/__tests__/PhutilTypeSpecTestCase.php
+++ b/src/parser/__tests__/PhutilTypeSpecTestCase.php
@@ -104,7 +104,7 @@
foreach ($map as $expect => $tests) {
if (is_int($expect)) {
- $expect = (bool) $expect;
+ $expect = (bool)$expect;
}
foreach ($tests as $input) {
diff --git a/src/parser/aast/api/AASTNode.php b/src/parser/aast/api/AASTNode.php
--- a/src/parser/aast/api/AASTNode.php
+++ b/src/parser/aast/api/AASTNode.php
@@ -34,23 +34,23 @@
$this->tree = $tree;
}
- public final function getParentNode() {
+ final public function getParentNode() {
return $this->parentNode;
}
- public final function getID() {
+ final public function getID() {
return $this->id;
}
- public final function getTypeID() {
+ final public function getTypeID() {
return $this->typeID;
}
- public final function getTree() {
+ final public function getTree() {
return $this->tree;
}
- public final function getTypeName() {
+ final public function getTypeName() {
if (empty($this->typeName)) {
$this->typeName =
$this->tree->getNodeTypeNameFromTypeID($this->getTypeID());
@@ -58,7 +58,7 @@
return $this->typeName;
}
- public final function getChildren() {
+ final public function getChildren() {
return $this->children;
}
@@ -267,11 +267,11 @@
return pht('a node of type %s: "%s"', $this->getTypeName(), $concrete);
}
- protected final function getTypeIDFromTypeName($type_name) {
+ final protected function getTypeIDFromTypeName($type_name) {
return $this->tree->getNodeTypeIDFromTypeName($type_name);
}
- public final function getOffset() {
+ final public function getOffset() {
$stream = $this->tree->getRawTokenStream();
if (empty($stream[$this->l])) {
return null;
@@ -279,7 +279,7 @@
return $stream[$this->l]->getOffset();
}
- public final function getLength() {
+ final public function getLength() {
$stream = $this->tree->getRawTokenStream();
if (empty($stream[$this->r])) {
return null;
@@ -305,11 +305,11 @@
return array($before, $after);
}
- public final function getLineNumber() {
+ final public function getLineNumber() {
return idx($this->tree->getOffsetToLineNumberMap(), $this->getOffset());
}
- public final function getEndLineNumber() {
+ final public function getEndLineNumber() {
return idx(
$this->tree->getOffsetToLineNumberMap(),
$this->getOffset() + $this->getLength());
diff --git a/src/parser/aast/api/AASTToken.php b/src/parser/aast/api/AASTToken.php
--- a/src/parser/aast/api/AASTToken.php
+++ b/src/parser/aast/api/AASTToken.php
@@ -17,11 +17,11 @@
$this->tree = $tree;
}
- public final function getTokenID() {
+ final public function getTokenID() {
return $this->id;
}
- public final function getTypeID() {
+ final public function getTypeID() {
return $this->typeID;
}
@@ -32,11 +32,11 @@
return $this->typeName;
}
- public final function getValue() {
+ final public function getValue() {
return $this->value;
}
- public final function getOffset() {
+ final public function getOffset() {
return $this->offset;
}
diff --git a/src/parser/aast/api/AASTTree.php b/src/parser/aast/api/AASTTree.php
--- a/src/parser/aast/api/AASTTree.php
+++ b/src/parser/aast/api/AASTTree.php
@@ -43,28 +43,28 @@
$this->buildTree(array($tree));
}
- public final function setTreeType($description) {
+ final public function setTreeType($description) {
$this->treeType = $description;
return $this;
}
- public final function getTreeType() {
+ final public function getTreeType() {
return $this->treeType;
}
- public final function setTokenConstants(array $token_map) {
+ final public function setTokenConstants(array $token_map) {
$this->tokenConstants = $token_map;
$this->tokenReverseMap = array_flip($token_map);
return $this;
}
- public final function setNodeConstants(array $node_map) {
+ final public function setNodeConstants(array $node_map) {
$this->nodeConstants = $node_map;
$this->nodeReverseMap = array_flip($node_map);
return $this;
}
- public final function getNodeTypeNameFromTypeID($type_id) {
+ final public function getNodeTypeNameFromTypeID($type_id) {
if (empty($this->nodeConstants[$type_id])) {
$tree_type = $this->getTreeType();
throw new Exception(
@@ -77,7 +77,7 @@
return $this->nodeConstants[$type_id];
}
- public final function getNodeTypeIDFromTypeName($type_name) {
+ final public function getNodeTypeIDFromTypeName($type_name) {
if (empty($this->nodeReverseMap[$type_name])) {
$tree_type = $this->getTreeType();
throw new Exception(
@@ -89,7 +89,7 @@
return $this->nodeReverseMap[$type_name];
}
- public final function getTokenTypeNameFromTypeID($type_id) {
+ final public function getTokenTypeNameFromTypeID($type_id) {
if (empty($this->tokenConstants[$type_id])) {
$tree_type = $this->getTreeType();
throw new Exception(
@@ -101,7 +101,7 @@
return $this->tokenConstants[$type_id];
}
- public final function getTokenTypeIDFromTypeName($type_name) {
+ final public function getTokenTypeIDFromTypeName($type_name) {
if (empty($this->tokenReverseMap[$type_name])) {
$tree_type = $this->getTreeType();
throw new Exception(
@@ -126,7 +126,7 @@
unset($this->stream);
}
- public final function getRootNode() {
+ final public function getRootNode() {
return $this->tree[0];
}
@@ -156,7 +156,7 @@
return $result;
}
- public final function getRawTokenStream() {
+ final public function getRawTokenStream() {
return $this->stream;
}

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 9, 5:17 AM (9 h, 52 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7106122
Default Alt Text
D13105.id31637.diff (6 KB)

Event Timeline