Skip to content

Commit 5726db9

Browse files
committed
Adjust code for PHP7.
1 parent 1e302a8 commit 5726db9

File tree

11 files changed

+98
-84
lines changed

11 files changed

+98
-84
lines changed

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,12 @@ cache:
1414
- $HOME/.composer/cache
1515

1616
php:
17-
- 5.6
1817
- 7.0
1918
- nightly
20-
- hhvm
2119

2220
matrix:
2321
allow_failures:
2422
- php: nightly
25-
- php: hhvm
2623
fast_finish: true
2724

2825
notifications:

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
}
1919
],
2020
"require": {
21-
"php": ">=5.6",
22-
"longman/telegram-bot": "0.35"
21+
"php": "^7.0",
22+
"longman/telegram-bot": "^0.35"
2323
},
2424
"autoload": {
2525
"psr-4": {
@@ -33,6 +33,6 @@
3333
},
3434
"require-dev": {
3535
"phpunit/phpunit": "^5.5",
36-
"squizlabs/php_codesniffer": "~2.6"
36+
"squizlabs/php_codesniffer": "^2.7"
3737
}
3838
}

composer.lock

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Action.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php declare(strict_types = 1);
22
/**
33
* This file is part of the TelegramBotManager package.
44
*
@@ -50,7 +50,7 @@ public function __construct($action = 'handle')
5050
*
5151
* @return bool
5252
*/
53-
public function isAction($actions)
53+
public function isAction($actions): bool
5454
{
5555
return in_array($this->action, (array)$actions, true);
5656
}
@@ -60,7 +60,7 @@ public function isAction($actions)
6060
*
6161
* @return string
6262
*/
63-
public function getAction()
63+
public function getAction(): string
6464
{
6565
return $this->action;
6666
}

0 commit comments

Comments
 (0)