Skip to content

Commit

Permalink
Used getDataTypeName instead of legacy code (#1073)
Browse files Browse the repository at this point in the history
  • Loading branch information
siad007 authored May 21, 2019
1 parent fd898d7 commit 6c79160
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions classes/phing/types/AbstractFileSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public function getDirectoryScanner(Project $p = null)
}

if ($this->dir === null) {
throw new BuildException(sprintf("No directory specified for <%s>.", strtolower(get_class($this))));
throw new BuildException(sprintf("No directory specified for <%s>.", $this->getDataTypeName()));
}
if (!$this->dir->exists() && $this->errorOnMissingDir) {
throw new BuildException("Directory " . $this->dir->getAbsolutePath() . " not found.");
Expand Down Expand Up @@ -436,8 +436,7 @@ public function dieOnCircularReference(&$stk, Project $p = null)
*/
public function getRef(Project $p)
{
$dataTypeName = StringHelper::substring(__CLASS__, strrpos(__CLASS__, '\\') + 1);
return $this->getCheckedRef(__CLASS__, $dataTypeName);
return $this->getCheckedRef(__CLASS__, $this->getDataTypeName());
}

// SelectorContainer methods
Expand Down

0 comments on commit 6c79160

Please sign in to comment.