GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

AbstractOptionsBlock::getBooleanLabel()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 3
c 0
b 0
f 0
nc 2
nop 1
dl 0
loc 6
ccs 0
cts 4
cp 0
crap 6
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQLAPI\GraphQLAPI\Blocks;
6
7
/**
8
 * Query Execution (endpoint and persisted query) Options block
9
 */
10
abstract class AbstractOptionsBlock extends AbstractBlock
11
{
12
    /**
13
     * Given a bool, return its label for rendering
14
     */
15
    protected function getBooleanLabel(bool $value): string
16
    {
17
        if ($value) {
18
            return \__('✅ Yes', 'graphql-api');
19
        }
20
        return \__('❌ No', 'graphql-api');
21
    }
22
}
23