VirtualTable::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Kir\MySQL\Tools;
4
5
class VirtualTable {
6
	/**
7
	 * @param string $tableName
8
	 * @param array<string, mixed> $params
9
	 */
10
	public function __construct(
11
		private string $tableName,
12
		private array $params = [],
13
	) {}
14
15
	/**
16
	 * @return string
17
	 */
18
	public function getTableName(): string {
19
		return $this->tableName;
20
	}
21
22
	/**
23
	 * @return array<string, mixed>
24
	 */
25
	public function getParams(): array {
26
		return $this->params;
27
	}
28
29
	/**
30
	 * @return string
31
	 */
32
	public function __toString(): string {
33
		return $this->getTableName();
34
	}
35
}
36