Closed Lloople closed 6 years ago
Merging #31 into master will increase coverage by
0.01%
. The diff coverage is76.47%
.
@@ Coverage Diff @@
## master #31 +/- ##
============================================
+ Coverage 77.5% 77.51% +0.01%
- Complexity 115 120 +5
============================================
Files 11 12 +1
Lines 369 387 +18
============================================
+ Hits 286 300 +14
- Misses 83 87 +4
Impacted Files | Coverage Δ | Complexity Δ | |
---|---|---|---|
src/TelegramDriver.php | 92.94% <50%> (-0.52%) |
46 <0> (+2) |
|
src/Extensions/Question.php | 80% <80%> (ø) |
3 <3> (?) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a4c86fc...5914156. Read the comment docs.
Thank you for the PR
I'm not sure if we need a custom Question class for this. You can already achieve this by using the Keyboard + KeyboardButton classes. So I'll skip this for now, as I don't want to have separate Question classes for each driver.
@mpociot thanks for your reply, I’ll try to implement the way you suggested 🙂
Hi @mpociot. Reviewing old PR I saw that I already tried something in this direction. I checked those classes you mention Keyboard
and KeyboardButton
but I cannot understand how to use them. Can you please give me some explanation or example of use? I couldn't find any test either.
I have an easy question about yes/no and I wanted to show those buttons in a single row.
I have extended the Botman's Question class to add this logic.
Maybe another possible improvement will be to delegate the conversion of question buttons to the Question object itself. That way the conditional will not be needed.