Mmoreram\PHPFormatter\Compiler\Compiler::addStub PHP Method

addStub() protected method

protected addStub ( Phar $phar )
$phar Phar
    protected function addStub(Phar $phar)
    {
        $stub = <<<'EOF'
#!/usr/bin/env php
<?php

/*
 * This file is part of the php-formatter package
 *
 * Copyright (c) 2014 Marc Morera
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * Feel free to edit as you please, and have fun.
 *
 * @author Marc Morera <[email protected]>
 */

Phar::mapPhar('php-formatter.phar');

require 'phar://php-formatter.phar/bin/php-formatter';

__HALT_COMPILER();
EOF;
        $phar->setStub($stub);
        return $this;
    }