4 Commits

Author SHA1 Message Date
c790adf611 Merge pull request 'v1.2.1' (#4) from dev into master
Reviewed-on: #4
2023-08-13 02:51:31 +00:00
0ac5e64c17 Merge pull request 'v1.2.0' (#3) from dev into master
Reviewed-on: #3
2023-08-13 02:28:33 +00:00
c5f928dc47 Merge pull request 'v1.1.1' (#2) from dev into master
Reviewed-on: #2
2023-08-10 05:33:30 +00:00
9ed0ddf79b Merge pull request 'v1.1.0' (#1) from dev into master
Reviewed-on: #1
2023-08-04 01:28:43 +00:00
3 changed files with 5 additions and 7 deletions

View File

@@ -71,7 +71,7 @@ abstract class AbstractConverter implements ConverterContract
*/
protected function setVariables(): static
{
if (isset($this->collection?->variable)) {
if ($this->collection->variable) {
foreach ($this->collection->variable as $var) {
$this->vars["{{{$var->key}}}"] = $var->value;
}
@@ -173,7 +173,7 @@ abstract class AbstractConverter implements ConverterContract
*/
protected function interpolate(string $content): string
{
if (empty($this->vars) && !empty($this->env) && $this->env->hasVars()) {
if (empty($this->vars) && $this->env->hasVars()) {
return $content;
}
$matches = [];

View File

@@ -53,7 +53,7 @@ class WgetRequest extends AbstractRequest
$output[] = http_build_query($params);
return $output;
default:
return ["\t'$this->body' \ "];
return ["\t$this->body"];
}
}
@@ -75,6 +75,7 @@ class WgetRequest extends AbstractRequest
$this->prepareHeaders(),
$this->prepareBody()
);
$output[] = rtrim(array_pop($output), '\ ');
$output[] = "\t'$this->url'";
return implode(PHP_EOL, array_merge($output, ['']));
}

View File

@@ -22,7 +22,7 @@ class Processor
/**
* Converter version
*/
public const VERSION = '1.2.3';
public const VERSION = '1.2.1';
/**
* @var string[] Paths to collection files
@@ -229,9 +229,6 @@ class Processor
*/
protected function initEnv(): void
{
if (!isset($this->envFile)) {
return;
}
$content = file_get_contents(FileSystem::normalizePath($this->envFile));
$content = json_decode($content, flags: JSON_THROW_ON_ERROR);
if (!property_exists($content, 'environment') || empty($content?->environment)) {