Completed
Branch master (9dff9d)
by Albert
05:30
created

ResetConfig::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SwooleTW\Http\Server\Resetters;
4
5
use SwooleTW\Http\Server\Sandbox;
6
use Illuminate\Contracts\Container\Container;
7
use SwooleTW\Http\Server\Resetters\ResetterContract;
8
9
class ResetConfig implements ResetterContract
10
{
11
    /**
12
     * "handle" function for resetting app.
13
     *
14
     * @param \Illuminate\Contracts\Container\Container $app
15
     * @param \SwooleTW\Http\Server\Sandbox $sandbox
16
     */
17
    public function handle(Container $app, Sandbox $sandbox)
18
    {
19
        $app->instance('config', clone $sandbox->getConfig());
20
21
        return $app;
22
    }
23
}
24