Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Commit

Permalink
Merge pull request #12 from CodeIncHQ/2.x
Browse files Browse the repository at this point in the history
v2.0.1 second merge
  • Loading branch information
Joan Fabrégat authored Oct 8, 2018
2 parents 761d7e6 + 1f2bacb commit da651fe
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
9 changes: 8 additions & 1 deletion src/Responses/AssetResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ class AssetResponse extends FileResponse implements AssetResponseInterface
public function __construct(string $assetPath, string $mediaType)
{
$this->assetPath = $assetPath;
parent::__construct($assetPath, basename($assetPath), $mediaType, false);
parent::__construct(
$assetPath,
basename($assetPath),
200,
'',
$mediaType,
false
);
}


Expand Down
10 changes: 8 additions & 2 deletions src/Responses/MinifiedAssetResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
//
declare(strict_types=1);
namespace CodeInc\AssetsMiddleware\Responses;
use CodeInc\MediaTypes\MediaTypes;
use CodeInc\Psr7Responses\FileResponse;
use enshrined\svgSanitize\Sanitizer;
use function GuzzleHttp\Psr7\stream_for;
Expand Down Expand Up @@ -59,7 +58,14 @@ public function __construct(string $assetPath, string $mediaType)
{
$this->assetPath = $assetPath;
$this->mediaType = $mediaType;
parent::__construct($this->buildStream($assetPath), basename($assetPath), $mediaType, false);
parent::__construct(
$this->buildStream($assetPath),
basename($assetPath),
200,
'',
$mediaType,
false
);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Responses/NotModifiedAssetResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//
declare(strict_types=1);
namespace CodeInc\AssetsMiddleware\Responses;
use GuzzleHttp\Psr7\Response;
use CodeInc\Psr7Responses\EmptyResponse;


/**
Expand All @@ -30,7 +30,7 @@
* @package CodeInc\AssetsMiddleware\Responses
* @author Joan Fabrégat <[email protected]>
*/
class NotModifiedAssetResponse extends Response implements AssetResponseInterface
class NotModifiedAssetResponse extends EmptyResponse implements AssetResponseInterface
{
/**
* @var string
Expand Down

0 comments on commit da651fe

Please sign in to comment.