Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
CachedArray
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
3 / 3
3
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getArray
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getMetadata
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace WikibaseQuality\ConstraintReport\ConstraintCheck\Cache;
4
5/**
6 * An array (of unspecified nature) along with information whether and how it was cached.
7 *
8 * @author Lucas Werkmeister
9 * @license GPL-2.0-or-later
10 */
11class CachedArray {
12
13    /**
14     * @var array
15     */
16    private $array;
17
18    /**
19     * @var Metadata
20     */
21    private $metadata;
22
23    public function __construct( array $array, Metadata $metadata ) {
24        $this->array = $array;
25        $this->metadata = $metadata;
26    }
27
28    /**
29     * @return array
30     */
31    public function getArray() {
32        return $this->array;
33    }
34
35    /**
36     * @return Metadata
37     */
38    public function getMetadata() {
39        return $this->metadata;
40    }
41
42}