Small refactoring and documentation fix
Cette révision appartient à :
Parent
def4b5ed98
révision
837fca6886
@ -6,7 +6,7 @@
|
||||
[![Build Status](https://img.shields.io/travis/dauxio/daux.io/master.svg?style=flat-square)](https://travis-ci.org/dauxio/daux.io)
|
||||
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/dauxio/daux.io.svg?style=flat-square)](https://scrutinizer-ci.com/g/dauxio/daux.io/code-structure)
|
||||
[![Quality Score](https://img.shields.io/scrutinizer/g/dauxio/daux.io.svg?style=flat-square)](https://scrutinizer-ci.com/g/dauxio/daux.io)
|
||||
[![Total Downloads](https://img.shields.io/packagist/dt/dauxio/daux.io.svg?style=flat-square)](https://packagist.org/packages/dauxio/daux.io)
|
||||
[![Total Downloads](https://img.shields.io/packagist/dt/daux/daux.io.svg?style=flat-square)](https://packagist.org/packages/daux/daux.io)
|
||||
|
||||
|
||||
**Daux.io** is a documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It helps you create great looking documentation in a developer friendly way.
|
||||
|
@ -72,7 +72,7 @@ class Daux
|
||||
|
||||
// Read command line overrides
|
||||
$override_file = $this->getConfigurationOverride($override_file);
|
||||
if ($override_file != null) {
|
||||
if ($override_file !== null) {
|
||||
$params->setConfigurationOverrideFile($override_file);
|
||||
$this->loadConfiguration($override_file);
|
||||
}
|
||||
|
@ -469,11 +469,19 @@ class DauxHelper
|
||||
return '' !== $parts['root'];
|
||||
}
|
||||
|
||||
public static function getAbsolutePath($path) {
|
||||
if (DauxHelper::isAbsolutePath($path)) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
return getcwd() . '/' . $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $path
|
||||
* @param $basedir
|
||||
* @param $var
|
||||
* @param $type
|
||||
* @param string|null $path
|
||||
* @param string $basedir
|
||||
* @param string $var The constant name to check
|
||||
* @param "dir"|"file" $type
|
||||
* @return false|null|string
|
||||
*/
|
||||
public static function findLocation($path, $basedir, $var, $type) {
|
||||
@ -483,18 +491,17 @@ class DauxHelper
|
||||
return $env;
|
||||
}
|
||||
|
||||
// If Path is explicitly null, it's useless to go further
|
||||
if ($path == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Check if it's relative to the current directory or an absolute path
|
||||
if (DauxHelper::is($path, $type)) {
|
||||
if (DauxHelper::isAbsolutePath($path)) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
return getcwd() . '/' . $path;
|
||||
return DauxHelper::getAbsolutePath($path);
|
||||
}
|
||||
|
||||
// Check if it exists relative to Daux's root
|
||||
$newPath = $basedir . DIRECTORY_SEPARATOR . $path;
|
||||
if (DauxHelper::is($newPath, $type)) {
|
||||
return $newPath;
|
||||
|
Chargement…
Référencer dans un nouveau ticket
Block a user