Completed
Push — develop ( fa42c1...0ef7d4 )
by Sergei
22:52
created

PostgreSQL94Keywords   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 20
ccs 3
cts 5
cp 0.6
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getKeywords() 0 5 1
A getName() 0 3 1
1
<?php
2
3
namespace Doctrine\DBAL\Platforms\Keywords;
4
5
use function array_diff;
6
use function array_merge;
7
8
/**
9
 * PostgreSQL 9.4 reserved keywords list.
10
 */
11
class PostgreSQL94Keywords extends PostgreSQLKeywords
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function getName()
17
    {
18
        return 'PostgreSQL94';
19
    }
20
21
    /**
22
     * {@inheritdoc}
23
     *
24
     * @link http://www.postgresql.org/docs/9.4/static/sql-keywords-appendix.html
25
     */
26 2340
    protected function getKeywords()
27
    {
28 2340
        $parentKeywords = array_diff(parent::getKeywords(), ['OVER']);
29
30 2340
        return array_merge($parentKeywords, ['LATERAL']);
31
    }
32
}
33