Skip to content

Commit

Permalink
sync with nette/application 3.1.4+ (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
forgie1 authored Oct 9, 2021
1 parent f284c86 commit d4618db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0']
php: ['7.2', '7.3', '7.4', '8.0']

name: PHP ${{ matrix.php }}

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
}
],
"require": {
"php": "^7.1 || ^8.0",
"nette/application": "^3.0.3",
"php": "^7.2 || ^8.0",
"nette/application": "^3.1.4",
"nette/utils": "^3.0"
},
"require-dev": {
Expand Down
9 changes: 4 additions & 5 deletions src/SecuredLinksControlTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ trait SecuredLinksControlTrait
/**
* {@inheritdoc}
*/
public function link(string $destination, $args = []): string
public function link(string $destination, ...$args): string
{
if (!is_array($args)) {
$args = func_get_args();
array_shift($args);
}
$args = count($args) === 1 && is_array($args[0] ?? null)
? $args[0]
: $args;

$link = parent::link($destination, $args);
return $this->getPresenter()->createSecuredLink($this, $link, $destination);
Expand Down

0 comments on commit d4618db

Please sign in to comment.