Skip to content

Commit a46a3b9

Browse files
chore: Remove origin param
1 parent 13b1c81 commit a46a3b9

2 files changed

Lines changed: 1 addition & 27 deletions

File tree

src/Options.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111

1212
class Options implements \Stringable
1313
{
14-
/**
15-
* @var string
16-
*/
17-
public const ORIGIN = 'o';
18-
1914
/**
2015
* @var string
2116
*/
@@ -212,26 +207,6 @@ public function toString(): string
212207
return implode($this->optionSeparator, $options);
213208
}
214209

215-
/**
216-
* Set origin
217-
*/
218-
public function setOrigin(string $origin): self
219-
{
220-
$this->options[self::ORIGIN] = $origin;
221-
return $this;
222-
}
223-
224-
/**
225-
* Get origin
226-
*/
227-
public function getOrigin(): null|string
228-
{
229-
/** @var null|string $value */
230-
$value = $this->options[self::ORIGIN] ?? null;
231-
232-
return $value;
233-
}
234-
235210
/**
236211
* Set orientation
237212
*

tests/Unit/UrlBuilderTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@
256256

257257
test('generates signature with unicode characters', function (): void {
258258
$options = createOptions()
259-
->setOrigin('main')
260259
->setFormat('avif')
261260
->setQuality(90)
262261
->setWidth(600)
@@ -268,5 +267,5 @@
268267
$builder = new UrlBuilder('https://images.example.com', $secret);
269268
$url = $builder->buildUrl('images/unicode-%E9%BD%90%E8%89%B2-0.png', $options);
270269

271-
expect($url)->toBe('https://images.example.com/images/unicode-%E9%BD%90%E8%89%B2-0.png?fit=contain&fm=avif&h=600&o=main&q=90&w=600&s=T708sCDhGXdolPJellqE6HR4K510i0XY5pXq4KZtVc');
270+
expect($url)->toBe('https://images.example.com/images/unicode-%E9%BD%90%E8%89%B2-0.png?fit=contain&fm=avif&h=600&q=90&w=600&s=QdTpLQU32MvZqPpWTHupc6foZ3EHeVCLf2R1y6RW3U');
272271
});

0 commit comments

Comments
 (0)