Skip to content

Commit

Permalink
Merge 576b686 into b5d1039
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeboer committed Apr 26, 2018
2 parents b5d1039 + 576b686 commit a5e67b6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -27,7 +27,7 @@ before_script:
script:
- ./vendor/bin/parallel-lint src tests
- ./vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml
- ./vendor/bin/phpcs src tests --standard=psr2 -sp
- ./vendor/bin/phpcs -sp

after_success:
- travis_retry php vendor/bin/coveralls
7 changes: 7 additions & 0 deletions phpcs.xml
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<ruleset name="http-range">
<file>./src</file>
<file>./tests</file>

<rule ref="PSR2" />
</ruleset>
4 changes: 3 additions & 1 deletion src/Range.php
Expand Up @@ -13,6 +13,7 @@

use Psr\Http\Message\RequestInterface;
use Ramsey\Http\Range\Exception\NoRangeException;
use Ramsey\Http\Range\Unit\UnitInterface;

/**
* Represents an HTTP Range request header
Expand Down Expand Up @@ -89,8 +90,9 @@ public function getUnitFactory()
/**
* Returns the unit parsed for this range request
*
* @return UnitInterface
* @throws NoRangeException if a range request is not present in the current request
*
* @return UnitInterface
*/
public function getUnit()
{
Expand Down
5 changes: 4 additions & 1 deletion src/UnitFactory.php
Expand Up @@ -15,6 +15,7 @@
use Ramsey\Http\Range\Exception\InvalidRangeUnitException;
use Ramsey\Http\Range\Unit\BytesUnit;
use Ramsey\Http\Range\Unit\GenericUnit;
use Ramsey\Http\Range\Unit\UnitInterface;

/**
* A default factory for creating bytes range units
Expand All @@ -26,9 +27,11 @@ class UnitFactory implements UnitFactoryInterface
*
* @param string $rangesSpecifier The original value of the HTTP Range header
* @param mixed $totalSize The total size of the entity described by this unit
* @return UnitInterface
*
* @throws InvalidRangeUnitException
* @throws InvalidRangeSetException
*
* @return UnitInterface
*/
public function getUnit($rangesSpecifier, $totalSize)
{
Expand Down
1 change: 1 addition & 0 deletions src/UnitFactoryInterface.php
Expand Up @@ -21,6 +21,7 @@ interface UnitFactoryInterface
*
* @param string $rangesSpecifier The original value of the HTTP Range header
* @param mixed $totalSize The total size of the entity described by this unit
*
* @return UnitInterface
*/
public function getUnit($rangesSpecifier, $totalSize);
Expand Down

0 comments on commit a5e67b6

Please sign in to comment.