1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | /* |
||
6 | * This file is part of the box project. |
||
7 | * |
||
8 | * (c) Kevin Herrera <[email protected]> |
||
9 | * Théo Fidry <[email protected]> |
||
10 | * |
||
11 | * This source file is subject to the MIT license that is bundled |
||
12 | * with this source code in the file LICENSE. |
||
13 | */ |
||
14 | |||
15 | namespace KevinGH\Box\Composer\Artifact; |
||
16 | |||
17 | /** |
||
18 | * @private |
||
19 | */ |
||
20 | final readonly class ComposerArtifact |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
21 | { |
||
22 | public function __construct( |
||
23 | public string $path, |
||
24 | public array $decodedContents, |
||
25 | ) { |
||
26 | } |
||
27 | |||
28 | public function toComposerJson(): ComposerJson |
||
29 | { |
||
30 | return new ComposerJson( |
||
31 | $this->path, |
||
32 | $this->decodedContents, |
||
33 | ); |
||
34 | } |
||
35 | |||
36 | public function toComposerLock(): ComposerLock |
||
37 | { |
||
38 | return new ComposerLock( |
||
39 | $this->path, |
||
40 | $this->decodedContents, |
||
41 | ); |
||
42 | } |
||
43 | } |
||
44 |