Util::classEquals()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 2
crap 1
1
<?php
2
namespace EventStore\ValueObjects\Util;
3
4
/**
5
 * Utility class for methods used all across the library
6
 * @package ValueObjects\Util
7
 */
8
class Util
9
{
10
    /**
11
     * Tells whether two objects are of the same class
12
     *
13
     * @param  object $object_a
14
     * @param  object $object_b
15
     * @return bool
16
     */
17 5
    public static function classEquals($object_a, $object_b)
18
    {
19 5
        return \get_class($object_a) === \get_class($object_b);
20
    }
21
22
    /**
23
     * Returns full namespaced class as string
24
     *
25
     * @param $object
26
     * @return string
27
     */
28 1
    public static function getClassAsString($object)
29
    {
30 1
        return \get_class($object);
31
    }
32
}
33