Passed
Push — master ( 05aad8...1cc51e )
by Thomas
05:47 queued 03:28
created

HasUuid::byUuid()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
namespace LeKoala\Uuid;
4
5
/**
6
 * Happy IDEs with this trait :-)
7
 */
8
trait HasUuid
9
{
10
    /**
11
     * @param string $value
12
     * @param string $format
13
     * @return static
14
     */
15
    public static function byUuid($value, $format = null)
16
    {
17
        return UuidExtension::getByUuid(get_called_class(), $value, $format);
0 ignored issues
show
Bug Best Practice introduced by
The expression return LeKoala\Uuid\Uuid...ass(), $value, $format) returns the type SilverStripe\ORM\DataObject|false which is incompatible with the documented return type LeKoala\Uuid\HasUuid.
Loading history...
18
    }
19
}
20