File tree 5 files changed +12
-8
lines changed
5 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,11 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
8
8
- Bot API 4.3 (Seamless Telegram Login, ` LoginUrl ` )
9
9
- ` reply_markup ` field to ` Message ` entity.
10
10
### Changed
11
+ - Use PSR-12 for code style.
11
12
### Deprecated
12
13
### Removed
13
14
### Fixed
15
+ - ` forward_date ` is now correctly saved to the DB.
14
16
### Security
15
17
16
18
## [ 0.57.0] - 2019-06-01
Original file line number Diff line number Diff line change 47
47
},
48
48
"scripts" : {
49
49
"check-code" : [
50
- " \" vendor/bin/phpcs\" --standard=phpcs.xml -snp --encoding=utf-8 src/ tests/ --report-width=150 "
50
+ " \" vendor/bin/phpcs\" --standard=phpcs.xml -snp src/ tests/"
51
51
],
52
52
"test" : [
53
53
" \" vendor/bin/phpunit\" "
Original file line number Diff line number Diff line change 3
3
<description >PHP Code Sniffer</description >
4
4
5
5
<arg name =" colors" />
6
+ <arg name =" parallel" value =" 8" />
7
+ <arg name =" encoding" value =" utf-8" />
8
+ <arg name =" report-width" value =" 150" />
6
9
7
- <rule ref =" PSR2 " />
10
+ <rule ref =" PSR12 " />
8
11
9
12
<rule ref =" Generic.CodeAnalysis.EmptyStatement" />
10
13
<rule ref =" Generic.CodeAnalysis.UselessOverridingMethod" />
Original file line number Diff line number Diff line change @@ -881,18 +881,17 @@ public static function insertMessageRequest(Message $message)
881
881
}
882
882
883
883
// Insert the forwarded message user in users table
884
- $ forward_date = null ;
884
+ $ forward_date = $ message ->getForwardDate () ? self ::getTimestamp ($ message ->getForwardDate ()) : null ;
885
+
885
886
$ forward_from = $ message ->getForwardFrom ();
886
887
if ($ forward_from instanceof User) {
887
- self ::insertUser ($ forward_from, $ forward_date );
888
+ self ::insertUser ($ forward_from );
888
889
$ forward_from = $ forward_from ->getId ();
889
- $ forward_date = self ::getTimestamp ($ message ->getForwardDate ());
890
890
}
891
891
$ forward_from_chat = $ message ->getForwardFromChat ();
892
892
if ($ forward_from_chat instanceof Chat) {
893
- self ::insertChat ($ forward_from_chat, $ forward_date );
893
+ self ::insertChat ($ forward_from_chat );
894
894
$ forward_from_chat = $ forward_from_chat ->getId ();
895
- $ forward_date = self ::getTimestamp ($ message ->getForwardDate ());
896
895
}
897
896
898
897
// New and left chat member
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ public function testCommandConstructorNeedsTelegramObject()
74
74
[null ],
75
75
[12345 ],
76
76
['something ' ],
77
- [new \stdClass ],
77
+ [new \stdClass () ],
78
78
[$ this ->telegram ], // only this one is valid
79
79
];
80
80
You can’t perform that action at this time.
0 commit comments