From 9013a0a1c4d08eb197d8afec009652d90233ffe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Almada?= Date: Mon, 8 May 2017 00:18:20 -0300 Subject: [PATCH] prefer interfaces instead of concretes in type declarations --- src/CompilerPass.php | 2 +- tests/phpt/macro/compiler_pass.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CompilerPass.php b/src/CompilerPass.php index bdb44a9..41e98bb 100644 --- a/src/CompilerPass.php +++ b/src/CompilerPass.php @@ -11,7 +11,7 @@ function __construct(array $ast) { if ($ast) $this->callback = $this->compileAnonymousFunction($ast); } - function apply(Ast $ast, TokenStream $ts, Node $startNode, Node $endNode) { + function apply(Ast $ast, TokenStream $ts, Index $startNode, Index $endNode) { if ($this->callback) ($this->callback)($ast, $ts, $startNode, $endNode); } diff --git a/tests/phpt/macro/compiler_pass.phpt b/tests/phpt/macro/compiler_pass.phpt index 6e06fd0..ea44615 100644 --- a/tests/phpt/macro/compiler_pass.phpt +++ b/tests/phpt/macro/compiler_pass.phpt @@ -7,7 +7,7 @@ macro { T_VARIABLE·A(T_VARIABLE·B) ·_()·debug } ->> function(\Yay\Ast $ast, \Yay\TokenStream $ts, \Yay\Node $start, \Yay\Node $end){ +>> function(\Yay\Ast $ast, \Yay\TokenStream $ts, \Yay\Index $start, \Yay\Index $end){ ob_start(); var_dump($ast, $ts, $start, $end); $result = PHP_EOL . ob_get_clean();