aeyoll/SymfonyPhpSpecGeneratorBundle

View on GitHub
src/Statements/ItIsInitializableStatement.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Aeyoll\SymfonyPhpSpecGeneratorBundle\Statements;

class ItIsInitializableStatement extends Statement
{
    /**
     * {@inheritDoc}
     */
    protected $methodName = 'it_is_initializable';

    /**
     * {@inheritDoc}
     */
    public function initStatements()
    {
        $this->statements = array(
            new \PhpParser\Node\Expr\MethodCall(
                new \PhpParser\Node\Expr\Variable('this'),
                'shouldHaveType',
                array(new \PhpParser\Node\Arg(new \PhpParser\Node\Scalar\String_($this->entityName)))
            )
        );
    }
}