Commit b12b2e99 authored by Armando Lüscher's avatar Armando Lüscher Committed by GitHub

Merge pull request #372 from noplanman/php_eol

Use PHP_EOL for new lines.
parents 6c28819d 206e795c
...@@ -74,7 +74,7 @@ class SendtoallCommand extends AdminCommand ...@@ -74,7 +74,7 @@ class SendtoallCommand extends AdminCommand
$total = 0; $total = 0;
$failed = 0; $failed = 0;
$text = 'Message sent to:' . "\n"; $text = 'Message sent to:' . PHP_EOL;
/** @var ServerResponse $result */ /** @var ServerResponse $result */
foreach ($results as $result) { foreach ($results as $result) {
...@@ -99,9 +99,9 @@ class SendtoallCommand extends AdminCommand ...@@ -99,9 +99,9 @@ class SendtoallCommand extends AdminCommand
} }
++$total; ++$total;
$text .= $total . ') ' . $status . ' ' . $type . ' ' . $name . "\n"; $text .= $total . ') ' . $status . ' ' . $type . ' ' . $name . PHP_EOL;
} }
$text .= 'Delivered: ' . ($total - $failed) . '/' . $total . "\n"; $text .= 'Delivered: ' . ($total - $failed) . '/' . $total . PHP_EOL;
if ($total === 0) { if ($total === 0) {
$text = 'No users or chats found..'; $text = 'No users or chats found..';
......
...@@ -103,7 +103,7 @@ class WeatherCommand extends UserCommand ...@@ -103,7 +103,7 @@ class WeatherCommand extends UserCommand
$conditions_now = strtolower($data['weather'][0]['main']); $conditions_now = strtolower($data['weather'][0]['main']);
return sprintf( return sprintf(
'The temperature in %s (%s) is %s°C' . "\n" . 'The temperature in %s (%s) is %s°C' . PHP_EOL .
'Current conditions are: %s%s', 'Current conditions are: %s%s',
$data['name'], //city $data['name'], //city
$data['sys']['country'], //country $data['sys']['country'], //country
......
...@@ -232,7 +232,7 @@ class Request ...@@ -232,7 +232,7 @@ class Request
$result = ($e->getResponse()) ? (string) $e->getResponse()->getBody() : ''; $result = ($e->getResponse()) ? (string) $e->getResponse()->getBody() : '';
} finally { } finally {
//Logging verbose debug output //Logging verbose debug output
TelegramLog::endDebugLogTempStream("Verbose HTTP Request output:\n%s\n"); TelegramLog::endDebugLogTempStream('Verbose HTTP Request output:' . PHP_EOL . '%s' . PHP_EOL);
} }
return $result; return $result;
...@@ -271,7 +271,7 @@ class Request ...@@ -271,7 +271,7 @@ class Request
return ($e->getResponse()) ? (string) $e->getResponse()->getBody() : ''; return ($e->getResponse()) ? (string) $e->getResponse()->getBody() : '';
} finally { } finally {
//Logging verbose debug output //Logging verbose debug output
TelegramLog::endDebugLogTempStream("Verbose HTTP File Download Request output:\n%s\n"); TelegramLog::endDebugLogTempStream('Verbose HTTP File Download Request output:' . PHP_EOL . '%s' . PHP_EOL);
} }
} }
......
...@@ -198,7 +198,7 @@ class TelegramLog ...@@ -198,7 +198,7 @@ class TelegramLog
if (self::$monolog_update === null) { if (self::$monolog_update === null) {
self::$monolog_update = new Logger('bot_update_log'); self::$monolog_update = new Logger('bot_update_log');
// Create a formatter // Create a formatter
$output = "%message%\n"; $output = '%message%' . PHP_EOL;
$formatter = new LineFormatter($output); $formatter = new LineFormatter($output);
// Update handler // Update handler
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment