Skip to content

Add --tag option for the apply commnad#3

Open
fullstackdev610 wants to merge 1 commit into
linkorb:mainfrom
fullstackdev610:main
Open

Add --tag option for the apply commnad#3
fullstackdev610 wants to merge 1 commit into
linkorb:mainfrom
fullstackdev610:main

Conversation

@fullstackdev610
Copy link
Copy Markdown
Contributor

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.

If this relates to a card, please include a link to the card here. Additionally, please terminate the PR title with # and the card number, such as Fix doomsday bug #1234

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • [x ] feat: non-breaking change which adds new functionality
  • fix: non-breaking change which fixes a bug or an issue
  • chore(deps): changes to dependencies
  • test: adds or modifies a test
  • docs: creates or updates documentation
  • style: changes that do not affect the meaning or function of code (e.g. formatting, whitespace, missing semi-colons etc.)
  • perf: code change that improves performance
  • revert: reverts a commit
  • refactor: code change that neither fix a bug nor add a new feature
  • ci: changes to continuous integration or continuous delivery scripts or configuration files
  • chore: general tasks or anything that doesn't fit the other commit types

Please indicate if your PR introduces a breaking change

  • Breaking change: fix or feature that would cause existing functionality to not work as expected

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Copy link
Copy Markdown
Contributor

@CesarScur CesarScur left a comment

Choose a reason for hiding this comment

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

🌟

Comment on lines +39 to +45
if($tag) {
$settings->setShipyardTag($tag);
} else {
$settings->setShipyardTag(false);
}
$config->setSettings($settings);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi Kostiantyn,

Here's a improvement suggestion. This should have the same effect. I might be mistaken, so please verify if you decide to apply it.

Suggested change
if($tag) {
$settings->setShipyardTag($tag);
} else {
$settings->setShipyardTag(false);
}
$config->setSettings($settings);
$settings->setShipyardTag($tag);

Here's my reason:

  • The if removal: In case $tag been false we can set it to $settings->setShipyardTag($tag); the same way.
  • The $config->setSettings($settings); removal: $settings is a mutable object, therefore a reference and not a copy, meaning that $settings === $config->getSettings().

BR,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants