File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed
Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Kiboko \Component \Dockerfile \Dockerfile ;
6+
7+ final readonly class Arg implements LayerInterface, \Stringable
8+ {
9+ public function __construct (
10+ private string $ name ,
11+ ) {
12+ }
13+
14+ public function __toString (): string
15+ {
16+ return sprintf ('ARG %s ' , $ this ->name );
17+ }
18+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Kiboko \Component \Dockerfile \PHP ;
6+
7+ use Kiboko \Component \Dockerfile \Dockerfile ;
8+
9+ final class ComposerConfig implements Dockerfile \LayerInterface, \Stringable
10+ {
11+ public function __construct (
12+ private string $ host ,
13+ private string $ token ,
14+ )
15+ {
16+ }
17+
18+ public function __toString (): string
19+ {
20+ return (string ) new Dockerfile \Run (sprintf (
21+ <<<'RUN'
22+ composer config --global %s %s
23+ RUN,
24+ $ this ->host ,
25+ $ this ->token ,
26+ ));
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments