Dice   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 23
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A initOnce() 0 18 2
1
<?php
2
# Generated by the protocol buffer compiler.  DO NOT EDIT!
3
# source: protos/dice.proto
4
5
namespace MeadSteve\DiceApi\Protos\V1\Meta;
6
7
class Dice
8
{
9
    public static $is_initialized = false;
10
11
    public static function initOnce() {
12
        $pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
13
14
        if (static::$is_initialized == true) {
0 ignored issues
show
Coding Style Best Practice introduced by steve
It seems like you are loosely comparing two booleans. Considering using the strict comparison === instead.

When comparing two booleans, it is generally considered safer to use the strict comparison operator.

Loading history...
15
          return;
16
        }
17
        $pool->internalAddGeneratedFile(hex2bin(
18
            "0abf010a1170726f746f732f646963652e70726f746f121b4d6561645374" .
19
            "6576652e446963654170692e50726f746f732e563122230a044469636512" .
20
            "0d0a0576616c7565180120012805120c0a046e616d65180220012809223b" .
21
            "0a08526573706f6e7365122f0a046469636518012003280b32212e4d6561" .
22
            "6453746576652e446963654170692e50726f746f732e56312e4469636542" .
23
            "23e202204d65616453746576655c446963654170695c50726f746f735c56" .
24
            "315c4d657461620670726f746f33"
25
        ), true);
26
27
        static::$is_initialized = true;
28
    }
29
}
30
31