Skip to content

Commit

Permalink
remove type restriction callable
Browse files Browse the repository at this point in the history
The type check `is_callable()` returns true but the type hint throws
when the method is not static.
  • Loading branch information
Thomas Flori committed Jun 11, 2019
1 parent aaa7f8d commit d32eabe
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ before_script:
- composer install --no-interaction
- sh -c 'if [ "$TRAVIS_PHP_VERSION" = "7.1" ]; then composer require satooshi/php-coveralls:~0.6@stable; fi;'
- mkdir -p build/logs

script:
- composer code-style
- bin/phpunit -c phpunit.xml --color=always --coverage-clover=build/logs/clover.xml --coverage-text
Expand Down
2 changes: 1 addition & 1 deletion riki-dev/app/Http/HttpKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ protected static function collectRoutes(MiddlewareRouteCollector $router)
* @param callable $callable
* @return bool
*/
protected function isStatic(callable $callable): bool
protected function isStatic($callable): bool
{
if (is_array($callable)) {
list($class, $method) = $callable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use App\Application;
use function GuzzleHttp\Psr7\stream_for;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Tal\ServerResponse;

Expand Down
2 changes: 1 addition & 1 deletion skeleton/routing/app/Http/HttpKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ protected static function collectRoutes(MiddlewareRouteCollector $router)
* @param callable $callable
* @return bool
*/
protected function isStatic(callable $callable): bool
protected function isStatic($callable): bool
{
if (is_array($callable)) {
list($class, $method) = $callable;
Expand Down

0 comments on commit d32eabe

Please sign in to comment.