Skip to content

Commit b8881c3

Browse files
committed
run Rector
1 parent 003b1e4 commit b8881c3

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/JsFunctionsScanner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function parser(string $version, array $options = ['comments' => true]):
2626

2727
public function scan(string $code, string $filename): array
2828
{
29-
list($version, $options) = $this->parser;
29+
[$version, $options] = $this->parser;
3030

3131
$ast = Peast::$version($code, $options)->parse();
3232

src/JsNodeVisitor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(string $filename, array $validFunctions = null)
1919
$this->validFunctions = $validFunctions;
2020
}
2121

22-
public function __invoke(Node $node)
22+
public function __invoke(Node $node): void
2323
{
2424
if ($node->getType() === 'CallExpression') {
2525
$function = $this->createFunction($node);
@@ -109,7 +109,7 @@ protected static function getComment(Comment $comment): string
109109
{
110110
$text = $comment->getText();
111111

112-
$lines = array_map(function ($line) {
112+
$lines = array_map(function ($line): string {
113113
$line = ltrim($line, "#*/ \t");
114114
$line = rtrim($line, "#*/ \t");
115115
return trim($line);

tests/JsFunctionsScannerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class JsFunctionsScannerTest extends TestCase
99
{
10-
public function testJsFunctionsExtractor()
10+
public function testJsFunctionsExtractor(): void
1111
{
1212
$scanner = new JsFunctionsScanner();
1313
$file = __DIR__.'/assets/functions.js';

0 commit comments

Comments
 (0)