8000 Add ability to exclude files and entire folders from built application by nexxai · Pull Request #165 · NativePHP/laravel · GitHub
[go: up one dir, main page]

Skip to content

Add ability to exclude files and entire folders from built application #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
camelCase update
  • Loading branch information
nexxai committed Aug 17, 2023
commit 60295d9382647672e5eb5160911d35000223a4e6
6 changes: 3 additions & 3 deletions src/Commands/MinifyApplicationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function removeIgnoredFilesAndFolders(string $appPath): void

if (file_exists($fullPath)) {
if (is_dir($fullPath)) {
$this->delete_directory_recursive($fullPath);
$this->deleteDirectoryRecursive($fullPath);
} else {
array_map('unlink', glob($fullPath));
}
Expand All @@ -86,7 +86,7 @@ protected function removeIgnoredFilesAndFolders(string $appPath): void
}
}

private function delete_directory_recursive($dir)
private function deleteDirectoryRecursive($dir)
{
if (! file_exists($dir)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I'm clear on what you mean by "space". Can you please elaborate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that clean code is the goal but I don't agree that removing the space makes it easier to read. In fact, (and this is strictly my own personal opinion) I believe that the space makes it more readable as it's easy to see that there are two characters "(!" indicating something weird is about to happen, separated by a space, and then the variable name that the weirdness is about to apply to, making it easy for someone reading the code to quickly see that the expression is being negated.

If Marcel is against this, I'll revert it, but for now, I'm going to leave it.

Copy link
Contributor Author
@nexxai nexxai Aug 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, it's being applied via the not_operator_with_successor_space PHP-CS-Fixer rule and also referenced in Spatie's Laravel code style guide

Copy link
88B6
@nilBora nilBora Aug 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize! Thank you for your explain, It is my mistake!

return true;
Expand All @@ -101,7 +101,7 @@ private function delete_directory_recursive($dir)
continue;
}

if (! $this->delete_directory_recursive($dir.'/'.$item)) {
if (! $this->deleteDirectoryRecursive($dir.'/'.$item)) {
return false;
}
}
Expand Down
0