@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | /** |
24 | 24 | * @var array Container of elements |
25 | 25 | */ |
26 | - protected array $container = []; |
|
26 | + protected array $container=[]; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Set key/value pair |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | protected function doSetContainer(string $key, mixed $value): void |
37 | 37 | { |
38 | - $this->container[$key] = $value; |
|
38 | + $this->container[$key]=$value; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | public function setFromArray(array $data): void |
88 | 88 | { |
89 | 89 | foreach ($data as $key => $value) { |
90 | - $this->container[$key] = $value; |
|
90 | + $this->container[$key]=$value; |
|
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | public function resetArray(): void |
110 | 110 | { |
111 | 111 | foreach ($this->container as &$value) { |
112 | - $value = null; |
|
112 | + $value=null; |
|
113 | 113 | } |
114 | 114 | } |
115 | 115 | } |
@@ -5,4 +5,4 @@ |
||
5 | 5 | ini_set('display_errors', 1); |
6 | 6 | |
7 | 7 | // Use composer autoload |
8 | -require dirname(__DIR__) . '/vendor/autoload.php'; |
|
8 | +require dirname(__DIR__).'/vendor/autoload.php'; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | protected RegularContainer $class; |
27 | 27 | |
28 | - protected array $example = [ |
|
28 | + protected array $example=[ |
|
29 | 29 | 'foo' => 'bar', |
30 | 30 | 'quz' => 'qux' |
31 | 31 | ]; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | protected function setUp(): void |
38 | 38 | { |
39 | - $this->class = new RegularContainer(); |
|
39 | + $this->class=new RegularContainer(); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | protected ArrayContainer $class; |
27 | 27 | |
28 | - protected array $example = [ |
|
28 | + protected array $example=[ |
|
29 | 29 | 'foo' => 'bar', |
30 | 30 | 'quz' => 'qux' |
31 | 31 | ]; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | protected function setUp(): void |
38 | 38 | { |
39 | - $this->class = new ArrayContainer(); |
|
39 | + $this->class=new ArrayContainer(); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function testArrayAccess() |
46 | 46 | { |
47 | - $this->class['foo'] = 'bar'; |
|
48 | - $this->class['quz'] = 'qux'; |
|
47 | + $this->class['foo']='bar'; |
|
48 | + $this->class['quz']='qux'; |
|
49 | 49 | |
50 | 50 | unset($this->class['quz']); |
51 | 51 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | protected MagicContainer $class; |
27 | 27 | |
28 | - protected array $example = [ |
|
28 | + protected array $example=[ |
|
29 | 29 | 'foo' => 'bar', |
30 | 30 | 'quz' => 'qux' |
31 | 31 | ]; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | protected function setUp(): void |
38 | 38 | { |
39 | - $this->class = new MagicContainer(); |
|
39 | + $this->class=new MagicContainer(); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function testMagicAccess() |
46 | 46 | { |
47 | - $this->class->foo = 'bar'; |
|
48 | - $this->class->quz = 'qux'; |
|
47 | + $this->class->foo='bar'; |
|
48 | + $this->class->quz='qux'; |
|
49 | 49 | |
50 | 50 | unset($this->class->quz); |
51 | 51 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | protected ComplexContainer $class; |
27 | 27 | |
28 | - protected array $example = [ |
|
28 | + protected array $example=[ |
|
29 | 29 | 'foo' => 'bar', |
30 | 30 | 'quz' => 'qux' |
31 | 31 | ]; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | protected function setUp(): void |
38 | 38 | { |
39 | - $this->class = new ComplexContainer(); |
|
39 | + $this->class=new ComplexContainer(); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function testArrayAccess() |
46 | 46 | { |
47 | - $this->class['foo'] = 'bar'; |
|
48 | - $this->class['quz'] = 'qux'; |
|
47 | + $this->class['foo']='bar'; |
|
48 | + $this->class['quz']='qux'; |
|
49 | 49 | |
50 | 50 | unset($this->class['quz']); |
51 | 51 | |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function testMagicAccess() |
64 | 64 | { |
65 | - $this->class->foo = 'bar'; |
|
66 | - $this->class->quz = 'qux'; |
|
65 | + $this->class->foo='bar'; |
|
66 | + $this->class->quz='qux'; |
|
67 | 67 | |
68 | 68 | unset($this->class->quz); |
69 | 69 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | protected JsonContainer $class; |
26 | 26 | |
27 | - protected array $example = [ |
|
27 | + protected array $example=[ |
|
28 | 28 | 'foo' => 'bar', |
29 | 29 | 'quz' => 'qux' |
30 | 30 | ]; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | protected function setUp(): void |
37 | 37 | { |
38 | - $this->class = new JsonContainer(); |
|
38 | + $this->class=new JsonContainer(); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | protected SimpleContainer $class; |
26 | 26 | |
27 | - protected array $example = [ |
|
27 | + protected array $example=[ |
|
28 | 28 | 'foo' => 'bar', |
29 | 29 | 'quz' => 'qux' |
30 | 30 | ]; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | protected function setUp(): void |
37 | 37 | { |
38 | - $this->class = new SimpleContainer(); |
|
38 | + $this->class=new SimpleContainer(); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | $this->class->resetArray(); |
59 | 59 | |
60 | - $result = $this->class->toArray(); |
|
60 | + $result=$this->class->toArray(); |
|
61 | 61 | |
62 | 62 | self::assertArrayHasKey('foo', $result); |
63 | 63 | self::assertArrayHasKey('quz', $result); |