Skip to content

Commit ac61643

Browse files
committed
Fix notify error message - cant use
1 parent 8be7769 commit ac61643

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/Commands/core/NotifyCommands.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function shutdown(CommandData $commandData)
3434
}
3535

3636
if (Drush::config()->get('notify.duration')) {
37-
if (self::isAllowed($commandData)) {
37+
if (self::isAllowed()) {
3838
$msg = dt("Command '!command' completed.", ['!command' => $cmd]);
3939
self::shutdownSend($msg, $commandData);
4040
}
@@ -93,7 +93,7 @@ public static function shutdownSendText($msg, CommandData $commandData)
9393
$process = Drush::process($cmd, $msg);
9494
$process->run();
9595
if (!$process->isSuccessful()) {
96-
$this->logger()->warning($error_message);
96+
Drush::logger()->warning($error_message);
9797
}
9898

9999
return true;
@@ -102,13 +102,9 @@ public static function shutdownSendText($msg, CommandData $commandData)
102102
/**
103103
* Identify if the given Drush request should trigger a notification.
104104
*
105-
* @param $command
106-
* Name of the command.
107-
*
108-
* @return
109-
* Boolean
105+
* @return bool
110106
*/
111-
public static function isAllowed(CommandData $commandData)
107+
public static function isAllowed()
112108
{
113109
$duration = Drush::config()->get('notify.duration');
114110
$execution = time() - $_SERVER['REQUEST_TIME'];

0 commit comments

Comments
 (0)