Code Duplication    Length = 11-11 lines in 5 locations

Zewa/HTTP/Cookie.php 1 location

@@ 8-18 (lines=11) @@
5
use Zewa\Container;
6
use Zewa\Security;
7
8
final class Cookie extends SuperGlobal
9
{
10
    public function __construct(Container $container, Security $security)
11
    {
12
        parent::__construct($container, $security);
13
14
        $cookie = $_COOKIE ?? [];
15
        $this->registerGlobal($cookie);
16
    }
17
}
18

Zewa/HTTP/File.php 1 location

@@ 8-18 (lines=11) @@
5
use Zewa\Container;
6
use Zewa\Security;
7
8
final class File extends SuperGlobal
9
{
10
    public function __construct(Container $container, Security $security)
11
    {
12
        parent::__construct($container, $security);
13
14
        $files = $_FILES ?? [];
15
        $this->registerGlobal($files);
16
    }
17
}
18

Zewa/HTTP/Get.php 1 location

@@ 8-18 (lines=11) @@
5
use Zewa\Container;
6
use Zewa\Security;
7
8
final class Get extends SuperGlobal
9
{
10
    public function __construct(Container $container, Security $security)
11
    {
12
        parent::__construct($container, $security);
13
14
        $get = $_GET ?? [];
15
        $this->registerGlobal($get);
16
    }
17
}
18

Zewa/HTTP/Post.php 1 location

@@ 8-18 (lines=11) @@
5
use Zewa\Container;
6
use Zewa\Security;
7
8
final class Post extends SuperGlobal
9
{
10
    public function __construct(Container $container, Security $security)
11
    {
12
        parent::__construct($container, $security);
13
14
        $post = $_POST ?? [];
15
        $this->registerGlobal($post);
16
    }
17
}
18

Zewa/HTTP/Server.php 1 location

@@ 8-18 (lines=11) @@
5
use Zewa\Container;
6
use Zewa\Security;
7
8
final class Server extends SuperGlobal
9
{
10
    public function __construct(Container $container, Security $security)
11
    {
12
        parent::__construct($container, $security);
13
14
        $server = $_SERVER ?? [];
15
        $this->registerGlobal($server);
16
    }
17
}
18