| @@ -26,10 +26,10 @@ discard block | ||
| 26 | 26 | $attribute = uniqid(); | 
| 27 | 27 | |
| 28 | 28 | $errors = (new ErrorCollection) | 
| 29 | - ->add($attribute, $format, [ 'arg' => $arg3 ]) | |
| 30 | - ->add_generic($format, [ 'arg' => $arg1 ]) | |
| 31 | - ->add($attribute, $format, [ 'arg' => $arg4 ]) | |
| 32 | - ->add_generic($format, [ 'arg' => $arg2 ]) | |
| 29 | + ->add($attribute, $format, ['arg' => $arg3]) | |
| 30 | + ->add_generic($format, ['arg' => $arg1]) | |
| 31 | + ->add($attribute, $format, ['arg' => $arg4]) | |
| 32 | + ->add_generic($format, ['arg' => $arg2]) | |
| 33 | 33 | ; | 
| 34 | 34 | |
| 35 | 35 | $renderer = new RenderedErrorCollection($errors); | 
| @@ -37,15 +37,15 @@ discard block | ||
| 37 | 37 | |
| 38 | 38 | foreach ($renderer as $a => $r) | 
| 39 | 39 |  		{ | 
| 40 | - $rendered[] = [ $a, $r ]; | |
| 40 | + $rendered[] = [$a, $r]; | |
| 41 | 41 | } | 
| 42 | 42 | |
| 43 | 43 | $this->assertSame([ | 
| 44 | 44 | |
| 45 | -			[ ErrorCollection::GENERIC, "error: {$arg1}" ], | |
| 46 | -			[ ErrorCollection::GENERIC, "error: {$arg2}" ], | |
| 47 | -			[ $attribute, "error: {$arg3}" ], | |
| 48 | -			[ $attribute, "error: {$arg4}" ], | |
| 45 | +			[ErrorCollection::GENERIC, "error: {$arg1}"], | |
| 46 | +			[ErrorCollection::GENERIC, "error: {$arg2}"], | |
| 47 | +			[$attribute, "error: {$arg3}"], | |
| 48 | +			[$attribute, "error: {$arg4}"], | |
| 49 | 49 | |
| 50 | 50 | ], $rendered); | 
| 51 | 51 | } | 
| @@ -60,13 +60,13 @@ discard block | ||
| 60 | 60 | $attribute = uniqid(); | 
| 61 | 61 | |
| 62 | 62 | $errors = (new ErrorCollection) | 
| 63 | - ->add($attribute, $format, [ 'arg' => $arg3 ]) | |
| 64 | - ->add_generic($format, [ 'arg' => $arg1 ]) | |
| 65 | - ->add($attribute, $format, [ 'arg' => $arg4 ]) | |
| 66 | - ->add_generic($format, [ 'arg' => $arg2 ]) | |
| 63 | + ->add($attribute, $format, ['arg' => $arg3]) | |
| 64 | + ->add_generic($format, ['arg' => $arg1]) | |
| 65 | + ->add($attribute, $format, ['arg' => $arg4]) | |
| 66 | + ->add_generic($format, ['arg' => $arg2]) | |
| 67 | 67 | ; | 
| 68 | 68 | |
| 69 | -		$renderer = new RenderedErrorCollection($errors, function (Error $error, $attribute, ErrorCollection $collection) use ($errors) { | |
| 69 | +		$renderer = new RenderedErrorCollection($errors, function(Error $error, $attribute, ErrorCollection $collection) use ($errors) { | |
| 70 | 70 | |
| 71 | 71 | $this->assertSame($errors, $collection); | 
| 72 | 72 | |
| @@ -78,15 +78,15 @@ discard block | ||
| 78 | 78 | |
| 79 | 79 | foreach ($renderer as $a => $r) | 
| 80 | 80 |  		{ | 
| 81 | - $rendered[] = [ $a, $r ]; | |
| 81 | + $rendered[] = [$a, $r]; | |
| 82 | 82 | } | 
| 83 | 83 | |
| 84 | 84 | $this->assertSame([ | 
| 85 | 85 | |
| 86 | -			[ ErrorCollection::GENERIC, strrev("error: {$arg1}") ], | |
| 87 | -			[ ErrorCollection::GENERIC, strrev("error: {$arg2}") ], | |
| 88 | -			[ $attribute, strrev("error: {$arg3}") ], | |
| 89 | -			[ $attribute, strrev("error: {$arg4}") ], | |
| 86 | +			[ErrorCollection::GENERIC, strrev("error: {$arg1}")], | |
| 87 | +			[ErrorCollection::GENERIC, strrev("error: {$arg2}")], | |
| 88 | +			[$attribute, strrev("error: {$arg3}")], | |
| 89 | +			[$attribute, strrev("error: {$arg4}")], | |
| 90 | 90 | |
| 91 | 91 | ], $rendered); | 
| 92 | 92 | } |