Skip to content

Commit 6c0fddc

Browse files
committed
Merge pull request #3 from temp/fix-versions
fix deps, fix scrutinizer, fix travis
2 parents 2ac56a4 + 4729154 commit 6c0fddc

34 files changed

Lines changed: 544 additions & 589 deletions

.scrutinizer.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
inherit: true
2+
imports:
3+
- php
4+
tools:
5+
external_code_coverage:
6+
timeout: 600 # Timeout in seconds.
7+

.travis.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
language: php
22

33
php:
4-
- 5.3
5-
- 5.3.3
6-
- 5.4
74
- 5.5
5+
- 5.6
6+
- 7
7+
- hhvm
88

9-
before_script: composer install --prefer-source
9+
before_script: composer install
10+
11+
script: vendor/bin/phpunit -c tests --coverage-clover=coverage.clover
12+
13+
after_script:
14+
- sh -c 'if [ $(phpenv version-name) = "5.6" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi;'
1015

11-
script: phpunit -c tests

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2012-2013 brainbits GmbH (http://www.brainbits.net)
1+
Copyright (c) 2012-2016 brainbits GmbH (http://www.brainbits.net)
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1616
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1717
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19-
THE SOFTWARE.
19+
THE SOFTWARE.

composer.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@
1111
}
1212
],
1313
"require": {
14-
"php": ">=5.3.0",
15-
"symfony/http-foundation": "2.3.*"
14+
"php": ">=5.4.0"
1615
},
1716
"require-dev": {
18-
"mikey179/vfsStream": "1.2.*"
17+
"mikey179/vfsStream": "~1.2",
18+
"phpunit/phpunit": "~4.5",
19+
"symfony/http-foundation": "~2.3"
1920
},
2021
"autoload": {
21-
"psr-0": { "Brainbits": "src/" }
22+
"psr-4": { "Brainbits\\Blocking\\": "src/" }
2223
},
23-
"minimum-stability": "stable"
24+
"autoload-dev": {
25+
"psr-4": { "Brainbits\\Blocking\\Tests\\": "tests/" }
26+
}
2427
}

src/Brainbits/Blocking/Adapter/AdapterInterface.php renamed to src/Adapter/AdapterInterface.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
2-
/**
2+
3+
/*
34
* This file is part of the brainbits blocking package.
45
*
5-
* (c) 2012-2013 brainbits GmbH (http://www.brainbits.net)
6+
* (c) brainbits GmbH (http://www.brainbits.net)
67
*
78
* For the full copyright and license information, please view the LICENSE
89
* file that was distributed with this source code.

src/Brainbits/Blocking/Adapter/FilesystemAdapter.php renamed to src/Adapter/FilesystemAdapter.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
2-
/**
2+
3+
/*
34
* This file is part of the brainbits blocking package.
45
*
5-
* (c) 2012-2013 brainbits GmbH (http://www.brainbits.net)
6+
* (c) brainbits GmbH (http://www.brainbits.net)
67
*
78
* For the full copyright and license information, please view the LICENSE
89
* file that was distributed with this source code.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
2-
/**
2+
3+
/*
34
* This file is part of the brainbits blocking package.
45
*
5-
* (c) 2012-2013 brainbits GmbH (http://www.brainbits.net)
6+
* (c) brainbits GmbH (http://www.brainbits.net)
67
*
78
* For the full copyright and license information, please view the LICENSE
89
* file that was distributed with this source code.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
2-
/**
2+
3+
/*
34
* This file is part of the brainbits blocking package.
45
*
5-
* (c) 2012-2013 brainbits GmbH (http://www.brainbits.net)
6+
* (c) brainbits GmbH (http://www.brainbits.net)
67
*
78
* For the full copyright and license information, please view the LICENSE
89
* file that was distributed with this source code.

src/Brainbits/Blocking/BlockableInterface.php renamed to src/BlockableInterface.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
2-
/**
2+
3+
/*
34
* This file is part of the brainbits blocking package.
45
*
5-
* (c) 2012-2013 brainbits GmbH (http://www.brainbits.net)
6+
* (c) brainbits GmbH (http://www.brainbits.net)
67
*
78
* For the full copyright and license information, please view the LICENSE
89
* file that was distributed with this source code.
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
2-
/**
2+
3+
/*
34
* This file is part of the brainbits blocking package.
45
*
5-
* (c) 2012-2013 brainbits GmbH (http://www.brainbits.net)
6+
* (c) brainbits GmbH (http://www.brainbits.net)
67
*
78
* For the full copyright and license information, please view the LICENSE
89
* file that was distributed with this source code.
@@ -11,7 +12,7 @@
1112
namespace Brainbits\Blocking;
1213

1314
use Brainbits\Blocking\Adapter\AdapterInterface;
14-
use Brainbits\Blocking\Exception\BlockingException;
15+
use Brainbits\Blocking\Exception\BlockFailedException;
1516
use Brainbits\Blocking\Identifier\IdentifierInterface;
1617
use Brainbits\Blocking\Owner\OwnerInterface;
1718
use Brainbits\Blocking\Validator\ValidatorInterface;
@@ -55,14 +56,14 @@ public function __construct(AdapterInterface $adapter, OwnerInterface $owner, Va
5556
*
5657
* @param IdentifierInterface $identifier
5758
* @return BlockInterface
58-
* @throws BlockingException
59+
* @throws BlockFailedException
5960
*/
6061
public function block(IdentifierInterface $identifier)
6162
{
6263
if ($this->isBlocked($identifier)) {
6364
$block = $this->getBlock($identifier);
6465
if ((string)$block->getOwner() !== (string)$this->owner) {
65-
throw new BlockingException('Already blocked');
66+
throw new BlockFailedException('Already blocked');
6667
}
6768
$this->adapter->touch($block);
6869
return $block;

0 commit comments

Comments
 (0)