diff options
author | Georgy Redkozubov <georgy.redkozubov@linaro.org> | 2012-05-21 17:28:27 +0400 |
---|---|---|
committer | Georgy Redkozubov <georgy.redkozubov@linaro.org> | 2012-05-21 17:28:27 +0400 |
commit | 6effe13d2e956022d1fa797a1dcb422c68d97285 (patch) | |
tree | c57aaa898405da4dbafa889d1c377864ee19bbba | |
parent | 1095b058519bd2af4fd36e6ec525656d1b7f90fe (diff) |
Identation fixed
-rw-r--r-- | licenses/BuildInfo.php | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/licenses/BuildInfo.php b/licenses/BuildInfo.php index 3824596..462055e 100644 --- a/licenses/BuildInfo.php +++ b/licenses/BuildInfo.php @@ -2,77 +2,77 @@ class BuildInfo { - private $text_array = array(); - private $multiline_vars = array("License-Text"); + private $text_array = array(); + private $multiline_vars = array("License-Text"); - public function __construct($text_file) - { - if (file_exists($text_file)) { - $this->text_array = $this->readFile($text_file); - } - else { - throw new Exception("File $text_file not found"); - } - } + public function __construct($text_file) + { + if (file_exists($text_file)) { + $this->text_array = $this->readFile($text_file); + } + else { + throw new Exception("File $text_file not found"); + } + } - private function readFile($fn) - { - $text_ar = array(); - $field = ''; - $file = fopen($fn, "r") or exit("Unable to open file $fn!"); - while(!feof($file)) { - $line = fgets($file); - if (trim($line) == "") - continue; - $fields = explode(":", $line, "2"); - if (isset($fields[1])) { - $field = $fields[0]; - $text_ar[$field] = trim($fields[1]); - } - elseif (in_array($field, $this->multiline_vars)) { - while(!feof($file)) { - $line = fgets($file); - $text_ar[$field] = $text_ar[$field]."\n".rtrim($line); - } - } - } - fclose($file); + private function readFile($fn) + { + $text_ar = array(); + $field = ''; + $file = fopen($fn, "r") or exit("Unable to open file $fn!"); + while(!feof($file)) { + $line = fgets($file); + if (trim($line) == "") + continue; + $fields = explode(":", $line, "2"); + if (isset($fields[1])) { + $field = $fields[0]; + $text_ar[$field] = trim($fields[1]); + } + elseif (in_array($field, $this->multiline_vars)) { + while(!feof($file)) { + $line = fgets($file); + $text_ar[$field] = $text_ar[$field]."\n".rtrim($line); + } + } + } + fclose($file); - return $text_ar; - } + return $text_ar; + } - public function getFormatVersion() - { - return $this->text_array["Format-Version"]; - } + public function getFormatVersion() + { + return $this->text_array["Format-Version"]; + } - public function getBuildName() - { - return $this->text_array["Build-Name"]; - } + public function getBuildName() + { + return $this->text_array["Build-Name"]; + } - public function getTheme() - { - return $this->text_array["Theme"]; - } + public function getTheme() + { + return $this->text_array["Theme"]; + } - public function getLicenseType() - { - return $this->text_array["License-Type"]; - } + public function getLicenseType() + { + return $this->text_array["License-Type"]; + } - public function getLaunchpadTeams() - { - $this->text_array["OpenID-Launchpad-Teams"]; - } + public function getLaunchpadTeams() + { + $this->text_array["OpenID-Launchpad-Teams"]; + } - public function getCollectUserData() - { - return $this->text_array["Collect-User-Data"]; - } + public function getCollectUserData() + { + return $this->text_array["Collect-User-Data"]; + } - public function getLicenseText() - { - return $this->text_array["License-Text"]; - } + public function getLicenseText() + { + return $this->text_array["License-Text"]; + } } |