Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
rename files_to_ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
arrilot committed Feb 23, 2021
1 parent 3344247 commit 7e8d816
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/openapi-client-generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
/**
* Files that will be ignored during repository cleanup
*/
'files_for_ignore' => ['.git', '.gitignore'],
'files_to_ignore_during_cleanup' => ['.git', '.gitignore'],
],

/**
Expand Down Expand Up @@ -90,6 +90,6 @@
/**
* Files that will be ignored during repository cleanup
*/
'files_for_ignore' => ['.git', '.gitignore'],
'files_to_ignore_during_cleanup' => ['.git', '.gitignore'],
]
];
6 changes: 3 additions & 3 deletions src/Commands/GenerateClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ abstract class GenerateClient extends Command
/**
* @var array
*/
protected $ignoredFiles;
protected $filesToIgnoreDuringCleanup;

public function __construct()
{
Expand All @@ -72,7 +72,7 @@ public function __construct()

$this->params = config("openapi-client-generator.{$this->client}_args.params");
$this->templateDir = config("openapi-client-generator.{$this->client}_args.template_dir", '');
$this->ignoredFiles = config("openapi-client-generator.{$this->client}_args.files_for_ignore", []);
$this->filesToIgnoreDuringCleanup = config("openapi-client-generator.{$this->client}_args.files_to_ignore_during_cleanup", []);
}

/**
Expand Down Expand Up @@ -164,7 +164,7 @@ private function recursiveClearDirectory(string $dir, int $level = 0)
}

foreach (glob($dir . "/{*,.[!.]*,..?*}", GLOB_BRACE) as $file) {
if ($level === 0 && in_array(str_replace($this->outputDir . "/", "", $file), $this->ignoredFiles)) {
if ($level === 0 && in_array(str_replace($this->outputDir . "/", "", $file), $this->filesToIgnoreDuringCleanup)) {
continue;
}
if (is_dir($file)) {
Expand Down

0 comments on commit 7e8d816

Please sign in to comment.