Skip to content

Commit d94bf52

Browse files
committed
Fix CI output.
1 parent 723c6d4 commit d94bf52

File tree

6 files changed

+17
-8
lines changed

6 files changed

+17
-8
lines changed

src/Annotator/AbstractAnnotator.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ protected function annotateContent(string $path, string $content, array $annotat
242242
}
243243

244244
if ($newContent === $content) {
245-
$this->reportSkipped();
245+
$this->reportSkipped($path);
246246

247247
return false;
248248
}
@@ -861,9 +861,10 @@ protected function report(): void {
861861
}
862862

863863
/**
864+
* @param string $path
864865
* @return void
865866
*/
866-
protected function reportSkipped(): void {
867+
protected function reportSkipped(string $path): void {
867868
$out = [];
868869

869870
$skipped = !empty($this->_counter[static::COUNT_SKIPPED]) ? $this->_counter[static::COUNT_SKIPPED] : 0;
@@ -875,6 +876,10 @@ protected function reportSkipped(): void {
875876
return;
876877
}
877878

879+
if (!$this->getConfig('verbose')) {
880+
$this->_io->out('-> ' . str_replace(ROOT . DS, '', $path));
881+
}
882+
878883
$this->_io->out(' -> ' . implode(', ', $out));
879884
}
880885

src/Annotator/CallbackAnnotatorTask/AbstractCallbackAnnotatorTask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected function annotateMethods(string $path, File $file, array $methods): bo
103103
$newContent = $fixer->getContents();
104104

105105
if ($newContent === $this->content) {
106-
$this->reportSkipped();
106+
$this->reportSkipped($path);
107107

108108
return false;
109109
}

src/Annotator/CallbackAnnotatorTask/VirtualFieldCallbackAnnotatorTask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ protected function annotateMethods(string $path, File $file, array $methods): bo
104104
$newContent = $fixer->getContents();
105105

106106
if ($newContent === $this->content) {
107-
$this->reportSkipped();
107+
$this->reportSkipped($path);
108108

109109
return false;
110110
}

src/Annotator/ClassAnnotatorTask/AbstractClassAnnotatorTask.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ protected function annotateContent(string $path, string $content, array $annotat
7575
}
7676

7777
if ($newContent === $content) {
78-
$this->reportSkipped();
78+
$this->reportSkipped($path);
7979

8080
return false;
8181
}
@@ -127,7 +127,7 @@ protected function annotateInlineContent(string $path, string $content, array $a
127127
}
128128

129129
if ($newContent === $content) {
130-
$this->reportSkipped();
130+
$this->reportSkipped($path);
131131

132132
return false;
133133
}

src/Annotator/TemplateAnnotator.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,15 @@ protected function annotateContent(string $path, string $content, array $annotat
7272
}
7373

7474
if ($newContent === $content) {
75-
$this->reportSkipped();
75+
$this->reportSkipped($path);
7676

7777
return false;
7878
}
7979

80+
if (!$this->getConfig('verbose')) {
81+
$this->_io->out('-> ' . str_replace(ROOT . DS, '', $path));
82+
}
83+
8084
$this->displayDiff($content, $newContent);
8185
$this->storeFile($path, $newContent);
8286

src/Command/Annotate/TemplatesCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected function _templates($folder) {
7979
$dir = $name;
8080
$templatePathPos = strpos($folder, DS . 'templates' . DS);
8181
if ($templatePathPos) {
82-
$dir = substr($folder, $templatePathPos + 13) . DS . $name;
82+
$dir = substr($folder, $templatePathPos + strlen(DS . 'templates' . DS)) . $name;
8383
}
8484
if ($this->_shouldSkip($dir, $path)) {
8585
continue;

0 commit comments

Comments
 (0)