Make WordPress Core


Ignore:
Timestamp:
01/18/2010 08:34:48 PM (15 years ago)
Author:
ryan
Message:

Coding standards, space after if

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/blogger.php

    r12270 r12752  
    782782        // First line of headers is the HTTP response code
    783783        $http_response_line = array_shift($response_header_lines);
    784         if(preg_match('@^HTTP/[0-9]\.[0-9] ([0-9]{3})@',$http_response_line, $matches)) { $response_code = $matches[1]; }
     784        if (preg_match('@^HTTP/[0-9]\.[0-9] ([0-9]{3})@',$http_response_line, $matches)) { $response_code = $matches[1]; }
    785785
    786786        // put the rest of the headers in an array
     
    959959        $this->depth++;
    960960
    961         if(!empty($this->in_content)) {
     961        if (!empty($this->in_content)) {
    962962            $attrs_prefix = array();
    963963
     
    967967            }
    968968            $attrs_str = join(' ', array_map( array( &$this, '_map_attrs_func' ), array_keys($attrs_prefix), array_values($attrs_prefix)));
    969             if(strlen($attrs_str) > 0) {
     969            if (strlen($attrs_str) > 0) {
    970970                $attrs_str = " " . $attrs_str;
    971971            }
    972972
    973973            $xmlns_str = join(' ', array_map( array( &$this, '_map_xmlns_func' ), array_keys($this->ns_contexts[0]), array_values($this->ns_contexts[0])));
    974             if(strlen($xmlns_str) > 0) {
     974            if (strlen($xmlns_str) > 0) {
    975975                $xmlns_str = " " . $xmlns_str;
    976976            }
    977977
    978978            // handle self-closing tags (case: a new child found right-away, no text node)
    979             if(count($this->in_content) == 2) {
     979            if (count($this->in_content) == 2) {
    980980                array_push($this->in_content, ">");
    981981            }
    982982
    983983            array_push($this->in_content, "<". $this->ns_to_prefix($name) ."{$xmlns_str}{$attrs_str}");
    984         } else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) {
     984        } else if (in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) {
    985985            $this->in_content = array();
    986986            $this->is_xhtml = $attrs['type'] == 'xhtml';
    987987            array_push($this->in_content, array($tag,$this->depth));
    988         } else if($tag == 'link') {
     988        } else if ($tag == 'link') {
    989989            array_push($this->entry->links, $attrs);
    990         } else if($tag == 'category') {
     990        } else if ($tag == 'category') {
    991991            array_push($this->entry->categories, $attrs['term']);
    992992        }
     
    999999        $tag = array_pop(split(":", $name));
    10001000
    1001         if(!empty($this->in_content)) {
    1002             if($this->in_content[0][0] == $tag &&
     1001        if (!empty($this->in_content)) {
     1002            if ($this->in_content[0][0] == $tag &&
    10031003            $this->in_content[0][1] == $this->depth) {
    10041004                array_shift($this->in_content);
    1005                 if($this->is_xhtml) {
     1005                if ($this->is_xhtml) {
    10061006                    $this->in_content = array_slice($this->in_content, 2, count($this->in_content)-3);
    10071007                }
     
    10361036    function cdata($parser, $data) {
    10371037        #print str_repeat(" ", $this->depth * $this->indent) . "data: #" . $data . "#\n";
    1038         if(!empty($this->in_content)) {
     1038        if (!empty($this->in_content)) {
    10391039            // handle self-closing tags (case: text node found, need to close element started)
    10401040            if (strpos($this->in_content[count($this->in_content)-1], '<') !== false) {
     
    10541054        $name = array_pop($components);
    10551055
    1056         if(!empty($components)) {
     1056        if (!empty($components)) {
    10571057            $ns = join(":",$components);
    1058             foreach($this->ns_contexts as $context) {
    1059                 foreach($context as $mapping) {
    1060                     if($mapping[1] == $ns && strlen($mapping[0]) > 0) {
     1058            foreach ($this->ns_contexts as $context) {
     1059                foreach ($context as $mapping) {
     1060                    if ($mapping[1] == $ns && strlen($mapping[0]) > 0) {
    10611061                        return "$mapping[0]:$name";
    10621062                    }
Note: See TracChangeset for help on using the changeset viewer.