Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pôle IS
Bundles Symfony 2
maybe
Commits
8fee3be3
Commit
8fee3be3
authored
Apr 10, 2019
by
Guillaume Perréal
Browse files
CS.
parent
bc62bf32
Pipeline
#5740
passed with stages
in 1 minute and 47 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
phpmd-ruleset.xml
View file @
8fee3be3
...
...
@@ -5,5 +5,5 @@
xsi:schemaLocation=
"http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation=
"http://pmd.sf.net/ruleset_xml_schema.xsd"
>
<rule
ref=
"vendor/irstea/phpmd-config/
strict
.xml"
/>
<rule
ref=
"vendor/irstea/phpmd-config/
loose
.xml"
/>
</ruleset>
src/Maybe.php
View file @
8fee3be3
...
...
@@ -54,19 +54,21 @@ abstract class Maybe implements \IteratorAggregate
abstract
public
function
resolve
(
callable
$withJust
,
callable
$withNothing
);
/**
* @param $default
* @param
mixed
$default
*
* @return mixed
*/
abstract
public
function
valueOr
(
$default
);
/**
* @throws NothingException
*
* @return mixed
*/
abstract
public
function
value
();
/**
* @return
mixed
* @return
array
*/
abstract
public
function
toArray
():
array
;
...
...
@@ -108,6 +110,8 @@ abstract class Maybe implements \IteratorAggregate
/**
* @param callable $generator
*
* @return Maybe
*/
public
static
function
run
(
callable
$generator
):
Maybe
{
...
...
src/Maybe/Just.php
View file @
8fee3be3
...
...
@@ -22,7 +22,7 @@ final class Just extends Maybe
/**
* Just constructor.
*
* @param $value
* @param
mixed
$value
*/
private
function
__construct
(
$value
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment