Skip to content

Commit

Permalink
Use short array syntax for consistency (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
W0rma authored Jul 28, 2024
1 parent 69a88c5 commit cbe0d1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Codeception/Lib/Interfaces/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function dontSeeInDatabase(string $table, array $criteria = []): void;
*
* ``` php
* <?php
* $mail = $I->grabFromDatabase('users', 'email', array('name' => 'Davert'));
* $mail = $I->grabFromDatabase('users', 'email', ['name' => 'Davert']);
* ```
* Comparison expressions can be used as well:
*
Expand Down
12 changes: 6 additions & 6 deletions src/Codeception/Module/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ protected function loadDumpUsingDriver(string $databaseKey): void
*
* ```php
* <?php
* $I->haveInDatabase('users', array('name' => 'miles', 'email' => '[email protected]'));
* $I->haveInDatabase('users', ['name' => 'miles', 'email' => '[email protected]']);
* ```
*/
public function haveInDatabase(string $table, array $data): int
Expand Down Expand Up @@ -930,7 +930,7 @@ protected function proceedSeeInDatabase(string $table, string $column, array $cr
*
* ``` php
* <?php
* $mails = $I->grabColumnFromDatabase('users', 'email', array('name' => 'RebOOter'));
* $mails = $I->grabColumnFromDatabase('users', 'email', ['name' => 'RebOOter']);
* ```
*/
public function grabColumnFromDatabase(string $table, string $column, array $criteria = []): array
Expand All @@ -950,7 +950,7 @@ public function grabColumnFromDatabase(string $table, string $column, array $cri
*
* ``` php
* <?php
* $mail = $I->grabFromDatabase('users', 'email', array('name' => 'Davert'));
* $mail = $I->grabFromDatabase('users', 'email', ['name' => 'Davert']);
* ```
* Comparison expressions can be used as well:
*
Expand All @@ -976,7 +976,7 @@ public function grabFromDatabase(string $table, string $column, array $criteria
*
* ``` php
* <?php
* $mail = $I->grabEntryFromDatabase('users', array('name' => 'Davert'));
* $mail = $I->grabEntryFromDatabase('users', ['name' => 'Davert']);
* ```
* Comparison expressions can be used as well:
*
Expand Down Expand Up @@ -1014,7 +1014,7 @@ public function grabEntryFromDatabase(string $table, array $criteria = []): arra
*
* ``` php
* <?php
* $mail = $I->grabEntriesFromDatabase('users', array('name' => 'Davert'));
* $mail = $I->grabEntriesFromDatabase('users', ['name' => 'Davert']);
* ```
* Comparison expressions can be used as well:
*
Expand Down Expand Up @@ -1057,7 +1057,7 @@ public function grabNumRecords(string $table, array $criteria = []): int
*
* ```php
* <?php
* $I->updateInDatabase('users', array('isAdmin' => true), array('email' => '[email protected]'));
* $I->updateInDatabase('users', ['isAdmin' => true], ['email' => '[email protected]']);
* ```
*/
public function updateInDatabase(string $table, array $data, array $criteria = []): void
Expand Down

0 comments on commit cbe0d1f

Please sign in to comment.