Code Duplication    Length = 7-7 lines in 2 locations

core/services/assets/BlockAssetManager.php 2 locations

@@ 153-159 (lines=7) @@
150
     * @throws InvalidEntityException
151
     * @throws DuplicateCollectionIdentifierException
152
     */
153
    public function addEditorScript($handle, array $dependencies = array())
154
    {
155
        if ($this->assets->hasJavascriptAsset($handle)){
156
            return $this->assets->getJavascriptAsset($handle);
157
        }
158
        return $this->addJs($handle, $dependencies)->setRequiresTranslation();
159
    }
160
161
162
    /**
@@ 189-195 (lines=7) @@
186
     * @throws InvalidEntityException
187
     * @throws DuplicateCollectionIdentifierException
188
     */
189
    public function addScript($handle, array $dependencies = array())
190
    {
191
        if ($this->assets->hasJavascriptAsset($handle)) {
192
            return $this->assets->getJavascriptAsset($handle);
193
        }
194
        return $this->addJs($handle, $dependencies)->setRequiresTranslation();
195
    }
196
197
198
    /**