@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | public function testCountReturnsTotalCollectionCount() |
21 | 21 | { |
22 | - $coll = Factory::create($this->fixtures['names']); |
|
22 | + $coll = Factory::create($this->fixtures[ 'names' ]); |
|
23 | 23 | $this->assertCount(10, $coll); |
24 | 24 | $this->assertEquals(10, $coll->count()); |
25 | 25 | $this->assertEquals(10, count($coll)); |
@@ -24,22 +24,22 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * @var array |
26 | 26 | */ |
27 | - protected $fixtures = []; |
|
27 | + protected $fixtures = [ ]; |
|
28 | 28 | |
29 | 29 | public function setUp() |
30 | 30 | { |
31 | 31 | $faker = Factory::create(); |
32 | 32 | $faker->seed(4231986); |
33 | 33 | |
34 | - $this->fixtures['array'] = ['first', 'second', 'third']; |
|
35 | - $this->fixtures['assoc'] = ['1st' => 'first', '2nd' => 'second', '3rd' => 'third']; |
|
36 | - $this->fixtures['digits'] = []; |
|
37 | - $this->fixtures['users'] = []; |
|
34 | + $this->fixtures[ 'array' ] = [ 'first', 'second', 'third' ]; |
|
35 | + $this->fixtures[ 'assoc' ] = [ '1st' => 'first', '2nd' => 'second', '3rd' => 'third' ]; |
|
36 | + $this->fixtures[ 'digits' ] = [ ]; |
|
37 | + $this->fixtures[ 'users' ] = [ ]; |
|
38 | 38 | |
39 | 39 | for ($i = 0; $i < 10; $i++) { |
40 | 40 | $username = $faker->unique()->userName; |
41 | - $this->fixtures['digits'][] = $faker->numberBetween(1, 10000); |
|
42 | - $this->fixtures['users'][$username] = [ |
|
41 | + $this->fixtures[ 'digits' ][ ] = $faker->numberBetween(1, 10000); |
|
42 | + $this->fixtures[ 'users' ][ $username ] = [ |
|
43 | 43 | 'username' => $username, |
44 | 44 | 'email' => $faker->unique()->safeEmail, |
45 | 45 | 'remote_addr' => $faker->ipv4, |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | ]; |
55 | 55 | } |
56 | 56 | |
57 | - $this->fixtures['names'] = array_column($this->fixtures['users'], 'firstname'); |
|
58 | - $this->fixtures['emails'] = array_column($this->fixtures['users'], 'email'); |
|
59 | - $this->fixtures['phones'] = array_column($this->fixtures['users'], 'phone'); |
|
57 | + $this->fixtures[ 'names' ] = array_column($this->fixtures[ 'users' ], 'firstname'); |
|
58 | + $this->fixtures[ 'emails' ] = array_column($this->fixtures[ 'users' ], 'email'); |
|
59 | + $this->fixtures[ 'phones' ] = array_column($this->fixtures[ 'users' ], 'phone'); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | public function tearDown() |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | protected function getMethodCallRecorderForCount($count, $method = 'touch') |
78 | 78 | { |
79 | 79 | $recorder = $this->getMockBuilder(stdClass::class) |
80 | - ->setMethods([$method]) |
|
80 | + ->setMethods([ $method ]) |
|
81 | 81 | ->getMock(); |
82 | 82 | |
83 | 83 | $recorder->expects($this->exactly($count)) |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | return $recorder; |
87 | 87 | } |
88 | 88 | |
89 | - protected function getIteratorForArray(array $arr = []) |
|
89 | + protected function getIteratorForArray(array $arr = [ ]) |
|
90 | 90 | { |
91 | 91 | return new ArrayIterator($arr); |
92 | 92 | } |