PHP Class GrumPHP\Event\Subscriber\StashUnstagedChangesSubscriber

Inheritance: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Show file Open project: phpro/grumphp

Public Methods

Method Description
__construct ( GrumPHP $grumPHP, Repository $repository, GrumPHP\IO\IOInterface $io )
getSubscribedEvents ( ) : array
handleErrors ( ) : void
popStash ( RunnerEvent $e ) : void
saveStash ( RunnerEvent $e ) : void

Private Methods

Method Description
doPopStash ( ) : void
doSaveStash ( ) Check if there is a pending diff and stash the changes.
isStashEnabled ( GrumPHP\Task\Context\ContextInterface $context ) : boolean
registerShutdownHandler ( ) : void Make sure to fetch errors and pop the stash before crashing

Method Details

__construct() public method

public __construct ( GrumPHP $grumPHP, Repository $repository, GrumPHP\IO\IOInterface $io )
$grumPHP GrumPHP\Configuration\GrumPHP
$repository Gitonomy\Git\Repository
$io GrumPHP\IO\IOInterface

getSubscribedEvents() public static method

public static getSubscribedEvents ( ) : array
return array

handleErrors() public method

public handleErrors ( ) : void
return void

popStash() public method

public popStash ( RunnerEvent $e ) : void
$e GrumPHP\Event\RunnerEvent
return void

saveStash() public method

public saveStash ( RunnerEvent $e ) : void
$e GrumPHP\Event\RunnerEvent
return void