Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
Strip | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
perform | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * Karla ImageMagick wrapper library |
5 | * |
6 | * PHP Version 8.0< |
7 | * |
8 | * @category Utility |
9 | * @author Johannes Skov Frandsen <jsf@greenoak.dk> |
10 | * @license http://www.opensource.org/licenses/mit-license.php MIT |
11 | * @link https://github.com/localgod/karla Karla |
12 | * @since 2013-05-26 |
13 | */ |
14 | |
15 | declare(strict_types=1); |
16 | |
17 | namespace Karla\Action; |
18 | |
19 | use Karla\Query; |
20 | use Karla\Support; |
21 | use Karla\Action; |
22 | |
23 | /** |
24 | * Class for handeling strip action |
25 | * |
26 | * @category Utility |
27 | * @author Johannes Skov Frandsen <jsf@greenoak.dk> |
28 | * @license http://www.opensource.org/licenses/mit-license.php MIT |
29 | * @link https://github.com/localgod/karla Karla |
30 | */ |
31 | class Strip implements Action |
32 | { |
33 | /** |
34 | * (non-PHPdoc) |
35 | * |
36 | * @param Query $query |
37 | * The query to add the action to |
38 | * @return Query |
39 | * @see Action::perform() |
40 | */ |
41 | public function perform(Query $query): Query |
42 | { |
43 | $query->notWith('strip', Query::ARGUMENT_TYPE_INPUT); |
44 | $query->setInputOption(" -strip "); |
45 | return $query; |
46 | } |
47 | } |