Completed
Pull Request — master (#3808)
by Sergei
60:47
created

ExecutionMode::enableAutoCommit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\DBAL\Driver\OCI8;
6
7
/**
8
 * Encapsulates the execution mode that is shared between the connection and its statements.
9
 */
10
final class ExecutionMode
11
{
12
    /** @var bool */
13
    private $isAutoCommitEnabled = true;
14
15
    public function enableAutoCommit() : void
16
    {
17
        $this->isAutoCommitEnabled = true;
18
    }
19
20
    public function disableAutoCommit() : void
21
    {
22
        $this->isAutoCommitEnabled = false;
23
    }
24
25
    public function isAutoCommitEnabled() : bool
26
    {
27
        return $this->isAutoCommitEnabled;
28
    }
29
}
30