@@ -11,12 +11,12 @@ discard block |
||
11 | 11 | public function testCanBeCreatedFromFile() { |
12 | 12 | $this->assertInstanceOf( |
13 | 13 | ManifestDocument::class, |
14 | - ManifestDocument::fromFile(__DIR__ . '/../_fixture/phpunit-5.6.5.xml') |
|
14 | + ManifestDocument::fromFile(__DIR__.'/../_fixture/phpunit-5.6.5.xml') |
|
15 | 15 | ); |
16 | 16 | } |
17 | 17 | |
18 | 18 | public function testCaneBeConstructedFromString() { |
19 | - $content = file_get_contents(__DIR__ . '/../_fixture/phpunit-5.6.5.xml'); |
|
19 | + $content = file_get_contents(__DIR__.'/../_fixture/phpunit-5.6.5.xml'); |
|
20 | 20 | $this->assertInstanceOf( |
21 | 21 | ManifestDocument::class, |
22 | 22 | ManifestDocument::fromString($content) |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | private function loadFixture() { |
102 | - return ManifestDocument::fromFile(__DIR__ . '/../_fixture/phpunit-5.6.5.xml'); |
|
102 | + return ManifestDocument::fromFile(__DIR__.'/../_fixture/phpunit-5.6.5.xml'); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | private function loadEmptyFixture() { |
@@ -10,7 +10,7 @@ |
||
10 | 10 | $dom->loadXML('<?xml version="1.0" ?><ext xmlns="https://phar.io/xml/manifest/1.0" />'); |
11 | 11 | $collection = new ExtElementCollection($dom->childNodes); |
12 | 12 | |
13 | - foreach($collection as $position => $extElement) { |
|
13 | + foreach ($collection as $position => $extElement) { |
|
14 | 14 | $this->assertInstanceOf(ExtElement::class, $extElement); |
15 | 15 | $this->assertEquals(0, $position); |
16 | 16 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | $dom->loadXML('<?xml version="1.0" ?><author xmlns="https://phar.io/xml/manifest/1.0" name="Reiner Zufall" email="[email protected]" />'); |
11 | 11 | $collection = new AuthorElementCollection($dom->childNodes); |
12 | 12 | |
13 | - foreach($collection as $authorElement) { |
|
13 | + foreach ($collection as $authorElement) { |
|
14 | 14 | $this->assertInstanceOf(AuthorElement::class, $authorElement); |
15 | 15 | } |
16 | 16 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | $dom->loadXML('<?xml version="1.0" ?><component xmlns="https://phar.io/xml/manifest/1.0" />'); |
11 | 11 | $collection = new ComponentElementCollection($dom->childNodes); |
12 | 12 | |
13 | - foreach($collection as $componentElement) { |
|
13 | + foreach ($collection as $componentElement) { |
|
14 | 14 | $this->assertInstanceOf(ComponentElement::class, $componentElement); |
15 | 15 | } |
16 | 16 | } |
@@ -66,14 +66,14 @@ discard block |
||
66 | 66 | |
67 | 67 | public function dataProvider() { |
68 | 68 | return [ |
69 | - 'application' => [__DIR__ . '/_fixture/phpunit-5.6.5.xml'], |
|
70 | - 'library' => [__DIR__ . '/_fixture/library.xml'], |
|
71 | - 'extension' => [__DIR__ . '/_fixture/extension.xml'] |
|
69 | + 'application' => [__DIR__.'/_fixture/phpunit-5.6.5.xml'], |
|
70 | + 'library' => [__DIR__.'/_fixture/library.xml'], |
|
71 | + 'extension' => [__DIR__.'/_fixture/extension.xml'] |
|
72 | 72 | ]; |
73 | 73 | } |
74 | 74 | |
75 | 75 | public function testThrowsExceptionOnUnsupportedType() { |
76 | - $manifestDocument = ManifestDocument::fromFile(__DIR__ . '/_fixture/custom.xml'); |
|
76 | + $manifestDocument = ManifestDocument::fromFile(__DIR__.'/_fixture/custom.xml'); |
|
77 | 77 | $mapper = new ManifestDocumentMapper(); |
78 | 78 | |
79 | 79 | $this->expectException(ManifestDocumentMapperException::class); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | public function testInvalidVersionInformationThrowsException() { |
84 | - $manifestDocument = ManifestDocument::fromFile(__DIR__ . '/_fixture/invalidversion.xml'); |
|
84 | + $manifestDocument = ManifestDocument::fromFile(__DIR__.'/_fixture/invalidversion.xml'); |
|
85 | 85 | $mapper = new ManifestDocumentMapper(); |
86 | 86 | |
87 | 87 | $this->expectException(ManifestDocumentMapperException::class); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | } |
90 | 90 | |
91 | 91 | public function testInvalidVersionConstraintThrowsException() { |
92 | - $manifestDocument = ManifestDocument::fromFile(__DIR__ . '/_fixture/invalidversionconstraint.xml'); |
|
92 | + $manifestDocument = ManifestDocument::fromFile(__DIR__.'/_fixture/invalidversionconstraint.xml'); |
|
93 | 93 | $mapper = new ManifestDocumentMapper(); |
94 | 94 | |
95 | 95 | $this->expectException(ManifestDocumentMapperException::class); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | * @uses \PharIo\Manifest\ExtensionElement |
101 | 101 | */ |
102 | 102 | public function testInvalidCompatibleConstraintThrowsException() { |
103 | - $manifestDocument = ManifestDocument::fromFile(__DIR__ . '/_fixture/extension-invalidcompatible.xml'); |
|
103 | + $manifestDocument = ManifestDocument::fromFile(__DIR__.'/_fixture/extension-invalidcompatible.xml'); |
|
104 | 104 | $mapper = new ManifestDocumentMapper(); |
105 | 105 | |
106 | 106 | $this->expectException(ManifestDocumentMapperException::class); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * @throws ManifestLoaderException |
41 | 41 | */ |
42 | 42 | public static function fromPhar($filename) { |
43 | - return self::fromFile('phar://' . $filename . '/manifest.xml'); |
|
43 | + return self::fromFile('phar://'.$filename.'/manifest.xml'); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | private function mapCopyright(CopyrightElement $copyright) { |
79 | 79 | $authors = new AuthorCollection(); |
80 | 80 | |
81 | - foreach($copyright->getAuthorElements() as $authorElement) { |
|
81 | + foreach ($copyright->getAuthorElements() as $authorElement) { |
|
82 | 82 | $authors->add( |
83 | 83 | new Author( |
84 | 84 | $authorElement->getName(), |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | return $collection; |
132 | 132 | } |
133 | 133 | |
134 | - foreach($phpElement->getExtElements() as $extElement) { |
|
134 | + foreach ($phpElement->getExtElements() as $extElement) { |
|
135 | 135 | $collection->add( |
136 | 136 | new PhpExtensionRequirement($extElement->getName()) |
137 | 137 | ); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | return $collection; |
153 | 153 | } |
154 | 154 | |
155 | - foreach($document->getBundlesElement()->getComponentElements() as $componentElement) { |
|
155 | + foreach ($document->getBundlesElement()->getComponentElements() as $componentElement) { |
|
156 | 156 | $collection->add( |
157 | 157 | new BundledComponent( |
158 | 158 | $componentElement->getName(), |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | private function addCopyright(CopyrightInformation $copyrightInformation) { |
93 | 93 | $this->xmlWriter->startElement('copyright'); |
94 | 94 | |
95 | - foreach($copyrightInformation->getAuthors() as $author) { |
|
95 | + foreach ($copyrightInformation->getAuthors() as $author) { |
|
96 | 96 | $this->xmlWriter->startElement('author'); |
97 | 97 | $this->xmlWriter->writeAttribute('name', $author->getName()); |
98 | 98 | $this->xmlWriter->writeAttribute('email', (string) $author->getEmail()); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $phpRequirement = new AnyVersionConstraint(); |
114 | 114 | $extensions = []; |
115 | 115 | |
116 | - foreach($requirementCollection as $requirement) { |
|
116 | + foreach ($requirementCollection as $requirement) { |
|
117 | 117 | if ($requirement instanceof PhpVersionRequirement) { |
118 | 118 | $phpRequirement = $requirement->getVersionConstraint(); |
119 | 119 | continue; |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $this->xmlWriter->startElement('php'); |
129 | 129 | $this->xmlWriter->writeAttribute('version', $phpRequirement->asString()); |
130 | 130 | |
131 | - foreach($extensions as $extension) { |
|
131 | + foreach ($extensions as $extension) { |
|
132 | 132 | $this->xmlWriter->startElement('ext'); |
133 | 133 | $this->xmlWriter->writeAttribute('name', $extension); |
134 | 134 | $this->xmlWriter->endElement(); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | $this->xmlWriter->startElement('bundles'); |
146 | 146 | |
147 | - foreach($bundledComponentCollection as $bundledComponent) { |
|
147 | + foreach ($bundledComponentCollection as $bundledComponent) { |
|
148 | 148 | $this->xmlWriter->startElement('component'); |
149 | 149 | $this->xmlWriter->writeAttribute('name', $bundledComponent->getName()); |
150 | 150 | $this->xmlWriter->writeAttribute('version', $bundledComponent->getVersion()->getVersionString()); |
@@ -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", |