Lines 100.00% 4 / 4
Functions and Methods 100.00% 1 / 1
Classes and Traits 100.00% 1 / 1
Name Lines Functions and Methods CRAP Classes and Traits
TableName 100.00% 4 / 4 100.00% 1 / 1 2 100.00% 1 / 1
 table 100.00% 4 / 4 100.00% 1 / 1 2
1<?php
2
3namespace BO\Zmsbackend\Query\Builder;
4
5/**
6 * Table
7 *
8 * Used by INSERT and UPDATE to define which table to operate on.
9 *
10 * @package     BO\Zmsbackend\Query\Builder
11 * @author      Alex Gisby<alex@solution10.com>
12 * @license     MIT
13 */
14trait TableName
15{
16    /**
17     * @var     array     Table to update
18     */
19    protected $table = null;
20
21    /**
22     * Set/Get the table we're updating
23     *
24     * @param   string|null     $table      string to set, null to get
25     * @return  $this|string
26     */
27    public function table($table = null)
28    {
29        if ($table === null) {
30            return $this->table;
31        }
32        $this->table = $table;
33        return $this;
34    }
35}