Skip to content

Commit

Permalink
Merge pull request #12 from acidjames/patch-1
Browse files Browse the repository at this point in the history
Deprecation Notice: ScriptHandler
  • Loading branch information
carlalexander committed Mar 8, 2017
2 parents e22ed2b + 67bcf3b commit 69ce62d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Composer/ScriptHandler.php
Expand Up @@ -13,7 +13,7 @@

use Symfony\Component\Process\Process;
use Symfony\Component\Process\PhpExecutableFinder;
use Composer\Script\CommandEvent;
use Composer\Script\Event;

/**
* ScriptHandler for the HeltheTurbolinksBundle.
Expand All @@ -26,9 +26,9 @@ class ScriptHandler
* Install the component assets under the symfony bundle for better integration
* with Symfony.
*
* @param CommandEvent $event
* @param Event $event
*/
public static function installAssets(CommandEvent $event)
public static function installAssets(Event $event)
{
$options = self::getOptions($event);
$consoleDir = self::getConsoleDir($event, 'turbolinks install');
Expand All @@ -39,14 +39,14 @@ public static function installAssets(CommandEvent $event)
/**
* Execute command.
*
* @param CommandEvent $event
* @param Event $event
* @param string $consoleDir
* @param string $cmd
* @param integer $timeout
*
* @throws \RuntimeException
*/
protected static function executeCommand(CommandEvent $event, $consoleDir, $cmd, $timeout = 300)
protected static function executeCommand(Event $event, $consoleDir, $cmd, $timeout = 300)
{
$php = escapeshellarg(self::getPhp());
$console = escapeshellarg($consoleDir.'/console');
Expand All @@ -64,11 +64,11 @@ protected static function executeCommand(CommandEvent $event, $consoleDir, $cmd,
/**
* Get the default options.
*
* @param CommandEvent $event
* @param Event $event
*
* @return array
*/
protected static function getOptions(CommandEvent $event)
protected static function getOptions(Event $event)
{
$options = array_merge(array(
'symfony-app-dir' => 'app',
Expand Down Expand Up @@ -100,12 +100,12 @@ protected static function getPhp()
/**
* Returns a relative path to the directory that contains the `console` command.
*
* @param CommandEvent $event The command event.
* @param Event $event The command event.
* @param string $actionName The name of the action
*
* @return string|null The path to the console directory, null if not found.
*/
protected static function getConsoleDir(CommandEvent $event, $actionName)
protected static function getConsoleDir(Event $event, $actionName)
{
$options = self::getOptions($event);

Expand Down Expand Up @@ -136,7 +136,7 @@ protected static function useNewDirectoryStructure(array $options)
return isset($options['symfony-var-dir']) && is_dir($options['symfony-var-dir']);
}

protected static function hasDirectory(CommandEvent $event, $configName, $path, $actionName)
protected static function hasDirectory(Event $event, $configName, $path, $actionName)
{
if (!is_dir($path)) {
$event->getIO()->write(sprintf('The %s (%s) specified in composer.json was not found in %s, can not %s.', $configName, $path, getcwd(), $actionName));
Expand Down

0 comments on commit 69ce62d

Please sign in to comment.