Completed
Push — trunk ( 8dcff2...338765 )
by SuperNova.WS
04:11
created

StorageV2::setDb()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 2
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by Gorlum 21.04.2018 16:13
4
 */
5
6
namespace Core;
7
8
9
use DBAL\db_mysql;
10
11
class StorageV2 {
12
13
  /**
14
   * @var GlobalContainer $gc
15
   * @deprecated
16
   */
17
  protected $gc;
18
19
  /**
20
   * @var db_mysql
21
   */
22
  protected $db;
23
24
  /**
25
   * Core\Repository constructor.
26
   *
27
   * @param GlobalContainer $gc
28
   */
29
  public function __construct(GlobalContainer $gc) {
30
    $this->gc = $gc;
0 ignored issues
show
Deprecated Code introduced by
The property Core\StorageV2::$gc has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

30
    /** @scrutinizer ignore-deprecated */ $this->gc = $gc;
Loading history...
31
    $this->db = $gc->db;
32
  }
33
34
  /**
35
   * @param db_mysql $db
36
   */
37
  public function setDb(db_mysql $db) {
38
    $this->db = $db;
39
  }
40
41
}
42