console-helpers /
svn-buddy
| 1 | <?php |
||||||
| 2 | /** |
||||||
| 3 | * This file is part of the SVN-Buddy library. |
||||||
| 4 | * For the full copyright and license information, please view |
||||||
| 5 | * the LICENSE file that was distributed with this source code. |
||||||
| 6 | * |
||||||
| 7 | * @copyright Alexander Obuhovich <[email protected]> |
||||||
| 8 | * @link https://github.com/console-helpers/svn-buddy |
||||||
| 9 | */ |
||||||
| 10 | |||||||
| 11 | namespace ConsoleHelpers\SVNBuddy\Database; |
||||||
| 12 | |||||||
| 13 | |||||||
| 14 | trait TStatementProfiler |
||||||
| 15 | { |
||||||
| 16 | |||||||
| 17 | /** |
||||||
| 18 | * Turns the profiler on and off. |
||||||
| 19 | * |
||||||
| 20 | * @param boolean $active True to turn on, false to turn off. |
||||||
| 21 | * |
||||||
| 22 | * @return void |
||||||
| 23 | */ |
||||||
| 24 | 37 | public function setActive(bool $active) |
|||||
| 25 | { |
||||||
| 26 | 37 | $this->active = (bool)$active; |
|||||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||||||
| 27 | } |
||||||
| 28 | |||||||
| 29 | /** |
||||||
| 30 | * Is the profiler active? |
||||||
| 31 | * |
||||||
| 32 | * @return boolean |
||||||
| 33 | */ |
||||||
| 34 | 31 | public function isActive(): bool |
|||||
| 35 | { |
||||||
| 36 | 31 | return (bool)$this->active; |
|||||
| 37 | } |
||||||
| 38 | |||||||
| 39 | /** |
||||||
| 40 | * @inheritDoc |
||||||
| 41 | */ |
||||||
| 42 | 1 | public function getLogger(): \Psr\Log\LoggerInterface |
|||||
| 43 | { |
||||||
| 44 | 1 | return $this->logger; |
|||||
| 45 | } |
||||||
| 46 | |||||||
| 47 | /** |
||||||
| 48 | * @inheritDoc |
||||||
| 49 | */ |
||||||
| 50 | 1 | public function getLogLevel(): string |
|||||
| 51 | { |
||||||
| 52 | 1 | return $this->logLevel; |
|||||
| 53 | } |
||||||
| 54 | |||||||
| 55 | /** |
||||||
| 56 | * @inheritDoc |
||||||
| 57 | */ |
||||||
| 58 | 1 | public function setLogLevel(string $logLevel): void |
|||||
| 59 | { |
||||||
| 60 | 1 | $this->logLevel = $logLevel; |
|||||
|
0 ignored issues
–
show
|
|||||||
| 61 | } |
||||||
| 62 | |||||||
| 63 | /** |
||||||
| 64 | * @inheritDoc |
||||||
| 65 | */ |
||||||
| 66 | 1 | public function getLogFormat(): string |
|||||
| 67 | { |
||||||
| 68 | 1 | return $this->logFormat; |
|||||
| 69 | } |
||||||
| 70 | |||||||
| 71 | /** |
||||||
| 72 | * @inheritDoc |
||||||
| 73 | */ |
||||||
| 74 | 1 | public function setLogFormat(string $logFormat): void |
|||||
| 75 | { |
||||||
| 76 | 1 | $this->logFormat = $logFormat; |
|||||
|
0 ignored issues
–
show
|
|||||||
| 77 | } |
||||||
| 78 | |||||||
| 79 | /** |
||||||
| 80 | * @inheritDoc |
||||||
| 81 | */ |
||||||
| 82 | 17 | public function start(string $function): void |
|||||
|
0 ignored issues
–
show
The parameter
$function is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||||
| 83 | { |
||||||
| 84 | |||||||
| 85 | 17 | } |
|||||
| 86 | |||||||
| 87 | /** |
||||||
| 88 | * @inheritDoc |
||||||
| 89 | */ |
||||||
| 90 | 17 | public function finish(?string $statement = null, array $values = []): void |
|||||
|
0 ignored issues
–
show
The parameter
$statement is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
The parameter
$values is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||||
| 91 | { |
||||||
| 92 | |||||||
| 93 | 17 | } |
|||||
| 94 | |||||||
| 95 | } |
||||||
| 96 |