Skip to content

Commit 88e10f1

Browse files
committed
Update utils
1 parent 55491e6 commit 88e10f1

File tree

3 files changed

+26
-22
lines changed

3 files changed

+26
-22
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"activecollab/containeraccess": "^2.0",
1313
"activecollab/etag": "^1.0",
1414
"activecollab/templateengine": "^2.0",
15-
"activecollab/utils": "^1.0",
15+
"activecollab/utils": "^2.0",
1616
"psr/http-factory": "^1.0",
1717
"psr/http-message": "^1.0",
1818
"psr/log": "~1.0",

composer.lock

+18-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/src/Fixtures/ActionResultInContainer.php

+7-10
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,17 @@
1111
namespace ActiveCollab\Controller\Test\Fixtures;
1212

1313
use ActiveCollab\Controller\ActionResult\Container\ActionResultContainerInterface;
14+
use ActiveCollab\ValueContainer\ValueContainerInterface;
1415
use LogicException;
1516
use Pimple\Container;
1617
use RuntimeException;
1718

1819
class ActionResultInContainer implements ActionResultContainerInterface
1920
{
20-
/**
21-
* @var Container
22-
*/
23-
private $container;
21+
private Container $container;
22+
private string $key;
2423

25-
private $key;
26-
27-
public function __construct(Container $container, $key = 'action_result')
24+
public function __construct(Container $container, string $key = 'action_result')
2825
{
2926
$this->container = $container;
3027
$this->key = $key;
@@ -39,19 +36,19 @@ public function getValue()
3936
throw new RuntimeException('Action result not found in the container.');
4037
}
4138

42-
public function hasValue()
39+
public function hasValue(): bool
4340
{
4441
return $this->container->offsetExists($this->key);
4542
}
4643

47-
public function &setValue($value)
44+
public function setValue($value): ValueContainerInterface
4845
{
4946
$this->container[$this->key] = $value;
5047

5148
return $this;
5249
}
5350

54-
public function &removeValue()
51+
public function removeValue(): ValueContainerInterface
5552
{
5653
throw new LogicException("Value can't be removed.");
5754
}

0 commit comments

Comments
 (0)