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
namespace Kir\MySQL\Tools;
3
4
class VirtualTable {
5
	/**
6
	 * @param string $tableName
7
	 * @param array<string, mixed> $params
8
	 */
9
	public function __construct(
10
		private string $tableName,
11
		private array $params = []
12
	) {}
13
14
	/**
15
	 * @return string
16
	 */
17
	public function getTableName(): string {
18
		return $this->tableName;
19
	}
20
21
	/**
22
	 * @return array<string, mixed>
23
	 */
24
	public function getParams(): array {
25
		return $this->params;
26
	}
27
28
	/**
29
	 * @return string
30
	 */
31
	public function __toString(): string {
32
		return $this->getTableName();
33
	}
34
}
35