Skip to content

Commit 0fe40d5

Browse files
committed
whitespaces
1 parent be8b7f9 commit 0fe40d5

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

pear/PEAR/Packager.php

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function PEAR_Packager($phpdir = PEAR_INSTALL_DIR,
9393
// {{{ destructor
9494

9595
function _PEAR_Packager() {
96-
$this->_PEAR();
96+
$this->_PEAR();
9797
while (is_array($this->_tempfiles) &&
9898
$file = array_shift($this->_tempfiles))
9999
{
@@ -117,19 +117,19 @@ function package($pkgfile = "package.xml")
117117
return $this->raiseError($php_errormsg);
118118
}
119119

120-
$xp = xml_parser_create();
121-
if (!$xp) {
122-
return $this->raiseError("Unable to create XML parser.");
123-
}
124-
xml_set_object($xp, $this);
125-
xml_set_element_handler($xp, "startHandler", "endHandler");
126-
xml_set_character_data_handler($xp, "charHandler");
127-
xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, false);
128-
xml_parser_set_option($xp, XML_OPTION_TARGET_ENCODING, "UTF-8");
129-
130-
$this->element_stack = array();
131-
$this->pkginfo = array();
132-
$this->current_element = false;
120+
$xp = xml_parser_create();
121+
if (!$xp) {
122+
return $this->raiseError("Unable to create XML parser.");
123+
}
124+
xml_set_object($xp, $this);
125+
xml_set_element_handler($xp, "startHandler", "endHandler");
126+
xml_set_character_data_handler($xp, "charHandler");
127+
xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, false);
128+
xml_parser_set_option($xp, XML_OPTION_TARGET_ENCODING, "UTF-8");
129+
130+
$this->element_stack = array();
131+
$this->pkginfo = array();
132+
$this->current_element = false;
133133

134134
$data = fread($fp, filesize($pkgfile));
135135
fclose($fp);
@@ -139,8 +139,8 @@ function package($pkgfile = "package.xml")
139139
xml_get_current_line_number($xp));
140140
xml_parser_free($xp);
141141
return $this->raiseError($msg);
142-
}
143-
xml_parser_free($xp);
142+
}
143+
xml_parser_free($xp);
144144

145145
$pkginfofile = $this->tmpdir . DIRECTORY_SEPARATOR . "package.xml";
146146
$fp = fopen($pkginfofile, "w");
@@ -214,9 +214,9 @@ function log($level, $msg)
214214

215215
function startHandler($xp, $name, $attribs)
216216
{
217-
array_push($this->element_stack, $name);
218-
$this->current_element = $name;
219-
$this->current_attributes = $attribs;
217+
array_push($this->element_stack, $name);
218+
$this->current_element = $name;
219+
$this->current_attributes = $attribs;
220220
$this->tmpdata = '';
221221
if ($this->recordfilelist) {
222222
$this->filelist .= "<$name";
@@ -225,12 +225,12 @@ function startHandler($xp, $name, $attribs)
225225
}
226226
$this->filelist .= ">";
227227
}
228-
switch ($name) {
229-
case "Package":
228+
switch ($name) {
229+
case "Package":
230230
if ($attribs["Type"]) {
231231
// warning
232232
}
233-
break;
233+
break;
234234
case "FileList":
235235
// XXX FIXME Windows
236236
$this->recordfilelist = true;
@@ -252,16 +252,16 @@ function startHandler($xp, $name, $attribs)
252252
}
253253
$this->_tempfiles[] = $this->tmpdir;
254254
break;
255-
}
255+
}
256256
}
257257

258258
// }}}
259259
// {{{ endHandler()
260260

261261
function endHandler($xp, $name)
262262
{
263-
array_pop($this->element_stack);
264-
$this->current_element = $this->element_stack[sizeof($this->element_stack)-1];
263+
array_pop($this->element_stack);
264+
$this->current_element = $this->element_stack[sizeof($this->element_stack)-1];
265265
switch ($name) {
266266
case "FileList":
267267
$this->recordfilelist = false;
@@ -280,10 +280,10 @@ function charHandler($xp, $data)
280280
if ($this->recordfilelist) {
281281
$this->filelist .= $data;
282282
}
283-
switch ($this->current_element) {
284-
case "Dir":
285-
break;
286-
case "File":
283+
switch ($this->current_element) {
284+
case "Dir":
285+
break;
286+
case "File":
287287
$file = "$this->tmpdir/$data";
288288
$dir = dirname($file);
289289
if (!is_dir($dir)) {
@@ -303,7 +303,7 @@ function charHandler($xp, $data)
303303
$this->pkginfo[$id] = $data;
304304
}
305305
break;
306-
}
306+
}
307307
}
308308

309309
// }}}

0 commit comments

Comments
 (0)