Passed
Push — master ( 669df3...c9ea6f )
by Christian
03:05
created
src/Report/Html/Renderer/DirectoryRenderer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -70,18 +70,18 @@  discard block
 block discarded – undo
70 70
     private function renderDirectory(ResultDirectory $directory): void
71 71
     {
72 72
         $directoryPath = $directory->getPath();
73
-        $pathToRoot = './'.str_repeat('../', substr_count($directoryPath, '/') + ($directoryPath ? 1 : 0));
73
+        $pathToRoot = './' . str_repeat('../', substr_count($directoryPath, '/') + ($directoryPath ? 1 : 0));
74 74
         $filesList = '';
75 75
         foreach ($directory->getDirectories() as $subDir) {
76 76
             $name = $subDir->getName();
77
-            $link = './'.$subDir->getName().'/index.html';
77
+            $link = './' . $subDir->getName() . '/index.html';
78 78
             if ($subDir->getDeadCount() || $subDir->getUndeadCount()) {
79 79
                 $filesList .= $this->renderDirectoryItem($name, $link, $subDir, $pathToRoot);
80 80
             }
81 81
         }
82 82
         foreach ($directory->getFiles() as $fileResult) {
83 83
             $name = basename($fileResult->getFile());
84
-            $link = './'.$name.'.html';
84
+            $link = './' . $name . '.html';
85 85
             if ($fileResult->getDeadCount() || $fileResult->getUndeadCount()) {
86 86
                 $filesList .= $this->renderDirectoryItem($name, $link, $fileResult, $pathToRoot);
87 87
             }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             'version' => Application::VERSION,
97 97
         ]);
98 98
 
99
-        $reportFile = $this->reportDir.DIRECTORY_SEPARATOR.$directoryPath.'/index.html';
99
+        $reportFile = $this->reportDir . DIRECTORY_SEPARATOR . $directoryPath . '/index.html';
100 100
         $reportDir = dirname($reportFile);
101 101
         if (!is_dir($reportDir)) {
102 102
             mkdir($reportDir, 0777, true);
@@ -157,19 +157,19 @@  discard block
 block discarded – undo
157 157
     private function renderBreadcrumb(string $directoryPath): string
158 158
     {
159 159
         if (!$directoryPath) {
160
-            return '<li class="breadcrumb-item">'.$this->sourceDir.'</li> ';
160
+            return '<li class="breadcrumb-item">' . $this->sourceDir . '</li> ';
161 161
         }
162 162
 
163 163
         $parts = explode('/', $directoryPath);
164 164
         $numParts = count($parts);
165
-        $breadcrumbString = '<li class="breadcrumb-item"><a href="./'.str_repeat('../', $numParts).'index.html">'.$this->sourceDir.'</a></li> ';
165
+        $breadcrumbString = '<li class="breadcrumb-item"><a href="./' . str_repeat('../', $numParts) . 'index.html">' . $this->sourceDir . '</a></li> ';
166 166
 
167 167
         $folderUp = $numParts - 1;
168 168
         while ($label = array_shift($parts)) {
169 169
             if (!$parts) {
170
-                $breadcrumbString .= '<li class="breadcrumb-item active">'.$label.'</li> ';
170
+                $breadcrumbString .= '<li class="breadcrumb-item active">' . $label . '</li> ';
171 171
             } else {
172
-                $link = './'.str_repeat('../', $folderUp).'index.html';
172
+                $link = './' . str_repeat('../', $folderUp) . 'index.html';
173 173
                 $breadcrumbString .= sprintf('<li class="breadcrumb-item"><a href="%s">%s</a></li> ', $link, $label);
174 174
             }
175 175
             --$folderUp;
Please login to merge, or discard this patch.