for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Spatie\Php7to5;
use PhpParser\Node;
use PhpParser\Node\Stmt\DeclareDeclare;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitorAbstract;
class StrictTypesDeclarationRemover extends NodeVisitorAbstract
{
/**
* @inheritdoc
*/
public function leaveNode(Node $node)
if ($node instanceof DeclareDeclare) {
if ($node->key === 'strict_type') {
return NodeTraverser::REMOVE_NODE;
}