This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Issue::PhanAccessPropertyPrivate | |
class C1 { private static $p = 42; } | |
print C1::$p; | |
// Issue::PhanAccessPropertyProtected | |
class C2 { protected static $p = 42; } | |
print C2::$p; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Phan/Language/Scope.php b/src/Phan/Language/Scope.php | |
index d159507..90b609f 100644 | |
--- a/src/Phan/Language/Scope.php | |
+++ b/src/Phan/Language/Scope.php | |
@@ -54,6 +54,8 @@ abstract class Scope | |
*/ | |
public function getParentScope() : Scope | |
{ | |
+ assert(!empty($this->parent_scope), | |
+ "Parent scope should not be null at $this"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function f($p0, DateInterval $p1 = null) {} | |
function g(DateInterval $p0 = null, $p1) {} | |
function j(DateInterval $p0 = null, $p1 = null) {} | |
function k($p0 = null, DateInterval $p1 = null) {} | |
function m($p0 = null, DateInterval $p1) {} | |
function n($p0 = null, $p1) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index b8b44ce..943e87c 100644 | |
--- a/src/Phan/Language/Context.php | |
+++ b/src/Phan/Language/Context.php | |
@@ -289,7 +289,7 @@ class Context extends FileRef implements \Serializable | |
public function getClassInScope(CodeBase $code_base) : Clazz | |
{ | |
assert($this->isInClassScope(), | |
- "Must be in class scope to get class"); | |
+ "Must be in class scope to get class from $this"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Phan/Language/Context.php b/src/Phan/Language/Context.php | |
index b8b44ce..943e87c 100644 | |
--- a/src/Phan/Language/Context.php | |
+++ b/src/Phan/Language/Context.php | |
@@ -289,7 +289,7 @@ class Context extends FileRef implements \Serializable | |
public function getClassInScope(CodeBase $code_base) : Clazz | |
{ | |
assert($this->isInClassScope(), | |
- "Must be in class scope to get class"); | |
+ "Must be in class scope to get class from $this"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Phan/Language/Context.php b/src/Phan/Language/Context.php | |
index b8b44ce..4e8c55c 100644 | |
--- a/src/Phan/Language/Context.php | |
+++ b/src/Phan/Language/Context.php | |
@@ -289,7 +289,7 @@ class Context extends FileRef implements \Serializable | |
public function getClassInScope(CodeBase $code_base) : Clazz | |
{ | |
assert($this->isInClassScope(), | |
- "Must be in class scope to get class"); | |
+ "Must be in class scope to get class from $context"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src/Phan/Analysis/ArgumentVisitor.php | |
111: $property->addReference($this->context); | |
132: $method->addReference($this->context); | |
172: $method->addReference($this->context); | |
src/Phan/Analysis/PostOrderAnalysisVisitor.php | |
146: $method->addReference($this->context); | |
451: $constant->addReference($this->context); | |
484: $constant->addReference($this->context); | |
775: $class->addReference($this->context); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Phan/CLI.php b/src/Phan/CLI.php | |
index 2437e82..66ddd81 100644 | |
--- a/src/Phan/CLI.php | |
+++ b/src/Phan/CLI.php | |
@@ -70,6 +70,7 @@ class CLI | |
'state-file:', | |
'processes:', | |
'signature-compatibility', | |
+ 'markdown-issue-messages', | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Memcached class. | |
*/ | |
class Memcached { | |
/** | |
* Libmemcached behavior options. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php declare(strict_types=1); | |
require_once(__DIR__.'/src/Phan/Bootstrap.php'); | |
use \Phan\Issue; | |
$category = []; | |
foreach (Issue::issueMap() as $issue) { | |
$category[$issue->getCategoryName()][$issue->getType()] = [ |