Passed
Push — master ( 4c2a8d...f1f030 )
by Hannes
02:10
created

DeclareStrictTypes   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 3
c 1
b 0
f 0
dl 0
loc 10
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A asAttribute() 0 3 1
1
<?php
2
3
// phpcs:disable PSR1.Files.SideEffects
4
5
declare(strict_types=1);
6
7
namespace hanneskod\readmetester\Attribute;
8
9
#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_ALL)]
10
class DeclareStrictTypes extends DeclareDirective
11
{
12
    public function __construct()
13
    {
14
        parent::__construct("strict_types=1");
15
    }
16
17
    public function asAttribute(): string
18
    {
19
        return self::createAttribute();
20
    }
21
}
22