This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
25
{
26
return [
27
74
static::TYPE_ID => [self::TYPE => 'string'],
28
74
static::ID => [self::TYPE => 'string'],
29
74
static::KEY => [self::TYPE => 'string']
30
74
];
31
}
32
33
/**
34
* @param $type
35
* @param $id
36
* @param Context|callable $context
37
* @return Reference
38
*/
39
71
public static function ofTypeAndId($type, $id, $context = null)
40
{
41
71
$reference = static::of($context);
42
71
return $reference->setTypeId($type)->setId($id);
43
}
44
45
/**
46
* @param $type
47
* @param $key
48
* @param Context|callable $context
49
* @return Reference
50
*/
51
1
public static function ofTypeAndKey($type, $key, $context = null)
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.