Skip to content

Removed all WhiteSpace Rules out of phpcs.xml.dist#1059

Merged
klausi merged 11 commits intodrupal-graphql:8.x-4.xfrom
Dylan203:code_style
Aug 10, 2020
Merged

Removed all WhiteSpace Rules out of phpcs.xml.dist#1059
klausi merged 11 commits intodrupal-graphql:8.x-4.xfrom
Dylan203:code_style

Conversation

@Dylan203
Copy link
Copy Markdown
Contributor

@Dylan203 Dylan203 commented Aug 10, 2020

exclude name="Drupal.WhiteSpace.CloseBracketSpacing.ClosingWhitespace"
exclude name="Drupal.WhiteSpace.Comma.NoSpace"
exclude name="Drupal.WhiteSpace.Comma.TooManySpaces"
exclude name="Drupal.WhiteSpace.OpenBracketSpacing.OpeningWhitespace"
exclude name="Drupal.WhiteSpace.OpenTagNewline.BlankLine"
exclude name="Drupal.WhiteSpace.ScopeClosingBrace.Line"
exclude name="Drupal.WhiteSpace.ScopeIndent.IncorrectExact"

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 10, 2020

Codecov Report

Merging #1059 into 8.x-4.x will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             8.x-4.x    #1059   +/-   ##
==========================================
  Coverage      50.38%   50.38%           
  Complexity       683      683           
==========================================
  Files            118      118           
  Lines           1820     1820           
==========================================
  Hits             917      917           
  Misses           903      903           
Impacted Files Coverage Δ Complexity Δ
...GraphQL/DataProducer/Taxonomy/TaxonomyLoadTree.php 0.00% <ø> (ø) 16.00 <0.00> (ø)
src/GraphQL/Execution/Executor.php 99.01% <100.00%> (ø) 20.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24ccb05...a552744. Read the comment docs.

@Dylan203 Dylan203 changed the title Removed 4 WhiteSpace Rules out of phpcs.xml.dist Removed all WhiteSpace Rules out of phpcs.xml.dist Aug 10, 2020
Copy link
Copy Markdown
Contributor

@klausi klausi left a comment

Choose a reason for hiding this comment

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

cool, just some small things we should improve

* @covers \Drupal\graphql\Plugin\GraphQL\DataProducer\XML\XMLAttribute::resolve
*/
/**
* @covers \Drupal\graphql\Plugin\GraphQL\DataProducer\XML\XMLAttribute::resolve
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.

this line should not be changed, the star should be under the first star.

*/
/**
* @covers \Drupal\graphql\Plugin\GraphQL\DataProducer\XML\XMLAttribute::resolve
*/
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.

same here

$this->mockResolver('Tree', 'name', $this->builder->cond([
[$this->builder->fromValue(FALSE), $this->builder->fromValue('This should not be in the result.')],
[function () { return new Deferred(function () { return TRUE; }); }, $this->builder->fromValue('But this should.')],
[function () {return new Deferred(function () {return TRUE;
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.

let's format these return statements on the next lines with 2 space additional indentation.

[function () {return new Deferred(function () {return TRUE;
});
}, $this->builder->fromValue('But this should.')
],
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.

should be indented to the current level in the array

Copy link
Copy Markdown
Contributor

@klausi klausi left a comment

Choose a reason for hiding this comment

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

please also format the other return statements.

[function () { return new Deferred(function () { return TRUE; }); }, $this->builder->fromValue('But this should.')],
[function () {
return new Deferred(function () {
return TRUE;
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.

indentation should always be 2 spaces for a new level

$this->mockResolver('Tree', 'name', $this->builder->defaultValue(
$this->builder->callback(function () { return new Deferred(function () { return NULL; }); }),
$this->builder->callback(function () { return new Deferred(function () { return 'bar'; }); })
$this->builder->callback(function () {return new Deferred(function () {return NULL;
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.

same here, please split up the return statements

$this->mockResolver('Tree', 'uri', $this->builder->defaultValue(
$this->builder->callback(function () { return new Deferred(function () { return 'baz'; }); }),
$this->builder->callback(function () { return new Deferred(function () { return 'bar'; }); })
$this->builder->callback(function () {return new Deferred(function () {return 'baz';
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.

same here, please split up the return statements

@klausi klausi merged commit 73e93be into drupal-graphql:8.x-4.x Aug 10, 2020
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