Skip to content

Commit 0183c84

Browse files
committed
reformatted code
1 parent 88f2fef commit 0183c84

2 files changed

Lines changed: 17 additions & 15 deletions

File tree

src/Codeception/Module/Sequence.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22
namespace Codeception\Module;
3+
34
use Codeception\Exception\Module;
45
use Codeception\TestCase;
56

@@ -49,18 +50,19 @@
4950
* ```
5051
*
5152
*/
52-
class Sequence extends \Codeception\Module {
53+
class Sequence extends \Codeception\Module
54+
{
5355

54-
static $hash = array();
56+
static $hash = [];
5557

5658
public function _after(TestCase $t)
5759
{
58-
self::$hash = array();
60+
self::$hash = [];
5961
}
6062
}
6163

6264
if (!function_exists('sq')) {
63-
require_once __DIR__.'/../Util/sq.php';
65+
require_once __DIR__ . '/../Util/sq.php';
6466
} else {
6567
throw new Module('Codeception\Module\Sequence', "function 'sq' already defiend");
6668
}

src/Codeception/Util/sq.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?php
2-
use \Codeception\Module\Sequence;
2+
use Codeception\Module\Sequence;
33

44
if (!function_exists('sq')) {
5-
function sq($id = null)
6-
{
7-
if ($id and isset(Sequence::$hash[$id])) {
8-
return Sequence::$hash[$id];
5+
function sq($id = null)
6+
{
7+
if ($id and isset(Sequence::$hash[$id])) {
8+
return Sequence::$hash[$id];
9+
}
10+
$sequence = '_' . uniqid();
11+
if ($id) {
12+
Sequence::$hash[$id] = $sequence;
13+
}
14+
return $sequence;
915
}
10-
$sequence = '_' . uniqid();
11-
if ($id) {
12-
Sequence::$hash[$id] = $sequence;
13-
}
14-
return $sequence;
15-
}
1616

1717
}

0 commit comments

Comments
 (0)