-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- nette/application updated from v3.2.1 to v3.2.3 patch See changes: nette/application@v3.2.1...v3.2.3 Release notes: https://github.com/nette/application/releases/tag/v3.2.3 - nette/bootstrap updated from v3.2.2 to v3.2.3 patch See changes: nette/bootstrap@v3.2.2...v3.2.3 Release notes: https://github.com/nette/bootstrap/releases/tag/v3.2.3 - paragonie/halite updated from v5.1.0 to v5.1.1 patch See changes: paragonie/halite@v5.1.0...v5.1.1 Release notes: https://github.com/paragonie/halite/releases/tag/v5.1.1 - phpstan/phpstan updated from 1.10.66 to 1.10.67 patch See changes: phpstan/phpstan@1.10.66...1.10.67 Release notes: https://github.com/phpstan/phpstan/releases/tag/1.10.67 - roave/security-advisories updated from dev-latest@31f3738 to dev-latest@a6fb2a7 See changes: Roave/SecurityAdvisories@31f3738...a6fb2a7 - shipmonk/composer-dependency-analyser updated from 1.4.0 to 1.5.2 minor See changes: shipmonk-rnd/composer-dependency-analyser@1.4.0...1.5.2 Release notes: https://github.com/shipmonk-rnd/composer-dependency-analyser/releases/tag/1.5.2 - spaze/phpstan-disallowed-calls updated from v3.1.2 to v3.2.0 minor See changes: spaze/phpstan-disallowed-calls@v3.1.2...v3.2.0 Release notes: https://github.com/spaze/phpstan-disallowed-calls/releases/tag/v3.2.0
- Loading branch information
Showing
80 changed files
with
2,565 additions
and
1,416 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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
declare(strict_types = 1); | ||
|
||
namespace MichalSpacekCz\Application; | ||
|
||
use MichalSpacekCz\ShouldNotHappenException; | ||
use Nette\Application\LinkGenerator as NetteLinkGenerator; | ||
use Nette\Application\UI\InvalidLinkException; | ||
|
||
readonly class LinkGenerator | ||
{ | ||
|
||
public function __construct( | ||
private NetteLinkGenerator $linkGenerator, | ||
) { | ||
} | ||
|
||
|
||
/** | ||
* Same as `Nette\Application\LinkGenerator::link()` but will always return just string, not string|null. | ||
* | ||
* @param array<int|string, string|null> $args | ||
* @throws InvalidLinkException | ||
*/ | ||
public function link(string $destination, array $args = [], ?NetteLinkGenerator $linkGenerator = null): string | ||
{ | ||
$link = ($linkGenerator ?? $this->linkGenerator)->link($destination, $args); | ||
if ($link === null) { | ||
throw new ShouldNotHappenException('Link should be a string, null returned'); | ||
} | ||
return $link; | ||
} | ||
|
||
} |
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
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
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
Oops, something went wrong.