| Total Complexity | 8 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Blob |
||
| 8 | { |
||
| 9 | /** @var string */ |
||
| 10 | private $name; |
||
| 11 | |||
| 12 | /** @var string */ |
||
| 13 | private $url; |
||
| 14 | |||
| 15 | /** @var string */ |
||
| 16 | private $contentMd5; |
||
| 17 | |||
| 18 | /** @var string */ |
||
| 19 | private $md5; |
||
| 20 | |||
| 21 | 5 | public function __construct( |
|
| 22 | string $name, |
||
| 23 | string $url, |
||
| 24 | string $contentMd5 |
||
| 25 | ) { |
||
| 26 | 5 | $this->name = $name; |
|
| 27 | 5 | $this->url = $url; |
|
| 28 | 5 | $this->contentMd5 = $contentMd5; |
|
| 29 | 5 | $this->md5 = $this->convertMd5BlobToMd5Standard($contentMd5); |
|
| 30 | 5 | } |
|
| 31 | |||
| 32 | 9 | public static function convertMd5BlobToMd5Standard(string $stringBase64): string |
|
| 43 | ) |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | |||
| 47 | 2 | public function name(): string |
|
| 48 | { |
||
| 49 | 2 | return $this->name; |
|
| 50 | } |
||
| 51 | |||
| 52 | 3 | public function url(): string |
|
| 53 | { |
||
| 54 | 3 | return $this->url; |
|
| 55 | } |
||
| 56 | |||
| 57 | 1 | public function contentMd5(): string |
|
| 60 | } |
||
| 61 | |||
| 62 | 3 | public function md5(): string |
|
| 65 | } |
||
| 66 | } |
||
| 67 |