Option::filter( callable $callable )
If the option is empty, it is returned immediately without applying the callable.
Description
If the option is non-empty, the callable is applied, and if it returns true, the option itself is returned; otherwise, None is returned.
Parameters
- $callable
-
(Required)
Return
(PhpOptionOption)
Source
File: vendor/phpoption/phpoption/src/PhpOption/Option.php
abstract public function filter($callable);