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    /**
12     * @param string $id
13     */
14    public function __construct( string $id ) {
15        $this->id = $id;
16    }
17
18    /**
19     * @inheritDoc
20     */
21    public function getTemplateData(): array {
22        return [
23            'id' => $this->id,
24        ];
25    }
26}