Completed
Pull Request — master (#52)
by
unknown
02:44
created

Handler::export()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 6
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Blast Project package.
5
 *
6
 * Copyright (C) 2015-2017 Libre Informatique
7
 *
8
 * This file is licenced under the GNU LGPL v3.
9
 * For the full copyright and license information, please view the LICENSE.md
10
 * file that was distributed with this source code.
11
 */
12
13
namespace Blast\CoreBundle\Admin;
14
15
use Exporter\Handler as BaseCacheHandler;
16
17
class Handler extends BaseCacheHandler
18
{
19
    public function export()
20
    {
21
        $this->writer->open();
22
23
        dump('ici');die;
0 ignored issues
show
Coding Style Compatibility introduced by
The method export() contains an exit expression.

An exit expression should only be used in rare cases. For example, if you write a short command line script.

In most cases however, using an exit expression makes the code untestable and often causes incompatibilities with other libraries. Thus, unless you are absolutely sure it is required here, we recommend to refactor your code to avoid its usage.

Loading history...
24
25
        foreach ($this->source as $data) {
0 ignored issues
show
Unused Code introduced by
foreach ($this->source a...writer->write($data); } does not seem to be reachable.

This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.

Unreachable code is most often the result of return, die or exit statements that have been added for debug purposes.

function fx() {
    try {
        doSomething();
        return true;
    }
    catch (\Exception $e) {
        return false;
    }

    return false;
}

In the above example, the last return false will never be executed, because a return statement has already been met in every possible execution path.

Loading history...
26
            $this->writer->write($data);
27
        }
28
29
        $this->writer->close();
30
    }
31
}
32