• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CPS-IT / frontend-asset-handler / 20026575848

08 Dec 2025 11:28AM UTC coverage: 99.19% (-0.04%) from 99.232%
20026575848

push

github

web-flow
Merge pull request #806 from CPS-IT/task/codeclimate

[TASK] Drop CodeClimate integration

2450 of 2470 relevant lines covered (99.19%)

15.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/src/Exception/AssetHandlerFailedException.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of the Composer package "cpsit/frontend-asset-handler".
7
 *
8
 * Copyright (C) 2021 Elias Häußler <e.haeussler@familie-redlich.de>
9
 *
10
 * This program is free software: you can redistribute it and/or modify
11
 * it under the terms of the GNU General Public License as published by
12
 * the Free Software Foundation, either version 3 of the License, or
13
 * (at your option) any later version.
14
 *
15
 * This program is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 * GNU General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU General Public License
21
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22
 */
23

24
namespace CPSIT\FrontendAssetHandler\Exception;
25

26
use CPSIT\FrontendAssetHandler\Asset;
27
use RuntimeException;
28

29
/**
30
 * AssetHandlerFailedException.
31
 *
32
 * @author Elias Häußler <e.haeussler@familie-redlich.de>
33
 * @license GPL-3.0-or-later
34
 */
35
final class AssetHandlerFailedException extends RuntimeException
36
{
37
    public static function create(Asset\Asset $asset): self
2✔
38
    {
39
        if (null !== $asset->getTarget()) {
2✔
40
            $message = sprintf('Processing of asset from source "%s" to target "%s" failed.', $asset->getSource(), $asset->getTarget());
2✔
41
        } else {
42
            $message = sprintf('Processing of asset from source "%s" failed.', $asset->getSource());
×
43
        }
44

45
        return new self($message, 1623861520);
2✔
46
    }
47
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc