Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Merge branch '4.0.x' into typesafe-upgrades
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Thole <marcel@marcelthole.de>
  • Loading branch information
marcelthole authored Jul 17, 2024
2 parents ffaa151 + 38b84e1 commit 35c19d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"ext-mbstring": "*",
"laminas/laminas-math": "^3.4",
"laminas/laminas-stdlib": "^3.8",
"psr/container": "^1.1"
"psr/container": "^1.1 || ^2.0"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.5.0",
Expand Down
10 changes: 3 additions & 7 deletions src/Symmetric/PaddingPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Padding\PaddingInterface. Additionally, it registers a number of default
* padding adapters available.
*/
class PaddingPluginManager implements ContainerInterface
final class PaddingPluginManager implements ContainerInterface
{
/** @var array<string, string> */
private array $paddings = [
Expand All @@ -27,22 +27,18 @@ class PaddingPluginManager implements ContainerInterface

/**
* Do we have the padding plugin?
*
* @param string $id
* @return bool
*/
public function has($id)
public function has(string $id): bool
{
return array_key_exists($id, $this->paddings);
}

/**
* Retrieve the padding plugin
*
* @param string $id
* @return Padding\PaddingInterface
*/
public function get($id)
public function get(string $id)
{
if (! $this->has($id)) {
throw new Exception\NotFoundException(sprintf(
Expand Down
10 changes: 3 additions & 7 deletions src/SymmetricPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Symmetric\SymmetricInterface. Additionally, it registers a number of default
* symmetric adapters available.
*/
class SymmetricPluginManager implements ContainerInterface
final class SymmetricPluginManager implements ContainerInterface
{
/**
* Default set of symmetric adapters
Expand All @@ -30,22 +30,18 @@ class SymmetricPluginManager implements ContainerInterface

/**
* Do we have the symmetric plugin?
*
* @param string $id
* @return bool
*/
public function has($id)
public function has(string $id): bool
{
return array_key_exists($id, $this->symmetric);
}

/**
* Retrieve the symmetric plugin
*
* @param string $id
* @return Symmetric\SymmetricInterface
*/
public function get($id)
public function get(string $id)
{
if (! $this->has($id)) {
throw new Exception\NotFoundException(sprintf(
Expand Down

0 comments on commit 35c19d7

Please sign in to comment.