parent
a69c93b28b
commit
42dc2c966d
|
@ -7,3 +7,6 @@
|
||||||
[submodule "validation/frameworks/drupal"]
|
[submodule "validation/frameworks/drupal"]
|
||||||
path = validation/frameworks/drupal
|
path = validation/frameworks/drupal
|
||||||
url = https://github.com/drupal/drupal
|
url = https://github.com/drupal/drupal
|
||||||
|
[submodule "validation/frameworks/tolerant-php-parser"]
|
||||||
|
path = validation/frameworks/tolerant-php-parser
|
||||||
|
url = https://github.com/microsoft/tolerant-php-parser
|
||||||
|
|
|
@ -229,9 +229,9 @@ class PhpDocument
|
||||||
/**
|
/**
|
||||||
* Returns the AST of the document
|
* Returns the AST of the document
|
||||||
*
|
*
|
||||||
* @return Node[]
|
* @return Node[] | Tolerant\Node | null
|
||||||
*/
|
*/
|
||||||
public function getStmts(): array
|
public function getStmts()
|
||||||
{
|
{
|
||||||
return $this->stmts;
|
return $this->stmts;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ValidationTest extends TestCase
|
||||||
|
|
||||||
foreach (new RecursiveIteratorIterator($iterator) as $file) {
|
foreach (new RecursiveIteratorIterator($iterator) as $file) {
|
||||||
if (strpos((string)$file, ".php") !== false) {
|
if (strpos((string)$file, ".php") !== false) {
|
||||||
if ($file->getSize() < 100000 ) {
|
if ($file->getSize() < 100000) {
|
||||||
$testProviderArray[$frameworkName . "::" . $file->getBasename()] = [$file->getPathname(), $frameworkName];
|
$testProviderArray[$frameworkName . "::" . $file->getBasename()] = [$file->getPathname(), $frameworkName];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,8 @@ class ValidationTest extends TestCase
|
||||||
$this->fail((string)$e);
|
$this->fail((string)$e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->assertNotNull($document->getStmts());
|
||||||
|
|
||||||
if (file_exists($outFile)) {
|
if (file_exists($outFile)) {
|
||||||
unlink($outFile);
|
unlink($outFile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue