- Issue created by @hongpong
- First commit to issue fork.
- 🇳🇮Nicaragua baltowen
I worked on removing the empty statements.
I noticed an error logic in the code. When selecting the content types, if only pages were selected it would trigger an error that at least one content type should be selected. The error message suggests that it should not be possible to have an import without content types, so I implemented that. If we want to allow that, we can remove the validateForm method altogether.
I also fixed a coding standard issue. It seems there are still static calls to Drupal. Not sure how to address those.
- 🇺🇸United States hongpong Philadelphia
thanks baltowen very good stuff. Regarding the equals signs, there are some silly rules in phpcs that already exist. From today's HEAD (not your patch). I
Drupal.Formatting.MultipleStatementAlignment.NotSame
Drupal.Formatting.MultipleStatementAlignment.Incorrect197 | ERROR | [x] Equals sign not aligned correctly; expected 1 space but | | found 16 spaces | | (Drupal.Formatting.MultipleStatementAlignment.Incorrect) 261 | ERROR | [x] Equals sign not aligned with surrounding assignments; | | expected 21 spaces but found 1 space | | (Drupal.Formatting.MultipleStatementAlignment.NotSame) 267 | ERROR | [x] Equals sign not aligned with surrounding assignments; | | expected 27 spaces but found 1 space | | (Drupal.Formatting.MultipleStatementAlignment.NotSame)
I think the alignments are very silly for them to impose on us. phpcs.xml.dist (or maybe without .dist) could perhaps override this in Drupal flavored GitlabCI within this project?
Using statements like https://git.drupalcode.org/project/drupal/blob/8.8.x/core/phpcs.xml.dist<rule ref="Drupal.Arrays.Array"> <!-- Sniff for these errors: CommaLastItem --> <exclude name="Drupal.Arrays.Array.ArrayClosingIndentation"/> <exclude name="Drupal.Arrays.Array.ArrayIndentation"/> <exclude name="Drupal.Arrays.Array.LongLineDeclaration"/> </rule>