VirtualTable   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 4
c 1
b 0
f 0
dl 0
loc 29
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getParams() 0 2 1
A getTableName() 0 2 1
A __construct() 0 4 1
A __toString() 0 2 1
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