Skip to content

Commit 719a8cf

Browse files
committed
feat: php-value-objectライブラリを追加し、Result関数にエラーハンドリングを強化
1 parent a20402b commit 719a8cf

File tree

3 files changed

+54
-3
lines changed

3 files changed

+54
-3
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"phpunit/php-code-coverage": "^11.0",
3333
"phpunit/phpunit": "^11.3",
3434
"phpstan/extension-installer": "^1.4",
35-
"phpstan/phpstan-strict-rules": "^1.6"
35+
"phpstan/phpstan-strict-rules": "^1.6",
36+
"wiz-develop/php-value-object": "^0.4"
3637
},
3738
"config": {
3839
"allow-plugins": {

composer.lock

Lines changed: 50 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Result/functions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Throwable;
99
use WizDevelop\PhpMonad\Option;
1010
use WizDevelop\PhpMonad\Result;
11+
use WizDevelop\PhpValueObject\Error\ErrorValue;
1112

1213
/**
1314
* Return a `Result\Ok` Result containing `$value`.
@@ -93,7 +94,7 @@ function transpose(Result $result): Option
9394

9495
/**
9596
* @template T
96-
* @template E
97+
* @template E of ErrorValue
9798
* @param (Result<T, E>|Result) ...$results
9899
* @return Result<bool, non-empty-list<E>>
99100
*/

0 commit comments

Comments
 (0)