1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-18 02:41:24 +02:00

Update PushoverHandler.php

simplifying the priority level setting if condition following stof suggestion
This commit is contained in:
Artur Moczulski
2013-07-10 08:44:39 -07:00
parent 8dfd124bcd
commit aeb2dd578c

View File

@@ -75,10 +75,10 @@ class PushoverHandler extends SocketHandler
'timestamp' => $timestamp
);
if( $record['level'] >= $this->highPriorityLevel && $record['level'] < $this->emergencyLevel ) {
$dataArray['priority'] = 1;
} else if ( $record['level'] >= $this->emergencyLevel ) {
if( $record['level'] >= $this->emergencyLevel ) {
$dataArray['priority'] = 2;
} else if ( $record['level'] >= $this->highPriorityLevel ) {
$dataArray['priority'] = 1;
}
return http_build_query($dataArray);