From 8d71d75c262ad2cd35eb196bced40017c1652949 Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Thu, 5 May 2016 15:41:34 -0400 Subject: [PATCH] Changing pre-commit phpcs validation to find docroot differently. (#32) --- .../phing/phingcludes/FilterFileListByFileSetTask.php | 11 +---------- template/build/core/phing/tasks/validate.xml | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/template/build/core/phing/phingcludes/FilterFileListByFileSetTask.php b/template/build/core/phing/phingcludes/FilterFileListByFileSetTask.php index a8630fd74..e0a777f72 100644 --- a/template/build/core/phing/phingcludes/FilterFileListByFileSetTask.php +++ b/template/build/core/phing/phingcludes/FilterFileListByFileSetTask.php @@ -27,11 +27,6 @@ public function setFileList($fileList) $this->fileList = $fileList; } - public function setRoot($root) - { - $this->root = $root; - } - /** * Nested adder, adds a set of files (nested fileset attribute). * @@ -68,10 +63,6 @@ public function main() { throw new BuildException("You must set the file property."); } - if (!isset($this->root)) { - throw new BuildException("You must set the project root."); - } - if (count($this->filesets) == 0) { throw new BuildException("You must define a fileset."); } @@ -90,7 +81,7 @@ public function main() { } protected function prependProjectPath($relative_path) { - return $this->root. DIRECTORY_SEPARATOR . $relative_path; + return $this->project->getBasedir()->getAbsolutePath() . DIRECTORY_SEPARATOR . $relative_path; } /** diff --git a/template/build/core/phing/tasks/validate.xml b/template/build/core/phing/tasks/validate.xml index 964701d59..36f6fc763 100644 --- a/template/build/core/phing/tasks/validate.xml +++ b/template/build/core/phing/tasks/validate.xml @@ -19,7 +19,7 @@ - +