Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Generators/Markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function printFooter()
// Turn off errors so we don't get timezone warnings if people
// don't have their timezone set.
$errorLevel = error_reporting(0);
echo 'Documentation generated on '.date('r');
echo PHP_EOL.'Documentation generated on '.date('r');
echo ' by [PHP_CodeSniffer '.Config::VERSION.'](https://github.com/PHPCSStandards/PHP_CodeSniffer)'.PHP_EOL;
error_reporting($errorLevel);

Expand Down
1 change: 1 addition & 0 deletions tests/Core/Generators/Expectations/ExpectedOutputOneDoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

## One Standard Block, No Code
Documentation contains one standard block and no code comparison.

Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,5 @@ This is standard block two.
</td>
</tr>
</table>

Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)
2 changes: 1 addition & 1 deletion tests/Core/Generators/Fixtures/MarkdownDouble.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MarkdownDouble extends Markdown
*/
protected function printFooter()
{
echo 'Documentation generated on *REDACTED*';
echo PHP_EOL.'Documentation generated on *REDACTED*';
echo ' by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)'.PHP_EOL;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Core/Generators/MarkdownTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function testFooter()
$config = new ConfigDouble(["--standard=$standard"]);
$ruleset = new Ruleset($config);

$regex = '`^Documentation generated on [A-Z][a-z]{2}, [0-9]{2} [A-Z][a-z]{2} 20[0-9]{2} [0-2][0-9](?::[0-5][0-9]){2} [+-][0-9]{4}';
$regex = '`^\RDocumentation generated on [A-Z][a-z]{2}, [0-9]{2} [A-Z][a-z]{2} 20[0-9]{2} [0-2][0-9](?::[0-5][0-9]){2} [+-][0-9]{4}';
$regex .= ' by \[PHP_CodeSniffer [3-9]\.[0-9]+.[0-9]+\]\(https://github\.com/PHPCSStandards/PHP_CodeSniffer\)\R$`';
$this->expectOutputRegex($regex);

Expand Down