Skip to content

Commit

Permalink
Merge pull request #48 from Sam-Burns/phpspec4
Browse files Browse the repository at this point in the history
PhpSpec 4 compatibility
  • Loading branch information
mlopes committed Jul 31, 2017
2 parents 6c77676 + 774af85 commit 0a86a6c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ matrix:
include:
- php: 7.1
env: DEPENDENCIES='low'
- php: 5.6
- php: 7.0
- php: 7.1
- php: nightly
Expand Down
2 changes: 1 addition & 1 deletion Bossa/PhpSpec/Expect/Subject.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class Subject extends BaseSubject
{
public function __call($method, array $arguments = array())
public function __call(string $method, array $arguments = array())
{
if (preg_match('/^(to|notTo)(.+)$/', $method, $matches)) {
$method = 'should'.$matches[2];
Expand Down
4 changes: 2 additions & 2 deletions Bossa/PhpSpec/Expect/Wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use PhpSpec\Formatter\Presenter\Presenter;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use PhpSpec\Loader\Node\ExampleNode;

use PhpSpec\Wrapper\Subject as BaseSubject;
use PhpSpec\Wrapper\Subject\WrappedObject;
use PhpSpec\Wrapper\Subject\Caller;
use PhpSpec\Wrapper\Subject\SubjectWithArrayAccess;
Expand All @@ -33,7 +33,7 @@ public function __construct(MatcherManager $matchers, Presenter $presenter,
$this->accessInspector = $accessInspector;
}

public function wrap($value = null)
public function wrap($value = null): BaseSubject
{
$exceptionFactory = new ExceptionFactory($this->presenter);
$wrappedObject = new WrappedObject($value, $this->presenter);
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
},
"require": {
"phpspec/phpspec": "~3.2 <3.5.0"
"phpspec/phpspec": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^5.6|^6.0"
Expand Down

0 comments on commit 0a86a6c

Please sign in to comment.