Passed
Push — master ( f30a46...80b687 )
by Henri
06:03
created

dumpAttributeData()   A

Complexity

Conditions 4
Paths 6

Size

Total Lines 15
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 8
c 1
b 0
f 1
dl 0
loc 15
cc 4
nc 6
nop 1
rs 10
1
<?php
2
3
require __DIR__.'/../vendor/autoload.php';
4
require __DIR__.'/Models/User.php';
5
6
use Model\User;
7
8
$user = new User();
9
10
function dumpAttributeData($reflection) {
11
    $attributes = $reflection->getAttributes();
12
13
    foreach ($attributes as $attribute) {
14
       //var_dump($attribute->getName());
15
       //var_dump($attribute->getArguments());
16
       //var_dump($attribute->newInstance());
17
    }
18
19
    $properties = $reflection->getProperties();
20
    foreach ($properties as $property) {
21
        foreach ($property->getAttributes() as $attribute) {
22
            var_dump($attribute->getName());
0 ignored issues
show
Security Debugging Code introduced by
var_dump($attribute->getName()) looks like debug code. Are you sure you do not want to remove it?
Loading history...
23
            var_dump($attribute->getArguments());
24
            var_dump($attribute->newInstance());
25
        }
26
     }
27
28
}
29
30
dumpAttributeData(new ReflectionClass(User::class));