Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #27 from matperez/master
Browse files Browse the repository at this point in the history
Adopted callback helper for new composer
  • Loading branch information
Antonio Ramirez committed Mar 18, 2015
2 parents 69fdab1 + 9fce161 commit 6a3788b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Composer/Callback.php
Expand Up @@ -69,9 +69,9 @@ class Callback
/**
* Displays welcome message
* @static
* @param \Composer\Script\Event $event
* @param \Composer\Script\CommandEvent $event
*/
public static function preInstall(Event $event)
public static function preInstall(CommandEvent $event)
{
Console::output("\n%BYiinitialzr 1.0.1%n\n");
Console::output("* download packages specified in composer.json");
Expand All @@ -87,9 +87,9 @@ public static function preInstall(Event $event)
/**
* Executes a post-install callback
* @static
* @param \Composer\Script\Event $event
* @param \Composer\Script\CommandEvent $event
*/
public static function postInstall(Event $event)
public static function postInstall(CommandEvent $event)
{
self::runHook('post-install');
Console::output("\n%GInstallation completed!%n\n");
Expand Down Expand Up @@ -123,9 +123,9 @@ public static function postUpdate(Event $event)
* Executes ./yiic <vendor/<packageName>-<action>
*
* @static
* @param \Composer\Script\Event $event
* @param \Composer\Script\PackageEvent $event
*/
public static function postPackageInstall(Event $event)
public static function postPackageInstall(PackageEvent $event)
{
$installedPackage = $event->getOperation()->getPackage();
$hookName = $installedPackage->getPrettyName() . '-install';
Expand All @@ -136,9 +136,9 @@ public static function postPackageInstall(Event $event)
* Executes ./yiic <vendor/<packageName>-<action>
*
* @static
* @param \Composer\Script\Event $event
* @param \Composer\Script\PackageEvent $event
*/
public static function postPackageUpdate(Event $event)
public static function postPackageUpdate(PackageEvent $event)
{
$installedPackage = $event->getOperation()->getTargetPackage();
$commandName = $installedPackage->getPrettyName() . '-update';
Expand Down Expand Up @@ -206,4 +206,4 @@ private static function getYiiApplication()
return $app;
}

}
}

0 comments on commit 6a3788b

Please sign in to comment.