Code Duplication    Length = 14-14 lines in 3 locations

src/services/ElementByString.php 1 location

@@ 47-60 (lines=14) @@
44
    /**
45
     * @inheritdoc
46
     */
47
    public function findCache($identifier, int $siteId = null)
48
    {
49
50
        if ($model = parent::findCache($identifier)) {
51
            return $model;
52
        }
53
54
        if (!is_string($identifier)) {
55
            return null;
56
        }
57
58
        return $this->findCacheByString($identifier);
59
60
    }
61
62
    /**
63
     * @inheritdoc

src/services/ModelByString.php 1 location

@@ 48-61 (lines=14) @@
45
    /**
46
     * @inheritdoc
47
     */
48
    public function findCache($identifier)
49
    {
50
51
        if ($model = parent::findCache($identifier)) {
52
            return $model;
53
        }
54
55
        if (!is_string($identifier)) {
56
            return null;
57
        }
58
59
        return $this->findCacheByString($identifier);
60
61
    }
62
63
    /**
64
     * @inheritdoc

src/services/ObjectByString.php 1 location

@@ 48-61 (lines=14) @@
45
    /**
46
     * @inheritdoc
47
     */
48
    public function findCache($identifier)
49
    {
50
51
        if ($model = parent::findCache($identifier)) {
52
            return $model;
53
        }
54
55
        if (!is_string($identifier)) {
56
            return null;
57
        }
58
59
        return $this->findCacheByString($identifier);
60
61
    }
62
63
    /**
64
     * @inheritdoc