@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | if (is_string($record)) { |
89 | 89 | $record = ['message' => $record]; |
90 | 90 | } |
91 | - return $this->hasRecordThatPasses(function ($rec) use ($record) { |
|
91 | + return $this->hasRecordThatPasses(function($rec) use ($record) { |
|
92 | 92 | if ($rec['message'] !== $record['message']) { |
93 | 93 | return false; |
94 | 94 | } |
@@ -101,14 +101,14 @@ discard block |
||
101 | 101 | |
102 | 102 | public function hasRecordThatContains($message, $level) |
103 | 103 | { |
104 | - return $this->hasRecordThatPasses(function ($rec) use ($message) { |
|
104 | + return $this->hasRecordThatPasses(function($rec) use ($message) { |
|
105 | 105 | return strpos($rec['message'], $message) !== false; |
106 | 106 | }, $level); |
107 | 107 | } |
108 | 108 | |
109 | 109 | public function hasRecordThatMatches($regex, $level) |
110 | 110 | { |
111 | - return $this->hasRecordThatPasses(function ($rec) use ($regex) { |
|
111 | + return $this->hasRecordThatPasses(function($rec) use ($regex) { |
|
112 | 112 | return preg_match($regex, $rec['message']) > 0; |
113 | 113 | }, $level); |
114 | 114 | } |
@@ -129,14 +129,14 @@ discard block |
||
129 | 129 | public function __call($method, $args) |
130 | 130 | { |
131 | 131 | if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { |
132 | - $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; |
|
132 | + $genericMethod = $matches[1].('Records' !== $matches[3] ? 'Record' : '').$matches[3]; |
|
133 | 133 | $level = strtolower($matches[2]); |
134 | 134 | if (method_exists($this, $genericMethod)) { |
135 | 135 | $args[] = $level; |
136 | 136 | return call_user_func_array([$this, $genericMethod], $args); |
137 | 137 | } |
138 | 138 | } |
139 | - throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); |
|
139 | + throw new \BadMethodCallException('Call to undefined method '.get_class($this).'::'.$method.'()'); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | public function reset() |
@@ -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()); |
@@ -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(), |
@@ -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" ?><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 | } |
@@ -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" ?><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 | } |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | |
69 | 69 | public function dataProvider() { |
70 | 70 | return [ |
71 | - 'application' => [file_get_contents(__DIR__ . '/_fixture/phpunit-5.6.5.xml')], |
|
72 | - 'library' => [file_get_contents(__DIR__ . '/_fixture/library.xml')], |
|
73 | - 'extension' => [file_get_contents(__DIR__ . '/_fixture/extension.xml')] |
|
71 | + 'application' => [file_get_contents(__DIR__.'/_fixture/phpunit-5.6.5.xml')], |
|
72 | + 'library' => [file_get_contents(__DIR__.'/_fixture/library.xml')], |
|
73 | + 'extension' => [file_get_contents(__DIR__.'/_fixture/extension.xml')] |
|
74 | 74 | ]; |
75 | 75 | } |
76 | 76 | |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | * @uses \PharIo\Manifest\ApplicationName |
80 | 80 | */ |
81 | 81 | public function testCanSerializeToFile() { |
82 | - $src = __DIR__ . '/_fixture/library.xml'; |
|
83 | - $dest = '/tmp/' . uniqid('serializer', true); |
|
82 | + $src = __DIR__.'/_fixture/library.xml'; |
|
83 | + $dest = '/tmp/'.uniqid('serializer', true); |
|
84 | 84 | $manifest = ManifestLoader::fromFile($src); |
85 | 85 | $serializer = new ManifestSerializer(); |
86 | 86 | $serializer->serializeToFile($manifest, $dest); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $serializer = new ManifestSerializer(); |
109 | 109 | $this->assertXmlStringEqualsXmlFile( |
110 | - __DIR__ . '/_fixture/custom.xml', |
|
110 | + __DIR__.'/_fixture/custom.xml', |
|
111 | 111 | $serializer->serializeToString($manifest) |
112 | 112 | ); |
113 | 113 | } |