Use __DIR__ instead of dirname

This commit is contained in:
Arkadiusz Kondas 2016-12-12 18:45:14 +01:00
parent a4f65bd13f
commit fd85033339
4 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@ class GlassDataset extends CsvDataset
{
public function __construct()
{
$filepath = dirname(__FILE__).'/../../../../data/glass.csv';
$filepath = __DIR__.'/../../../../data/glass.csv';
parent::__construct($filepath, 9, true);
}
}

View File

@ -16,7 +16,7 @@ class IrisDataset extends CsvDataset
{
public function __construct()
{
$filepath = dirname(__FILE__).'/../../../../data/iris.csv';
$filepath = __DIR__.'/../../../../data/iris.csv';
parent::__construct($filepath, 4, true);
}
}

View File

@ -16,7 +16,7 @@ class WineDataset extends CsvDataset
{
public function __construct()
{
$filepath = dirname(__FILE__).'/../../../../data/wine.csv';
$filepath = __DIR__.'/../../../../data/wine.csv';
parent::__construct($filepath, 13, true);
}
}

View File

@ -118,7 +118,7 @@ class SupportVectorMachine
$this->shrinking = $shrinking;
$this->probabilityEstimates = $probabilityEstimates;
$rootPath = realpath(implode(DIRECTORY_SEPARATOR, [dirname(__FILE__), '..', '..', '..'])).DIRECTORY_SEPARATOR;
$rootPath = realpath(implode(DIRECTORY_SEPARATOR, [__DIR__, '..', '..', '..'])).DIRECTORY_SEPARATOR;
$this->binPath = $rootPath.'bin'.DIRECTORY_SEPARATOR.'libsvm'.DIRECTORY_SEPARATOR;
$this->varPath = $rootPath.'var'.DIRECTORY_SEPARATOR;