private static function commit()
    {
        $transaction = env('SIMPLES_TRANSACTION_CLASS', '\\Simples\\Persistence\\Transaction');
        if (!class_exists($transaction)) {
            return;
        }

        if (!method_exists($transaction, 'commit')) {
            throw new ErrorException("The transaction commit method was not found");
        }

        /** @noinspection PhpUnnecessaryFullyQualifiedNameInspection, PhpUndefinedMethodInspection */
        if (!$transaction::commit()) {
            throw new ErrorException("Transaction can't commit the changes");
        }
    }
private static function commit()
    {
        $transaction = env('SIMPLES_TRANSACTION_CLASS', '\\Simples\\Persistence\\Transaction');
        if (!class_exists($transaction)) {
            return;
        }

        if (!method_exists($transaction, 'commit')) {
            throw new ErrorException("The transaction commit method was not found");
        }

        /** @noinspection PhpUnnecessaryFullyQualifiedNameInspection, PhpUndefinedMethodInspection */
        if (!$transaction::commit()) {
            throw new ErrorException("Transaction can't commit the changes");
        }
    }
private static function commit ( ) { $ transaction = env ( 'SIMPLES_TRANSACTION_CLASS' , '\\Simples\\Persistence\\Transaction' ) ; if ( ! class_exists ( $ transaction ) ) { return ; } if ( ! method_exists ( $ transaction , 'commit' ) ) { throw new ErrorException ( "The transaction commit method was not found" ) ; } /** @noinspection PhpUnnecessaryFullyQualifiedNameInspection, PhpUndefinedMethodInspection */ if ( ! $ transaction :: commit ( ) ) { throw new ErrorException ( "Transaction can't commit the changes" ) ; } }
Make a global commit of all changes made into request

@throws ErrorException Generated when is not possible commit the changes
Make a global commit of all changes made into request