Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
TelegramBot
Commits
b12b2e99
Commit
b12b2e99
authored
Dec 31, 2016
by
Armando Lüscher
Committed by
GitHub
Dec 31, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #372 from noplanman/php_eol
Use PHP_EOL for new lines.
parents
6c28819d
206e795c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
SendtoallCommand.php
src/Commands/AdminCommands/SendtoallCommand.php
+3
-3
WeatherCommand.php
src/Commands/UserCommands/WeatherCommand.php
+1
-1
Request.php
src/Request.php
+2
-2
TelegramLog.php
src/TelegramLog.php
+1
-1
No files found.
src/Commands/AdminCommands/SendtoallCommand.php
View file @
b12b2e99
...
...
@@ -74,7 +74,7 @@ class SendtoallCommand extends AdminCommand
$total
=
0
;
$failed
=
0
;
$text
=
'Message sent to:'
.
"
\n
"
;
$text
=
'Message sent to:'
.
PHP_EOL
;
/** @var ServerResponse $result */
foreach
(
$results
as
$result
)
{
...
...
@@ -99,9 +99,9 @@ class SendtoallCommand extends AdminCommand
}
++
$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
)
{
$text
=
'No users or chats found..'
;
...
...
src/Commands/UserCommands/WeatherCommand.php
View file @
b12b2e99
...
...
@@ -103,7 +103,7 @@ class WeatherCommand extends UserCommand
$conditions_now
=
strtolower
(
$data
[
'weather'
][
0
][
'main'
]);
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'
,
$data
[
'name'
],
//city
$data
[
'sys'
][
'country'
],
//country
...
...
src/Request.php
View file @
b12b2e99
...
...
@@ -232,7 +232,7 @@ class Request
$result
=
(
$e
->
getResponse
())
?
(
string
)
$e
->
getResponse
()
->
getBody
()
:
''
;
}
finally
{
//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
;
...
...
@@ -271,7 +271,7 @@ class Request
return
(
$e
->
getResponse
())
?
(
string
)
$e
->
getResponse
()
->
getBody
()
:
''
;
}
finally
{
//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
);
}
}
...
...
src/TelegramLog.php
View file @
b12b2e99
...
...
@@ -198,7 +198,7 @@ class TelegramLog
if
(
self
::
$monolog_update
===
null
)
{
self
::
$monolog_update
=
new
Logger
(
'bot_update_log'
);
// Create a formatter
$output
=
"%message%
\n
"
;
$output
=
'%message%'
.
PHP_EOL
;
$formatter
=
new
LineFormatter
(
$output
);
// Update handler
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment