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

ResetConfig   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 5 1
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