public static function addStub(\Phar $phar, $stubAlias)
    {
        if ($stubAlias === false) {
            return;
        }
        echo "\nAdd stub";
        $path = \Yii::getAlias($stubAlias);
        if (file_exists($path) === false) {
            throw new InvalidConfigException("Invalid configuration. Stub file '{$path}' does not exists.");
        }
        $phar->setStub(file_get_contents($path));
    }
public static function addStub(\Phar $phar, $stubAlias)
    {
        if ($stubAlias === false) {
            return;
        }
        echo "\nAdd stub";
        $path = \Yii::getAlias($stubAlias);
        if (file_exists($path) === false) {
            throw new InvalidConfigException("Invalid configuration. Stub file '{$path}' does not exists.");
        }
        $phar->setStub(file_get_contents($path));
    }
public static function addStub ( \ Phar $ phar , $ stubAlias ) { if ( $ stubAlias === false ) { return ; } echo "\nAdd stub" ; $ path = \ Yii :: getAlias ( $ stubAlias ) ; if ( file_exists ( $ path ) === false ) { throw new InvalidConfigException ( "Invalid configuration. Stub file '{$path}' does not exists." ) ; } $ phar -> setStub ( file_get_contents ( $ path ) ) ; }
Add stub from file to phar file.

@param \Phar       $phar      PHAR object to update.
@param string|bool $stubAlias Path alias to stub file.

@throws \yii\base\InvalidConfigException On wrong stub file set (index0h\phar\Module::stub).
Add stub from file to phar file .