Passed
Push — main ( 58bb3a...1a0bc1 )
by Thierry
01:57
created

DumpUtilTrait::importServerPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Lagdo\DbAdmin\Db\Traits;
4
5
trait DumpUtilTrait
6
{
7
    /**
8
     * Returns export format options
9
     *
10
     * @return array
11
     */
12
    public function dumpFormat(): array
13
    {
14
        return ['sql' => 'SQL', 'csv' => 'CSV,', 'csv;' => 'CSV;', 'tsv' => 'TSV'];
15
    }
16
17
    /**
18
     * Returns export output options
19
     *
20
     * @return array
21
     */
22
    public function dumpOutput(): array
23
    {
24
        $output = ['text' => $this->trans->lang('open'), 'file' => $this->trans->lang('save')];
25
        if (\function_exists('gzencode')) {
26
            $output['gz'] = 'gzip';
27
        }
28
        return $output;
29
    }
30
31
    /**
32
     * Set the path of the file for webserver load
33
     *
34
     * @return string
35
     */
36
    public function importServerPath(): string
37
    {
38
        return 'adminer.sql';
39
    }
40
}
41