UniqueKey   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A doesKeyExist() 0 4 1
A dropKey() 0 4 1
A addKey() 0 4 1
A getNamePostfix() 0 4 1
1
<?php
2
namespace yentu\database;
3
4
class UniqueKey extends BasicKey
5
{ 
6
    #[\Override]
7
    protected function addKey($constraint) 
8
    {
9
        $this->getChangeLogger()->addUniqueKey($constraint);
0 ignored issues
show
Bug introduced by
The method addUniqueKey() does not exist on yentu\ChangeLogger. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

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

9
        $this->getChangeLogger()->/** @scrutinizer ignore-call */ addUniqueKey($constraint);
Loading history...
10
    }
11
12
    #[\Override]
13
    protected function doesKeyExist($constraint) 
14
    {
15
        return $this->getChangeLogger()->doesUniqueKeyExist($constraint);
0 ignored issues
show
Bug introduced by
The method doesUniqueKeyExist() does not exist on yentu\ChangeLogger. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

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

15
        return $this->getChangeLogger()->/** @scrutinizer ignore-call */ doesUniqueKeyExist($constraint);
Loading history...
16
    }
17
18
    #[\Override]
19
    protected function dropKey($constraint) 
20
    {
21
        $this->getChangeLogger()->dropUniqueKey($constraint);
0 ignored issues
show
Bug introduced by
The method dropUniqueKey() does not exist on yentu\ChangeLogger. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

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

21
        $this->getChangeLogger()->/** @scrutinizer ignore-call */ dropUniqueKey($constraint);
Loading history...
22
    }
23
24
    #[\Override]
25
    protected function getNamePostfix() 
26
    {
27
        return 'uk';
28
    }
29
}
30
31