src/Traver/Callback/OperatorCallbacks.php
/**
     * @param string $operator
     * @return Option Option of a callable.
     */
@param string $operator
@return Option Option of a callable.
@param string $operator @return Option Option of a callable .
public static function forOperator($operator)
    {
        $fun = null;
        switch ($operator) {
            case "+":
                $fun = [OperatorCallbacks::class, 'add'];
                break;
            case "-":
                $fun = [OperatorCallbacks::class, 'sub'];
                break;
        }
        return Option::fromValue($fun);
    }
public static function forOperator ( $ operator ) { $ fun = null ; switch ( $ operator ) { case " + " : $ fun = [ OperatorCallbacks :: class , 'add' ] ; break ; case " - " : $ fun = [ OperatorCallbacks :: class , 'sub' ] ; break ; } return Option :: fromValue ( $ fun ) ; }
@param string $operator
 @return Option Option of a callable.
@param string $operator @return Option Option of a callable .