-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1075 from robfrawley/feature-remove-configurable-…
…post-processor-interface [Filters] [Post Processors] Remove configurable post processor interface for one interface and cleanup filter manager
- Loading branch information
Showing
8 changed files
with
150 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
Imagine/Filter/PostProcessor/ConfigurablePostProcessorInterface.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,12 +24,16 @@ | |
* | ||
* @author Alex Wilson <[email protected]> | ||
*/ | ||
class MozJpegPostProcessor implements PostProcessorInterface, ConfigurablePostProcessorInterface | ||
class MozJpegPostProcessor implements PostProcessorInterface | ||
{ | ||
/** @var string Path to the mozjpeg cjpeg binary */ | ||
/** | ||
* @var string Path to the mozjpeg cjpeg binary | ||
*/ | ||
protected $mozjpegBin; | ||
|
||
/** @var null|int Quality factor */ | ||
/** | ||
* @var null|int Quality factor | ||
*/ | ||
protected $quality; | ||
|
||
/** | ||
|
@@ -58,18 +62,6 @@ public function setQuality($quality) | |
return $this; | ||
} | ||
|
||
/** | ||
* @param BinaryInterface $binary | ||
* | ||
* @throws ProcessFailedException | ||
* | ||
* @return BinaryInterface | ||
*/ | ||
public function process(BinaryInterface $binary) | ||
{ | ||
return $this->processWithConfiguration($binary, []); | ||
} | ||
|
||
/** | ||
* @param BinaryInterface $binary | ||
* @param array $options | ||
|
@@ -78,7 +70,7 @@ public function process(BinaryInterface $binary) | |
* | ||
* @return BinaryInterface | ||
*/ | ||
public function processWithConfiguration(BinaryInterface $binary, array $options) | ||
public function process(BinaryInterface $binary, array $options = []): BinaryInterface | ||
{ | ||
$type = mb_strtolower($binary->getMimeType()); | ||
if (!in_array($type, ['image/jpeg', 'image/jpg'], true)) { | ||
|
Oops, something went wrong.