Skip to content

Commit

Permalink
prefer interfaces instead of concretes in type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
marcioAlmada committed May 8, 2017
1 parent a428b96 commit 9013a0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/CompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/phpt/macro/compiler_pass.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 9013a0a

Please sign in to comment.