E515 Code cleanup by morozov · Pull Request #1087 · phpbrew/phpbrew · GitHub
[go: up one dir, main page]

Skip to content

Code cleanup#1087

Merged
morozov merged 4 commits intophpbrew:masterfrom
morozov:code-cleanup
Dec 11, 2019
Merged

Code cleanup#1087
morozov merged 4 commits intophpbrew:masterfrom
morozov:code-cleanup

Conversation

@morozov
Copy link
Contributor
@morozov morozov commented Dec 11, 2019
  1. Removed the Machine and Process classes. The classes were used only for detection of the number of processors which was only used in a couple of tests while the actual code didn't use this number. It is easier and more reliable to use MAKE_FLAGS that is controlled by the user and is used by make consistently across all tasks.
  2. Removed the Version class. The class was used as an alternative to version_compare() and was too complex for that purpose. Additionally, the test was rewritten to not specify the museum flag. Otherwise, I'd always pass even if the implementation had been broken.
  3. Removed Utils::pipeExecute(). Replaced the usages with a simple exec().
  4. Removed more unused/unneeded code.

The classes were used only for detection of the number of processors which was only used in a couple of tests while the actual code didn't use this number.

It is easier and more reliable to use MAKE_FLAGS that is controlled by the end user and is used by make consistenly across all tasks.
The class was used as an alternative to version_compare and was too complex for that purpose. Additionally, the test was rewritten to not specify the museum flag. Otherwise, I'd always pass even if the implementation had been broken.
Replaced the usages with a simple exec().
@morozov morozov merged commit 3255e8c into phpbrew:master Dec 11, 2019
@morozov morozov deleted the code-cleanup branch December 11, 2019 20:30
@morozov morozov self-assigned this Dec 11, 2019
@morozov morozov added this to the Release 1.25.0 milestone Dec 11, 2019
@morozov morozov mentioned this pull request Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments

0