Passed
Push — master ( afd82b...67bcc0 )
by Christian
01:53
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
             }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             'date' => date('r'),
96 96
         ]);
97 97
 
98
-        $reportFile = $this->reportDir.DIRECTORY_SEPARATOR.$directoryPath.'/index.html';
98
+        $reportFile = $this->reportDir . DIRECTORY_SEPARATOR . $directoryPath . '/index.html';
99 99
         $reportDir = dirname($reportFile);
100 100
         if (!is_dir($reportDir)) {
101 101
             mkdir($reportDir, 0777, true);
@@ -156,20 +156,20 @@  discard block
 block discarded – undo
156 156
     private function renderBreadcrumb(string $directoryPath): string
157 157
     {
158 158
         if (!$directoryPath) {
159
-            return '<li class="breadcrumb-item">'.$this->rootDir.'</li> ';
159
+            return '<li class="breadcrumb-item">' . $this->rootDir . '</li> ';
160 160
         }
161 161
 
162 162
         $parts = explode('/', $directoryPath);
163 163
         $numParts = count($parts);
164 164
         $rootDirName = $this->rootDir ?? '.';
165
-        $breadcrumbString = '<li class="breadcrumb-item"><a href="./'.str_repeat('../', $numParts).'index.html">'.htmlspecialchars($rootDirName).'</a></li> ';
165
+        $breadcrumbString = '<li class="breadcrumb-item"><a href="./' . str_repeat('../', $numParts) . 'index.html">' . htmlspecialchars($rootDirName) . '</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, htmlspecialchars($label));
174 174
             }
175 175
             --$folderUp;
Please login to merge, or discard this patch.
src/Report/Html/Renderer/DashboardRenderer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             'full_path' => htmlspecialchars($this->rootDir),
92 92
             'date' => date('r'),
93 93
         ]);
94
-        $this->dashboardTemplate->renderTo($this->reportDir.DIRECTORY_SEPARATOR.'dashboard.html');
94
+        $this->dashboardTemplate->renderTo($this->reportDir . DIRECTORY_SEPARATOR . 'dashboard.html');
95 95
     }
96 96
 
97 97
     private function renderTombstonesView(AnalyzerResult $result): string
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
             $deadSince = '';
119 119
             if ($date) {
120 120
                 if ($age = TimePeriodFormatter::formatAge($date)) {
121
-                    $deadSince = 'for '.$age;
121
+                    $deadSince = 'for ' . $age;
122 122
                 } else {
123
-                    $deadSince = 'since '.$date;
123
+                    $deadSince = 'since ' . $date;
124 124
                 }
125 125
             }
126 126
             $this->deadTemplate->setVar([
Please login to merge, or discard this patch.
src/Report/Html/Renderer/FileRenderer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $sourceCode = $this->formatSourceCode($fileResult);
56 56
         $relativeFilePath = PathNormalizer::makeRelativeTo($fileResult->getFile(), $this->rootDir);
57 57
         $this->fileTemplate->setVar([
58
-            'path_to_root' => './'.str_repeat('../', substr_count($relativeFilePath, '/')),
58
+            'path_to_root' => './' . str_repeat('../', substr_count($relativeFilePath, '/')),
59 59
             'full_path' => htmlspecialchars($fileResult->getFile()),
60 60
             'breadcrumb' => $this->renderBreadcrumb($relativeFilePath),
61 61
             'tombstones_list' => $tombstonesList,
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             'date' => date('r'),
64 64
         ]);
65 65
 
66
-        $reportFile = $this->reportDir.DIRECTORY_SEPARATOR.$relativeFilePath.'.html';
66
+        $reportFile = $this->reportDir . DIRECTORY_SEPARATOR . $relativeFilePath . '.html';
67 67
         $reportDir = dirname($reportFile);
68 68
         if (!is_dir($reportDir)) {
69 69
             mkdir($reportDir, 0777, true);
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
         $parts = explode('/', $relativeFilePath);
140 140
         $numParts = count($parts);
141 141
         $rootDirName = $this->rootDir ?? '.';
142
-        $breadcrumbString = '<li class="breadcrumb-item"><a href="./'.str_repeat('../', $numParts - 1).'index.html">'.htmlspecialchars($rootDirName).'</a></li> ';
142
+        $breadcrumbString = '<li class="breadcrumb-item"><a href="./' . str_repeat('../', $numParts - 1) . 'index.html">' . htmlspecialchars($rootDirName) . '</a></li> ';
143 143
 
144 144
         $folderUp = $numParts - 2;
145 145
         while ($label = array_shift($parts)) {
146 146
             if (!$parts) {
147
-                $breadcrumbString .= '<li class="breadcrumb-item active">'.$label.'</li> ';
147
+                $breadcrumbString .= '<li class="breadcrumb-item active">' . $label . '</li> ';
148 148
             } else {
149
-                $link = './'.str_repeat('../', $folderUp).'index.html';
149
+                $link = './' . str_repeat('../', $folderUp) . 'index.html';
150 150
                 $breadcrumbString .= sprintf('<li class="breadcrumb-item"><a href="%s">%s</a></li> ', $link, htmlspecialchars($label));
151 151
             }
152 152
             --$folderUp;
Please login to merge, or discard this patch.
src/Cli/Command.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
 
64 64
     private function doExecute(): void
65 65
     {
66
-        $configFile = $this->input->getOption('config') ?? getcwd().DIRECTORY_SEPARATOR.'tombstone.yml';
66
+        $configFile = $this->input->getOption('config') ?? getcwd() . DIRECTORY_SEPARATOR . 'tombstone.yml';
67 67
         if (!file_exists($configFile)) {
68
-            throw new \InvalidArgumentException('Could not find configuration file '.$configFile);
68
+            throw new \InvalidArgumentException('Could not find configuration file ' . $configFile);
69 69
         }
70 70
 
71
-        $this->output->debug('Load config from '.$configFile);
71
+        $this->output->debug('Load config from ' . $configFile);
72 72
         $configLoader = ConfigurationLoader::create();
73 73
         $config = $configLoader->loadConfiguration([new YamlConfigProvider($configFile)]);
74 74
         $rootDir = $config['rootDir'] ?? null;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             require_once $config['logs']['custom']['file'];
131 131
             $reflectionClass = new \ReflectionClass($config['logs']['custom']['class']);
132 132
             if (!$reflectionClass->implementsInterface(LogReaderInterface::class)) {
133
-                throw new \Exception('Class '.$config['logs']['custom']['class'].' must implement '.LogReaderInterface::class);
133
+                throw new \Exception('Class ' . $config['logs']['custom']['class'] . ' must implement ' . LogReaderInterface::class);
134 134
             }
135 135
 
136 136
             $logReaders[] = $reflectionClass->newInstance();
Please login to merge, or discard this patch.