@@ -48,9 +48,9 @@ |
||
48 | 48 | */ |
49 | 49 | public static function formatUrls(array $urls): array |
50 | 50 | { |
51 | - $formattedUrls = []; |
|
51 | + $formattedUrls = [ ]; |
|
52 | 52 | foreach ($urls as $url) { |
53 | - $formattedUrls[] = ['url' => $url]; |
|
53 | + $formattedUrls[ ] = [ 'url' => $url ]; |
|
54 | 54 | } |
55 | 55 | return $formattedUrls; |
56 | 56 | } |
@@ -10,11 +10,11 @@ discard block |
||
10 | 10 | class DataTest extends TestCase |
11 | 11 | { |
12 | 12 | private $formattedUrls = [ |
13 | - ['url' => 'https://www.google.com'], |
|
14 | - ['url' => 'https://github.com'], |
|
15 | - ['url' => 'https://github.styleci.io'], |
|
16 | - ['url' => 'https://travis-ci.org'], |
|
17 | - ['url' => 'https://packagist.org'], |
|
13 | + [ 'url' => 'https://www.google.com' ], |
|
14 | + [ 'url' => 'https://github.com' ], |
|
15 | + [ 'url' => 'https://github.styleci.io' ], |
|
16 | + [ 'url' => 'https://travis-ci.org' ], |
|
17 | + [ 'url' => 'https://packagist.org' ], |
|
18 | 18 | ]; |
19 | 19 | |
20 | 20 | private $urls = [ |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | $this->assertEquals($expected, $actual); |
50 | 50 | } |
51 | 51 | |
52 | - public function testPayloadSingleUrl(){ |
|
52 | + public function testPayloadSingleUrl() { |
|
53 | 53 | $formattedUrl = [ |
54 | - ['url' => 'https://www.google.com'], |
|
54 | + [ 'url' => 'https://www.google.com' ], |
|
55 | 55 | ]; |
56 | 56 | |
57 | 57 | $url = [ |
@@ -75,12 +75,12 @@ discard block |
||
75 | 75 | $this->assertEquals($expected, $actual); |
76 | 76 | } |
77 | 77 | |
78 | - public function testPayloadNoUrls(){ |
|
78 | + public function testPayloadNoUrls() { |
|
79 | 79 | $formattedUrls = [ |
80 | 80 | //['url' => ''], |
81 | 81 | ]; |
82 | 82 | |
83 | - $urls = []; |
|
83 | + $urls = [ ]; |
|
84 | 84 | |
85 | 85 | $expected = [ |
86 | 86 | 'client' => [ |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $this->assertEquals($expected, $actual); |
100 | 100 | } |
101 | 101 | |
102 | - public function testFormatUrlsMultiple(){ |
|
102 | + public function testFormatUrlsMultiple() { |
|
103 | 103 | |
104 | 104 | $expected = $this->formattedUrls; |
105 | 105 | |
@@ -107,23 +107,23 @@ discard block |
||
107 | 107 | $this->assertEquals($expected, $actual); |
108 | 108 | } |
109 | 109 | |
110 | - public function testFormatUrlsSingle(){ |
|
110 | + public function testFormatUrlsSingle() { |
|
111 | 111 | |
112 | - $url = ['https://www.google.com']; |
|
112 | + $url = [ 'https://www.google.com' ]; |
|
113 | 113 | |
114 | 114 | $expected = [ |
115 | - ['url' => 'https://www.google.com'] |
|
115 | + [ 'url' => 'https://www.google.com' ] |
|
116 | 116 | ]; |
117 | 117 | |
118 | 118 | $actual = Data::formatUrls($url); |
119 | 119 | $this->assertEquals($expected, $actual); |
120 | 120 | } |
121 | 121 | |
122 | - public function testFormatUrlsNone(){ |
|
122 | + public function testFormatUrlsNone() { |
|
123 | 123 | |
124 | - $urls = []; |
|
124 | + $urls = [ ]; |
|
125 | 125 | |
126 | - $expected = []; |
|
126 | + $expected = [ ]; |
|
127 | 127 | |
128 | 128 | $actual = Data::formatUrls($urls); |
129 | 129 | $this->assertEquals($expected, $actual); |