uruba/FinanCalc

View on GitHub
src/Utils/Lambdas.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
namespace FinanCalc\Utils {

    /**
     * Class Lambdas
     * @package FinanCalc\Constants
     */
    class Lambdas
    {

        /**
         * @return \Closure
         */
        public static function checkIfNotNegative()
        {
            return function ($param) {
                Helpers::checkIfNotNegativeNumberOrThrowAnException($param);
            };
        }

        /**
         * @return \Closure
         */
        public static function checkIfPositive()
        {
            return function ($param) {
                Helpers::checkIfPositiveNumberOrThrowAnException($param);
            };
        }

    }
}