Skip to content

PHP Parse error since 2.4.0 version with PHP5.6 #360

Closed
@Angel94

Description

@Angel94

Hi,

I'm having a PHP parse error with lines below since the update to 2.4 version of phpmetrics.
I run it under php 5.6 which is allowed from composer.json but it seems there is a syntax error. The php7 typehint can't be parsed correctly.

public function traverseNode(Node $node): Node

The error :

PHP Parse error:  syntax error, unexpected ':', expecting ';' or '{' in vendor/phpmetrics/phpmetrics/src/Hal/Component/Ast/NodeTraverser.php on line 110

Thx,

Marc

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions