diff --git a/.php_cs.dist b/.php_cs.dist
index 13298b538..4affabccd 100644
--- a/.php_cs.dist
+++ b/.php_cs.dist
@@ -2,6 +2,7 @@
$finder = array_reduce(
[
__DIR__ . '/src/',
+ __DIR__ . '/examples/',
__DIR__ . '/bin/',
__DIR__ . '/tests/',
],
diff --git a/examples/ClassUnqualifier.php b/examples/ClassUnqualifier.php
index 6067005dd..34e66e9d7 100644
--- a/examples/ClassUnqualifier.php
+++ b/examples/ClassUnqualifier.php
@@ -1,9 +1,6 @@
getDocComment())) {
-
$comment_block = CommentChecker::parseDocComment(trim($doc_comment->getText()));
if (isset($comment_block['specials']['variablesfrom'])) {
@@ -69,7 +67,6 @@ class TemplateChecker extends Psalm\Checker\FileChecker
$this_params = null;
if (($first_stmt instanceof PhpParser\Node\Stmt\Nop) && ($doc_comment = $first_stmt->getDocComment())) {
-
$comment_block = CommentChecker::parseDocComment(trim($doc_comment->getText()));
if (isset($comment_block['specials']['variablesfrom'])) {
@@ -91,7 +88,7 @@ class TemplateChecker extends Psalm\Checker\FileChecker
}
$this_params->vars_in_scope['$this'] = new Type\Union([
- new Type\Atomic\TNamedObject(self::VIEW_CLASS)
+ new Type\Atomic\TNamedObject(self::VIEW_CLASS),
]);
}
}
@@ -101,7 +98,7 @@ class TemplateChecker extends Psalm\Checker\FileChecker
$this_params->check_variables = false;
$this_params->self = self::VIEW_CLASS;
$this_params->vars_in_scope['$this'] = new Type\Union([
- new Type\Atomic\TNamedObject(self::VIEW_CLASS)
+ new Type\Atomic\TNamedObject(self::VIEW_CLASS),
]);
}
@@ -113,6 +110,7 @@ class TemplateChecker extends Psalm\Checker\FileChecker
/**
* @param string $method_id
* @param PhpParser\Node $stmt
+ *
* @return Context|false
*/
private function checkMethod($method_id, PhpParser\Node $stmt)
@@ -160,6 +158,7 @@ class TemplateChecker extends Psalm\Checker\FileChecker
/**
* @param Context $context
+ *
* @return void
*/
protected function checkWithViewClass(Context $context)
diff --git a/phpcs.xml b/phpcs.xml
index fd700075e..ed1b699f6 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -10,7 +10,6 @@
src/Psalm/CallMap.php
- examples/
src/Psalm/Stubs/
tests/stubs/
diff --git a/src/Psalm/Checker/InterfaceChecker.php b/src/Psalm/Checker/InterfaceChecker.php
index 69aec9d54..373dd9de3 100644
--- a/src/Psalm/Checker/InterfaceChecker.php
+++ b/src/Psalm/Checker/InterfaceChecker.php
@@ -3,7 +3,6 @@ namespace Psalm\Checker;
use PhpParser;
use Psalm\CodeLocation;
-use Psalm\Context;
use Psalm\StatementsSource;
class InterfaceChecker extends ClassLikeChecker