Skip to content
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

Obey EC rules #20

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Obey EC rules #20

wants to merge 7 commits into from

Conversation

szepeviktor
Copy link
Contributor

Can be checked on your local machine/CI workflow with https://github.com/greut/eclint

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Aug 20, 2023

Oh no!! DefinitionCompilation does not agree with me.

@codecov
Copy link

codecov bot commented Aug 20, 2023

Codecov Report

Merging #20 (3a3a0b3) into master (568daf2) will decrease coverage by 0.08%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

❗ Current head 3a3a0b3 differs from pull request most recent head 47c1a2c. Consider uploading reports for the commit 47c1a2c to get more accurate results

@@             Coverage Diff              @@
##             master      #20      +/-   ##
============================================
- Coverage     89.60%   89.52%   -0.08%     
- Complexity      437      438       +1     
============================================
  Files            33       33              
  Lines          1193     1203      +10     
============================================
+ Hits           1069     1077       +8     
- Misses          124      126       +2     
Files Coverage Δ
src/Container/Definition/AbstractDefinition.php 77.90% <100.00%> (+1.95%) ⬆️
src/Container/Definition/ClassDefinition.php 96.25% <100.00%> (+0.07%) ⬆️

... and 2 files with indirect coverage changes

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Aug 20, 2023

It was berry 🍓 hard to forge strings!

@@ -271,14 +272,17 @@ public function compile(
if (array_key_exists("class", $constructorArgument)) {
$definition = $compilation->getDefinition($constructorArgument["class"]);

$code .= "\n{$constructorIndent}{$tab}" . $this->compileEntryReference(
$code .= $this->indentLines("{$constructorIndent}{$tab}", $this->compileEntryReference(
Copy link
Member

Choose a reason for hiding this comment

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

if you generate the example container with the make build command, you'll see that this makes the indentation of the dependencies of PlantService wrong. The rest of the changes look good though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed 🍏

Is it all right now?

Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why this change is needed at all when the original indentation looked good for me?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

var_export has a fixed indentation of 2 spaces.
a1be5e7#diff-735c9178f83fdb6831e51d7073bcee55372c3a5c83b4bed1edf08deffb7fe774
To correct that I've added this method.

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.

None yet

2 participants