Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
75.00% covered (warning)
75.00%
3 / 4
50.00% covered (danger)
50.00%
1 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
VectorComponentPinnableElement
75.00% covered (warning)
75.00%
3 / 4
50.00% covered (danger)
50.00%
1 / 2
2.06
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getTemplateData
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace MediaWiki\Skins\Vector\Components;
3
4/**
5 * VectorComponentPinnableElement component
6 */
7class VectorComponentPinnableElement implements VectorComponent {
8    /** @var string */
9    private $id;
10
11    public function __construct( string $id ) {
12        $this->id = $id;
13    }
14
15    /**
16     * @inheritDoc
17     */
18    public function getTemplateData(): array {
19        return [
20            'id' => $this->id,
21        ];
22    }
23}