Completed
Push — master ( 052b79...9b7d7f )
by Dmitry
08:01
created

src/views/package/fetch-error.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * @var \yii\web\View
5
 * @var \hiqdev\assetpackagist\models\AssetPackage $package
6
 * @var \Composer\Repository\InvalidRepositoryException $exception
7
 */
8
use yii\helpers\Html;
9
10
$this->title = 'Package update failed';
11
12
?>
13
<hr/>
14
<h3><?= $this->title ?></h3>
15
16
<?php if (isset($exception)) : ?>
17
    <blockquote><?= $exception->getMessage() ?></blockquote>
18
<?php endif ?>
19
20
<?php
21
22 View Code Duplication
if ($package->getType() === 'npm') {
0 ignored issues
show
This code seems to be duplicated across 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...
23
    $link = Html::a('npmjs.com', 'https://npmjs.com/search?q=' . $package->getName(), ['target' => '_blank']);
24
} elseif ($package->getType() === 'bower') {
25
    $link = Html::a('bower.io', 'https://bower.io/search?q=' . $package->getName(), ['target' => '_blank']);
26
}
27
28
?>
29
30
<h4>Could you ensure this package exists on <?= $link ?>?</h4>
31
<p>Think asset-packagist is guilty? <?= Html::a('Report on GitHub', 'https://github.com/hiqdev/asset-packagist/issues/new') ?>
32
</p>
33