-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Expand references #156
Expand references #156
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #156 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 277 277
===========================================
Files 22 23 +1
Lines 728 729 +1
===========================================
+ Hits 728 729 +1 ☔ View full report in Codecov by Sentry. |
PR Summary
|
# Conflicts: # tests/Composer/TestCase.php
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
} | ||
|
||
/** | ||
* Adds a multiple items to the merge plan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Adds a multiple items to the merge plan. | |
* Adds multiple items to the merge plan. |
} | ||
|
||
/** | ||
* Add empty group if it doesn't exist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Add empty group if it doesn't exist. | |
* Add an empty group if it doesn't exist. |
* @psalm-param list<FileType> $files | ||
* @psalm-return list<FileType> | ||
*/ | ||
private function replaceVariableToFiles(array $items, string $variable, array $files): array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private function replaceVariableToFiles(array $items, string $variable, array $files): array | |
private function replaceVariableWithFiles(array $items, string $variable, array $files): array |
foreach ($groupPackages as $groupPackage => $groupItems) { | ||
$packageItems = $packages[$groupPackage] ?? []; | ||
$packages[$groupPackage] = in_array($variable, $packageItems, true) | ||
? $this->replaceVariableToFiles($packageItems, $variable, $groupItems) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? $this->replaceVariableToFiles($packageItems, $variable, $groupItems) | |
? $this->replaceVariableWithFiles($packageItems, $variable, $groupItems) |
$this->throwException(sprintf('The "%s" file does not found.', $file)); | ||
$message = Options::isVariable($item) | ||
? sprintf('Don\'t allow to use variables in environments. Found variable "%s".', $item) | ||
: sprintf('The "%s" file does not found.', $file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: sprintf('The "%s" file does not found.', $file); | |
: sprintf('The "%s" file is not found.', $file); |
} elseif (!$isOptional) { | ||
$this->throwException(sprintf('The "%s" file does not found.', $file)); | ||
$message = Options::isVariable($item) | ||
? sprintf('Don\'t allow to use variables in environments. Found variable "%s".', $item) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? sprintf('Don\'t allow to use variables in environments. Found variable "%s".', $item) | |
? sprintf('Can\'t use variables in environments. Found variable "%s".', $item) |
Fix #153