Skip to content

Commit

Permalink
Do some reformattin'.
Browse files Browse the repository at this point in the history
  • Loading branch information
damiendart committed Jul 2, 2024
1 parent b1979e4 commit a6e6e53
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[{cron-hourly,obsidian-export}]
[{cron-hourly,ssg}]
indent_size = 4

[*.{php,twig}]
Expand Down
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@
->in(__DIR__)
->name('*.php')
->name(basename(__FILE__))
->name('ssg')
->name('update-git-repositories'),
);
28 changes: 14 additions & 14 deletions src/ssg/ssg
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ require_once __DIR__ . '/../../protected/vendor/autoload.php';

error_reporting(E_ALL | E_STRICT);
set_error_handler(
static function (
int $errorCode,
string $message,
string $file = 'UNKNOWN',
int $line = -1,
): bool {
if (($errorCode & error_reporting()) !== 0) {
throw new ErrorException($message, 0, $errorCode, $file, $line);
}

return false;
},
static function (
int $errorCode,
string $message,
string $file = 'UNKNOWN',
int $line = -1,
): bool {
if (($errorCode & error_reporting()) !== 0) {
throw new ErrorException($message, 0, $errorCode, $file, $line);
}

return false;
},
);

use StaticSiteGenerator\StaticSiteGenerator;

$application = new StaticSiteGenerator(
__DIR__ . '/input/',
__DIR__ . '/../../public/',
__DIR__ . '/input/',
__DIR__ . '/../../public/',
);

exit($application->run());

0 comments on commit a6e6e53

Please sign in to comment.