@@ -29,7 +29,9 @@ |
||
29 | 29 | public static function noSpace( $xml = null ) |
30 | 30 | { |
31 | 31 | |
32 | - if ( empty( $xml ) || is_null( $xml ) ) return false; |
|
32 | + if ( empty( $xml ) || is_null( $xml ) ) { |
|
33 | + return false; |
|
34 | + } |
|
33 | 35 | |
34 | 36 | foreach ( $xml as $key => $value ) { |
35 | 37 | if ( sizeof( $value ) > 1 ) { |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | function loader($class) |
3 | 3 | { |
4 | - $file = $class . '.php'; |
|
5 | - if (file_exists($file)) { |
|
6 | - require $file; |
|
7 | - } |
|
4 | + $file = $class . '.php'; |
|
5 | + if (file_exists($file)) { |
|
6 | + require $file; |
|
7 | + } |
|
8 | 8 | } |
9 | 9 | spl_autoload_register('loader'); |
@@ -3,11 +3,11 @@ |
||
3 | 3 | class NoSpaceTest extends PHPUnit_Framework_TestCase |
4 | 4 | { |
5 | 5 | |
6 | - public function testNoXMLSpace() { |
|
7 | - $xml = simplexml_load_file( 'xml_file.xml' ); |
|
8 | - $xml = NoXMLSpace::noSpace($xml); |
|
6 | + public function testNoXMLSpace() { |
|
7 | + $xml = simplexml_load_file( 'xml_file.xml' ); |
|
8 | + $xml = NoXMLSpace::noSpace($xml); |
|
9 | 9 | |
10 | - $this->assertEquals('Hello World', $xml->message); |
|
11 | - } |
|
10 | + $this->assertEquals('Hello World', $xml->message); |
|
11 | + } |
|
12 | 12 | |
13 | 13 | } |