Skip to content

Commit

Permalink
Use __DIR__ instead of dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
akondas committed Dec 12, 2016
1 parent a4f65bd commit fd85033
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Phpml/Dataset/Demo/GlassDataset.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion src/Phpml/Dataset/Demo/IrisDataset.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion src/Phpml/Dataset/Demo/WineDataset.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion src/Phpml/SupportVectorMachine/SupportVectorMachine.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function __construct(
$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;
Expand Down

0 comments on commit fd85033

Please sign in to comment.