VirtualTable::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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