@@ -55,7 +55,7 @@ |
||
55 | 55 | |
56 | 56 | public function testKeyPositionCanBeRetreived() { |
57 | 57 | $this->collection->add($this->item); |
58 | - foreach($this->collection as $key => $item) { |
|
58 | + foreach ($this->collection as $key => $item) { |
|
59 | 59 | $this->assertEquals(0, $key); |
60 | 60 | } |
61 | 61 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | |
56 | 56 | public function testKeyPositionCanBeRetreived() { |
57 | 57 | $this->collection->add($this->item); |
58 | - foreach($this->collection as $key => $item) { |
|
58 | + foreach ($this->collection as $key => $item) { |
|
59 | 59 | $this->assertEquals(0, $key); |
60 | 60 | } |
61 | 61 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | |
56 | 56 | public function testKeyPositionCanBeRetreived() { |
57 | 57 | $this->collection->add($this->item); |
58 | - foreach($this->collection as $key => $item) { |
|
58 | + foreach ($this->collection as $key => $item) { |
|
59 | 59 | $this->assertEquals(0, $key); |
60 | 60 | } |
61 | 61 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | public function testCanBeLoadedFromFile() { |
47 | 47 | $this->assertInstanceOf( |
48 | 48 | Manifest::class, |
49 | - ManifestLoader::fromFile(__DIR__ . '/_fixture/library.xml') |
|
49 | + ManifestLoader::fromFile(__DIR__.'/_fixture/library.xml') |
|
50 | 50 | ); |
51 | 51 | } |
52 | 52 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $this->assertInstanceOf( |
55 | 55 | Manifest::class, |
56 | 56 | ManifestLoader::fromString( |
57 | - file_get_contents(__DIR__ . '/_fixture/library.xml') |
|
57 | + file_get_contents(__DIR__.'/_fixture/library.xml') |
|
58 | 58 | ) |
59 | 59 | ); |
60 | 60 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function testCanBeLoadedFromPhar() { |
63 | 63 | $this->assertInstanceOf( |
64 | 64 | Manifest::class, |
65 | - ManifestLoader::fromPhar(__DIR__ . '/_fixture/test.phar') |
|
65 | + ManifestLoader::fromPhar(__DIR__.'/_fixture/test.phar') |
|
66 | 66 | ); |
67 | 67 | |
68 | 68 | } |
@@ -11,9 +11,9 @@ |
||
11 | 11 | use PharIo\Manifest\ManifestLoader; |
12 | 12 | use PharIo\Manifest\ManifestSerializer; |
13 | 13 | |
14 | -require __DIR__ . '/../vendor/autoload.php'; |
|
14 | +require __DIR__.'/../vendor/autoload.php'; |
|
15 | 15 | |
16 | -$manifest = ManifestLoader::fromFile(__DIR__ . '/../tests/_fixture/phpunit-5.6.5.xml'); |
|
16 | +$manifest = ManifestLoader::fromFile(__DIR__.'/../tests/_fixture/phpunit-5.6.5.xml'); |
|
17 | 17 | |
18 | 18 | echo sprintf( |
19 | 19 | "Manifest for %s (%s):\n\n", |
@@ -88,7 +88,7 @@ |
||
88 | 88 | |
89 | 89 | $this->value = $matches[1]; |
90 | 90 | if (isset($matches[2])) { |
91 | - $this->number = (int)$matches[2]; |
|
91 | + $this->number = (int) $matches[2]; |
|
92 | 92 | } |
93 | 93 | $this->valueScore = $this->mapValueToScore($this->value); |
94 | 94 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | $message = $exception->getMessage(); |
24 | 24 | $message = strtr($message, array("\n" => "\n "))."\n"; |
25 | - $message = empty($this->exceptions) ? $message : "\n" . $message; |
|
25 | + $message = empty($this->exceptions) ? $message : "\n".$message; |
|
26 | 26 | |
27 | 27 | $this->message = rtrim($this->message.$message); |
28 | 28 | $this->exceptions[] = $exception; |
@@ -60,8 +60,8 @@ |
||
60 | 60 | $comparator->assertEquals($argument, $this->value); |
61 | 61 | return 10; |
62 | 62 | } catch (ComparisonFailure $failure) { |
63 | - return false; |
|
64 | - } |
|
63 | + return false; |
|
64 | + } |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | // If either one is an object it should be castable to a string |
@@ -58,9 +58,9 @@ |
||
58 | 58 | return false; |
59 | 59 | } |
60 | 60 | |
61 | - $keyScores = array_map(array($this->key,'scoreArgument'), array_keys($argument)); |
|
62 | - $valueScores = array_map(array($this->value,'scoreArgument'), $argument); |
|
63 | - $scoreEntry = function ($value, $key) { |
|
61 | + $keyScores = array_map(array($this->key, 'scoreArgument'), array_keys($argument)); |
|
62 | + $valueScores = array_map(array($this->value, 'scoreArgument'), $argument); |
|
63 | + $scoreEntry = function($value, $key) { |
|
64 | 64 | return $value && $key ? min(8, ($key + $value) / 2) : false; |
65 | 65 | }; |
66 | 66 |