if (false === $docFile) { $docFileNotFound = true; } } else { $docFile = realpath('./docs.xml'); if (false !== $docFile) { $docFileNotFound = false; } } if (true === $docFileFound) { exit(1); } if (false === $docFileNotFound) { $docXml = simplexml_load_file($docFile); } if (false === $docXml) { exit(2); } if (!file_exists($outDir)) { if (!mkdir($outDir, 0777, true)) { exit(3); } } $outDir = realpath($outDir); if (!is_dir($outDir)) { exit(4); } $proj = \phpLINQ\Docs\Project::fromXml($docXml); $proj->baseDir(__DIR__); $proj->outDir($outDir); $proj->generate();