@@ 125-146 (lines=22) @@ | ||
122 | $source->data()->set('url', $permalink->relativeUrlPath()); |
|
123 | } |
|
124 | ||
125 | if ($updatedSources = $sourceSet->updatedSources()) { |
|
126 | if (!$found) { |
|
127 | $this->consoleIo->write('Detected new or updated files'); |
|
128 | $found = true; |
|
129 | } |
|
130 | ||
131 | $total = count($updatedSources); |
|
132 | ||
133 | $this->consoleIo->write('Converting: ', false); |
|
134 | $this->consoleIo->write('', false); |
|
135 | $counter = 0; |
|
136 | $timer = microtime(true); |
|
137 | foreach ($updatedSources as $source) { |
|
138 | $this->converterManager->convertSource($source); |
|
139 | ||
140 | if ($source->canBeFormatted()) { |
|
141 | $source->data()->set('blocks', $this->formatterManager->formatSourceBlocks($source)); |
|
142 | } |
|
143 | $this->consoleIo->overwrite(sprintf('%3d%%', 100 * ((++$counter) / $total)), false); |
|
144 | } |
|
145 | $this->consoleIo->write(sprintf(' (%d sources / %4.2f seconds)', $total, microtime(true) - $timer)); |
|
146 | } |
|
147 | ||
148 | if ($updatedSources = $sourceSet->updatedSources()) { |
|
149 | if (!$found) { |
|
@@ 148-170 (lines=23) @@ | ||
145 | $this->consoleIo->write(sprintf(' (%d sources / %4.2f seconds)', $total, microtime(true) - $timer)); |
|
146 | } |
|
147 | ||
148 | if ($updatedSources = $sourceSet->updatedSources()) { |
|
149 | if (!$found) { |
|
150 | $this->consoleIo->write('Detected new or updated files'); |
|
151 | $found = true; |
|
152 | } |
|
153 | ||
154 | $total = count($updatedSources); |
|
155 | ||
156 | $this->consoleIo->write('Formatting: ', false); |
|
157 | $this->consoleIo->write('', false); |
|
158 | $counter = 0; |
|
159 | $timer = microtime(true); |
|
160 | foreach ($updatedSources as $source) { |
|
161 | if ($source->canBeFormatted()) { |
|
162 | $source->setFormattedContent($this->formatterManager->formatSourcePage($source)); |
|
163 | } else { |
|
164 | $source->setFormattedContent($source->content()); |
|
165 | } |
|
166 | $this->consoleIo->overwrite(sprintf('%3d%%', 100 * ((++$counter) / $total)), false); |
|
167 | } |
|
168 | ||
169 | $this->consoleIo->write(sprintf(' (%d sources / %4.2f seconds)', $total, microtime(true) - $timer)); |
|
170 | } |
|
171 | ||
172 | foreach ($sourceSet->updatedSources() as $source) { |
|
173 | if ($source->isGenerator() || $source->shouldBeSkipped()) { |