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
CachedBool
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
 getBool
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 * A bool along with information whether and how it was cached.
7 *
8 * @author Lucas Werkmeister
9 * @license GPL-2.0-or-later
10 */
11class CachedBool {
12
13    /**
14     * @var bool
15     */
16    private $bool;
17
18    /**
19     * @var Metadata
20     */
21    private $metadata;
22
23    /**
24     * @param bool $bool
25     * @param Metadata $metadata
26     */
27    public function __construct( $bool, Metadata $metadata ) {
28        $this->bool = $bool;
29        $this->metadata = $metadata;
30    }
31
32    /**
33     * @return bool
34     */
35    public function getBool() {
36        return $this->bool;
37    }
38
39    /**
40     * @return Metadata
41     */
42    public function getMetadata() {
43        return $this->metadata;
44    }
45
46}