Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
ResourceType
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
 __toString
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace Apie\ApieBundle\DataCollector\FieldData;
4
5class ResourceType extends AbstractFieldData
6{
7    /**
8     * @param resource $value
9     */
10    public function __construct(
11        mixed $value
12    ) {
13        assert(is_resource($value));
14        $this->data = get_resource_id($value);
15        $this->typehint = 'resource';
16    }
17
18    public function __toString(): string
19    {
20        return 'Resource ' . $this->data;
21    }
22}