1- <?php
2-
3- declare (strict_types=1 );
1+ <?php declare (strict_types=1 );
42
53namespace Bref \Extra \Aws ;
64
75use Symfony \Component \Process \Process ;
86
97class LayerPublisher
108{
11- /**
12- * @var string|null
13- */
9+ /** @var string|null */
1410 private $ awsProfile ;
1511
16- /**
17- *
18- * @param string|null $awsProfile
19- */
2012 public function __construct (?string $ awsProfile )
2113 {
2214 $ this ->awsProfile = $ awsProfile ;
2315 }
2416
2517
2618 /**
27- * @param array<string, string> $layers Layer name and layer zip file path.
28- * @param array $regions
19+ * @param array<string, string> $layers Layer name and layer zip file path.
20+ * @param array $regions
2921 */
3022 public function publishLayers (array $ layers , array $ regions ): void
3123 {
@@ -38,7 +30,6 @@ public function publishLayers(array $layers, array $regions): void
3830 }
3931 $ this ->finishProcesses ($ publishingProcesses );
4032
41-
4233 // Add public permissions on the layers
4334 /** @var Process[] $permissionProcesses */
4435 $ permissionProcesses = [];
@@ -55,9 +46,7 @@ public function publishLayers(array $layers, array $regions): void
5546
5647 /**
5748 * @param string $region The AWS region to publish the layer to
58- * @param string $layerName
59- * @param string $file The absolute file path to the layer
60- * @return Process
49+ * @param string $file The absolute file path to the layer
6150 */
6251 private function publishSingleLayer (string $ region , string $ layerName , string $ file ): Process
6352 {
@@ -74,7 +63,7 @@ private function publishSingleLayer(string $region, string $layerName, string $f
7463 '--license-info ' ,
7564 'MIT ' ,
7665 '--zip-file ' ,
77- 'fileb:// ' . $ file ,
66+ 'fileb:// ' . $ file ,
7867 '--compatible-runtimes ' ,
7968 'provided ' ,
8069 // Output the version so that we can fetch it and use it
@@ -122,10 +111,7 @@ private function finishProcesses(array $processes): void
122111 }
123112
124113 /**
125- * @param string $region
126114 * @param string $layer name
127- * @param string $layerVersion
128- * @return Process
129115 */
130116 private function addPublicLayerPermissions (string $ region , string $ layer , string $ layerVersion ): Process
131117 {
@@ -157,7 +143,4 @@ private function addPublicLayerPermissions(string $region, string $layer, string
157143
158144 return $ process ;
159145 }
160-
161-
162-
163- }
146+ }
0 commit comments