Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Oct 7, 2024
1 parent 40d8b18 commit d840cce
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<file>./src</file>
<file>./tests</file>
<rule ref="./vendor/squizlabs/php_codesniffer/src/Standards/PSR2"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"/>
<rule ref="SlevomatCodingStandard.PHP.ShortList"/>
Expand Down
6 changes: 5 additions & 1 deletion src/CommonFeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ public function iWaitUntilElementIsVisible($selector)
{
$elements = $this->getSession()->getPage()->findAll('css', $selector);

Check failure on line 23 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.3)

Call to an undefined method Frontkom\CommonBehatDefinitions\CommonFeatureContext::getSession().

Check failure on line 23 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.2)

Call to an undefined method Frontkom\CommonBehatDefinitions\CommonFeatureContext::getSession().

Check failure on line 23 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (7.4)

Call to an undefined method Frontkom\CommonBehatDefinitions\CommonFeatureContext::getSession().

Check failure on line 23 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (7.4)

Call to an undefined method Frontkom\CommonBehatDefinitions\CommonFeatureContext::getSession().

Check failure on line 23 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.1)

Call to an undefined method Frontkom\CommonBehatDefinitions\CommonFeatureContext::getSession().

Check failure on line 23 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.4)

Call to an undefined method Frontkom\CommonBehatDefinitions\CommonFeatureContext::getSession().

Check failure on line 23 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.3)

Call to an undefined method Frontkom\CommonBehatDefinitions\CommonFeatureContext::getSession().

Check failure on line 23 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.2)

Call to an undefined method Frontkom\CommonBehatDefinitions\CommonFeatureContext::getSession().

Check failure on line 23 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.0)

Call to an undefined method Frontkom\CommonBehatDefinitions\CommonFeatureContext::getSession().

Check failure on line 23 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.0)

Call to an undefined method Frontkom\CommonBehatDefinitions\CommonFeatureContext::getSession().

Check failure on line 23 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.4)

Call to an undefined method Frontkom\CommonBehatDefinitions\CommonFeatureContext::getSession().

Check failure on line 23 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.1)

Call to an undefined method Frontkom\CommonBehatDefinitions\CommonFeatureContext::getSession().
if (count($elements) !== 1) {
throw new \Exception('Expected to find exactly one element by selector ' . $selector . ' but found ' . count($elements) . ' elements');
throw new \Exception(
'Expected to find exactly one element by selector ' .
$selector .
' but found ' . count($elements) . ' elements'
);
}
/** @var \Behat\Mink\Element\NodeElement $element */
$element = reset($elements);

Check failure on line 32 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.3)

PHPDoc tag @var for variable $element contains unknown class Behat\Mink\Element\NodeElement.

Check failure on line 32 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.2)

PHPDoc tag @var for variable $element contains unknown class Behat\Mink\Element\NodeElement.

Check failure on line 32 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (7.4)

PHPDoc tag @var for variable $element contains unknown class Behat\Mink\Element\NodeElement.

Check failure on line 32 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (7.4)

PHPDoc tag @var for variable $element contains unknown class Behat\Mink\Element\NodeElement.

Check failure on line 32 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.1)

PHPDoc tag @var for variable $element contains unknown class Behat\Mink\Element\NodeElement.

Check failure on line 32 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.4)

PHPDoc tag @var for variable $element contains unknown class Behat\Mink\Element\NodeElement.

Check failure on line 32 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.3)

PHPDoc tag @var for variable $element contains unknown class Behat\Mink\Element\NodeElement.

Check failure on line 32 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.2)

PHPDoc tag @var for variable $element contains unknown class Behat\Mink\Element\NodeElement.

Check failure on line 32 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.0)

PHPDoc tag @var for variable $element contains unknown class Behat\Mink\Element\NodeElement.

Check failure on line 32 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.0)

PHPDoc tag @var for variable $element contains unknown class Behat\Mink\Element\NodeElement.

Check failure on line 32 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.4)

PHPDoc tag @var for variable $element contains unknown class Behat\Mink\Element\NodeElement.

Check failure on line 32 in src/CommonFeatureContext.php

View workflow job for this annotation

GitHub Actions / Run tests (8.1)

PHPDoc tag @var for variable $element contains unknown class Behat\Mink\Element\NodeElement.
Expand Down
8 changes: 7 additions & 1 deletion src/GutenbergContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ public function iWriteInTheGutenbergFieldOnThePage($text)
public function iWaitUntilGutenbergIsReady($max_wait = 10)
{
while (true) {
$is_ready = $this->getSession()->evaluateScript("wp && wp.data && wp.data.select && wp.data.select('core/editor').isCleanNewPost() || wp.data.select('core/block-editor').getBlockCount() > 0");
$is_ready = $this->getSession()->evaluateScript(
"wp &&
wp.data &&
wp.data.select &&
wp.data.select('core/editor').isCleanNewPost() ||
wp.data.select('core/block-editor').getBlockCount() > 0"
);
if ($is_ready) {
break;
}
Expand Down

0 comments on commit d840cce

Please sign in to comment.