TableBase   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 17
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
init() 0 1 ?
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: UramnOIL
5
 * Date: 2018/10/06
6
 * Time: 23:27
7
 */
8
9
namespace VectorNetworkProject\DataProvider\Tables;
10
11
12
use poggit\libasynql\DataConnector;
13
14
abstract class TableBase
15
{
16
	/** @var DataConnector */
17
	protected $connector;
18
	public final function __construct(DataConnector $connector)
19
	{
20
		$this->connector = $connector;
21
		$this->init();
22
	}
23
24
	/**
25
	 * テーブルを初期化用します
26
	 * 初期化用のクエリ(CREATE TABLE IF NOT EXISTS...)を呼んでください
27
	 * TableBaseのコンストラクタで呼ぶので気にする必要はないです
28
	 */
29
	public abstract function init(): void;
30
}