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

Update code standards to PHP 7.0+ #41

Merged
merged 1 commit into from Nov 18, 2020
Merged

Update code standards to PHP 7.0+ #41

merged 1 commit into from Nov 18, 2020

Conversation

TavoNiievez
Copy link
Member

@TavoNiievez TavoNiievez commented Nov 16, 2020

composer.json

  • Added "ext-json": "*" because json_encode is used in seeNumRecords.

src/Codeception/Lib/Connector/Symfony.php

  • Added strict types: declare(strict_types=1);
  • array_keys was used in rebootKernel's foreach because it was only necessary to know the keys in that loop.

src/Codeception/Module/Symfony.php

  • Added strict types: declare(strict_types=1);
  • array_keys was used in _after's foreach because it was only necessary to know the keys in that loop.
  • Imported classes with the use statement whenever possible
  • self::class instead of __CLASS__.
  • Added types to the arguments whenever possible, and explicit type cast when it was necessary.
  • Used PHP if/else shorthand in seeAuthentication and dontSeeAuthentication.

@TavoNiievez TavoNiievez marked this pull request as draft November 16, 2020 20:36
@TavoNiievez TavoNiievez changed the title Fix module code style update code standards to PHP 7.0+ Nov 16, 2020
@TavoNiievez TavoNiievez changed the title update code standards to PHP 7.0+ Update code standards to PHP 7.0+ Nov 16, 2020
@TavoNiievez TavoNiievez marked this pull request as ready for review November 17, 2020 00:08
@TavoNiievez TavoNiievez merged commit b65b2c7 into Codeception:master Nov 18, 2020
@TavoNiievez TavoNiievez added this to the 1.4.0 milestone Nov 21, 2020
@TavoNiievez TavoNiievez mentioned this pull request Dec 9, 2020
@TavoNiievez TavoNiievez mentioned this pull request Dec 16, 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.

None yet

1 participant