final public function transPreventCommit(bool $preventCommit = null): bool
    {
        if (null === $preventCommit) {
            return $this->preventCommit;
        }
        $previous = $this->preventCommit;
        $this->preventCommit = $preventCommit;
        return $previous;
    }
final public function transPreventCommit(bool $preventCommit = null): bool
    {
        if (null === $preventCommit) {
            return $this->preventCommit;
        }
        $previous = $this->preventCommit;
        $this->preventCommit = $preventCommit;
        return $previous;
    }
final public function transPreventCommit ( bool $ preventCommit = null ) : bool { if ( null === $ preventCommit ) { return $ this -> preventCommit ; } $ previous = $ this -> preventCommit ; $ this -> preventCommit = $ preventCommit ; return $ previous ; }
This function prevent the upper transaction to commit
In case of commit the transCommitMehod will trigger an error and return without commit

If argument $preventCommit is null then this function will return the current prevent commit state
Otherwise, It will set the prevent commit state to the argument value and return the previous value

@param bool|null $preventCommit
@return bool
This function prevent the upper transaction to commit In case of commit the transCommitMehod will trigger an error and return without commit