Update "tools" directory to be compliant with the php-cs-fixer
This commit is contained in:
@@ -1,26 +1,29 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
require_once (__DIR__."/../src/markdown.php");
|
||||
require_once(__DIR__ . "/../src/markdown.php");
|
||||
|
||||
if (! isset ($argv[1]))
|
||||
{
|
||||
file_put_contents ("php://stderr",
|
||||
"No file to convert in markdown provided\n");
|
||||
exit (1);
|
||||
if (! isset($argv[1])) {
|
||||
file_put_contents(
|
||||
"php://stderr",
|
||||
"No file to convert in markdown provided\n"
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
if (! file_exists ($argv[1]))
|
||||
{
|
||||
file_put_contents ("php://stderr",
|
||||
"The file to convert in markdown doesn't exists\n");
|
||||
exit (2);
|
||||
if (! file_exists($argv[1])) {
|
||||
file_put_contents(
|
||||
"php://stderr",
|
||||
"The file to convert in markdown doesn't exists\n"
|
||||
);
|
||||
exit(2);
|
||||
}
|
||||
if (! is_readable ($argv[1]))
|
||||
{
|
||||
file_put_contents ("php://stderr",
|
||||
"The file to convert in markdown is not readable\n");
|
||||
exit (3);
|
||||
if (! is_readable($argv[1])) {
|
||||
file_put_contents(
|
||||
"php://stderr",
|
||||
"The file to convert in markdown is not readable\n"
|
||||
);
|
||||
exit(3);
|
||||
}
|
||||
|
||||
$md = new markdown ();
|
||||
echo $md->html (file_get_contents ($argv[1]));
|
||||
$md = new Domframework\Markdown();
|
||||
echo $md->html(file_get_contents($argv[1]));
|
||||
|
||||
Reference in New Issue
Block a user