ResetConfig   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 15
rs 10
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
8
class ResetConfig implements ResetterContract
9
{
10
    /**
11
     * "handle" function for resetting app.
12
     *
13
     * @param \Illuminate\Contracts\Container\Container $app
14
     * @param \SwooleTW\Http\Server\Sandbox $sandbox
15
     *
16
     * @return \Illuminate\Contracts\Container\Container
17
     */
18
    public function handle(Container $app, Sandbox $sandbox)
19
    {
20
        $app->instance('config', clone $sandbox->getConfig());
21
22
        return $app;
23
    }
24
}
25