@@ -257,8 +257,7 @@ |
||
257 | 257 | $related->boundary = $msg->getMime()->boundary(); |
258 | 258 | $related->disposition = null; |
259 | 259 | $related->charset = null; |
260 | - } |
|
261 | - else if( $this->html != null ) |
|
260 | + } else if( $this->html != null ) |
|
262 | 261 | { |
263 | 262 | $this->object->setBodyHtml( $this->html ); |
264 | 263 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | } |
71 | 71 | } |
72 | 72 | } |
73 | - catch( \Exception $e ) { ; } // Discard exceptions, return the original string instead |
|
73 | + catch( \Exception $e ) {; } // Discard exceptions, return the original string instead |
|
74 | 74 | |
75 | 75 | return (string) $string; |
76 | 76 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | } |
101 | 101 | } |
102 | - catch( \Exception $e ) { ; } // Discard exceptions, return the original string instead |
|
102 | + catch( \Exception $e ) {; } // Discard exceptions, return the original string instead |
|
103 | 103 | |
104 | 104 | if( $this->getPluralIndex( $number, $this->getLocale() ) > 0 ) { |
105 | 105 | return (string) $plural; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | { |
139 | 139 | if( !isset( $this->translations[$domain] ) ) |
140 | 140 | { |
141 | - if ( !isset( $this->translationSources[$domain] ) ) |
|
141 | + if( !isset( $this->translationSources[$domain] ) ) |
|
142 | 142 | { |
143 | 143 | $msg = sprintf( 'No translation directory for domain "%1$s" available', $domain ); |
144 | 144 | throw new \Aimeos\MW\Translation\Exception( $msg ); |
@@ -70,7 +70,9 @@ discard block |
||
70 | 70 | } |
71 | 71 | } |
72 | 72 | } |
73 | - catch( \Exception $e ) { ; } // Discard exceptions, return the original string instead |
|
73 | + catch( \Exception $e ) |
|
74 | + { |
|
75 | +; } // Discard exceptions, return the original string instead |
|
74 | 76 | |
75 | 77 | return (string) $string; |
76 | 78 | } |
@@ -99,7 +101,9 @@ discard block |
||
99 | 101 | } |
100 | 102 | } |
101 | 103 | } |
102 | - catch( \Exception $e ) { ; } // Discard exceptions, return the original string instead |
|
104 | + catch( \Exception $e ) |
|
105 | + { |
|
106 | +; } // Discard exceptions, return the original string instead |
|
103 | 107 | |
104 | 108 | if( $this->getPluralIndex( $number, $this->getLocale() ) > 0 ) { |
105 | 109 | return (string) $plural; |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | $this->logger->log( '<' . $facility . '> ' . $message, $priority ); |
55 | 55 | } |
56 | - catch( \Zend_Log_Exception $ze ) { |
|
56 | + catch( \Zend_Log_Exception $ze ) { |
|
57 | 57 | throw new \Aimeos\MW\Logger\Exception( $ze->getMessage() ); |
58 | 58 | } |
59 | 59 | } |
@@ -53,7 +53,8 @@ |
||
53 | 53 | |
54 | 54 | $this->logger->log( '<' . $facility . '> ' . $message, $priority ); |
55 | 55 | } |
56 | - catch( \Zend_Log_Exception $ze ) { |
|
56 | + catch( \Zend_Log_Exception $ze ) |
|
57 | + { |
|
57 | 58 | throw new \Aimeos\MW\Logger\Exception( $ze->getMessage() ); |
58 | 59 | } |
59 | 60 | } |
@@ -119,7 +119,7 @@ |
||
119 | 119 | { |
120 | 120 | if( $config->$key instanceof $classname ) |
121 | 121 | { |
122 | - if( count( $parts ) > 0 ) { |
|
122 | + if( count( $parts ) > 0 ) { |
|
123 | 123 | return $this->getPart( $config->$key, $parts ); |
124 | 124 | } |
125 | 125 |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | $ds = DIRECTORY_SEPARATOR; |
37 | 37 | |
38 | 38 | $this->translationSources = array( |
39 | - 'testDomain' => array( dirname(__FILE__) . $ds . 'testfiles' . $ds . 'case1' ), |
|
40 | - 'otherTestDomain' => array( dirname(__FILE__) . $ds . 'testfiles' . $ds . 'case2' ), // no file! |
|
41 | - 'thirdTestDomain' => array( dirname(__FILE__) . $ds . 'testfiles' . $ds . 'case3' ), |
|
39 | + 'testDomain' => array( dirname( __FILE__ ) . $ds . 'testfiles' . $ds . 'case1' ), |
|
40 | + 'otherTestDomain' => array( dirname( __FILE__ ) . $ds . 'testfiles' . $ds . 'case2' ), // no file! |
|
41 | + 'thirdTestDomain' => array( dirname( __FILE__ ) . $ds . 'testfiles' . $ds . 'case3' ), |
|
42 | 42 | ); |
43 | 43 | |
44 | 44 | $this->object = new \Aimeos\MW\Translation\Zend( $this->translationSources, 'csv', 'ru_ZD' ); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | // test using the testfiles/case1/ka_GE file; lang: german |
91 | 91 | public function testAdapterGettext() |
92 | 92 | { |
93 | - $object = new \Aimeos\MW\Translation\Zend( $this->translationSources, 'gettext', 'ka_GE', array('disableNotices'=>true) ); |
|
93 | + $object = new \Aimeos\MW\Translation\Zend( $this->translationSources, 'gettext', 'ka_GE', array( 'disableNotices'=>true ) ); |
|
94 | 94 | |
95 | 95 | $this->assertEquals( 'Aktualisierung', $object->dt( 'testDomain', 'Update' ) ); |
96 | 96 | |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | |
106 | 106 | $translationSources = array( |
107 | 107 | 'testDomain' => array( |
108 | - dirname(__FILE__) . $ds . 'testfiles' . $ds . 'case2', |
|
109 | - dirname(__FILE__) . $ds . 'testfiles' . $ds . 'case3', |
|
108 | + dirname( __FILE__ ) . $ds . 'testfiles' . $ds . 'case2', |
|
109 | + dirname( __FILE__ ) . $ds . 'testfiles' . $ds . 'case3', |
|
110 | 110 | ), |
111 | 111 | ); |
112 | 112 | |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | |
123 | 123 | $translationSources = array( |
124 | 124 | 'testDomain' => array( |
125 | - dirname(__FILE__) . $ds . 'testfiles' . $ds . 'case1', |
|
126 | - dirname(__FILE__) . $ds . 'testfiles' . $ds . 'case2', |
|
125 | + dirname( __FILE__ ) . $ds . 'testfiles' . $ds . 'case1', |
|
126 | + dirname( __FILE__ ) . $ds . 'testfiles' . $ds . 'case2', |
|
127 | 127 | ), |
128 | 128 | ); |
129 | 129 | |
@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | |
139 | 139 | $translationSources = array( |
140 | 140 | 'testDomain' => array( |
141 | - dirname(__FILE__) . $ds . 'testfiles' . $ds . 'case1', |
|
142 | - dirname(__FILE__) . $ds . 'testfiles' . $ds . 'case2', |
|
141 | + dirname( __FILE__ ) . $ds . 'testfiles' . $ds . 'case1', |
|
142 | + dirname( __FILE__ ) . $ds . 'testfiles' . $ds . 'case2', |
|
143 | 143 | ), |
144 | 144 | ); |
145 | 145 | |
@@ -154,8 +154,8 @@ discard block |
||
154 | 154 | |
155 | 155 | $translationSources = array( |
156 | 156 | 'testDomain' => array( |
157 | - dirname(__FILE__) . $ds . 'testfiles' . $ds . 'case1', |
|
158 | - dirname(__FILE__) . $ds . 'testfiles' . $ds . 'case2', |
|
157 | + dirname( __FILE__ ) . $ds . 'testfiles' . $ds . 'case1', |
|
158 | + dirname( __FILE__ ) . $ds . 'testfiles' . $ds . 'case2', |
|
159 | 159 | ), |
160 | 160 | ); |
161 | 161 |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | public function testNonScalarLog() |
67 | 67 | { |
68 | - $this->object->log( array ('error', 'error2', 2) ); |
|
68 | + $this->object->log( array( 'error', 'error2', 2 ) ); |
|
69 | 69 | $this->assertEquals( 'log: <message> ["error","error2",2]' . PHP_EOL, file_get_contents( 'error.log' ) ); |
70 | 70 | } |
71 | 71 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | public function testBadPriority() |
81 | 81 | { |
82 | - $this->setExpectedException('\\Aimeos\\MW\\Logger\\Exception'); |
|
82 | + $this->setExpectedException( '\\Aimeos\\MW\\Logger\\Exception' ); |
|
83 | 83 | $this->object->log( 'error', -1 ); |
84 | 84 | } |
85 | 85 | } |
@@ -53,34 +53,34 @@ discard block |
||
53 | 53 | { |
54 | 54 | $this->assertEquals( '127.0.0.1', $this->object->get( 'resource/db/host' ) ); |
55 | 55 | |
56 | - $x = $this->object->get( 'config/manager/standard/select', 'defvalue1'); |
|
56 | + $x = $this->object->get( 'config/manager/standard/select', 'defvalue1' ); |
|
57 | 57 | $this->assertEquals( 'select11', $x ); |
58 | 58 | |
59 | - $x = $this->object->get( 'config/provider/delivery/sh/select', 'defvalue2'); |
|
59 | + $x = $this->object->get( 'config/provider/delivery/sh/select', 'defvalue2' ); |
|
60 | 60 | $this->assertEquals( 'select2', $x ); |
61 | 61 | |
62 | - $x = $this->object->get( 'subconfig/standard/subitem/a/aa', 'defvalue3'); |
|
62 | + $x = $this->object->get( 'subconfig/standard/subitem/a/aa', 'defvalue3' ); |
|
63 | 63 | $this->assertEquals( '111', $x ); |
64 | 64 | |
65 | - $x = $this->object->get( 'subconfig/subsubconfig/standard/subsubitem/aa/aaa', 'defvalue4'); |
|
65 | + $x = $this->object->get( 'subconfig/subsubconfig/standard/subsubitem/aa/aaa', 'defvalue4' ); |
|
66 | 66 | $this->assertEquals( '111', $x ); |
67 | 67 | |
68 | - $x = $this->object->get( 'config/manager/standard/select', 'defvalue5'); |
|
68 | + $x = $this->object->get( 'config/manager/standard/select', 'defvalue5' ); |
|
69 | 69 | $this->assertEquals( 'select11', $x ); |
70 | 70 | |
71 | - $x = $this->object->get( 'subconfig/subsubconfig/standard/subsubitem/aa/aaa', 'defvalue6'); |
|
71 | + $x = $this->object->get( 'subconfig/subsubconfig/standard/subsubitem/aa/aaa', 'defvalue6' ); |
|
72 | 72 | $this->assertEquals( '111', $x ); |
73 | 73 | |
74 | - $x = $this->object->get( 'subconfig/standard/subitem/a/aa', 'defvalue7'); |
|
74 | + $x = $this->object->get( 'subconfig/standard/subitem/a/aa', 'defvalue7' ); |
|
75 | 75 | $this->assertEquals( '111', $x ); |
76 | 76 | |
77 | - $x = $this->object->get( 'subconfig/standard/subitem/a/bb', 'defvalue8'); |
|
77 | + $x = $this->object->get( 'subconfig/standard/subitem/a/bb', 'defvalue8' ); |
|
78 | 78 | $this->assertEquals( 'defvalue8', $x ); |
79 | 79 | |
80 | - $x = $this->object->get( 'nonsubconfig', 'defvalue9'); |
|
80 | + $x = $this->object->get( 'nonsubconfig', 'defvalue9' ); |
|
81 | 81 | $this->assertEquals( 'defvalue9', $x ); |
82 | 82 | |
83 | - $x = $this->object->get( 'subconfig', 'defvalue10'); |
|
83 | + $x = $this->object->get( 'subconfig', 'defvalue10' ); |
|
84 | 84 | $this->assertInternalType( 'array', $x ); |
85 | 85 | } |
86 | 86 | |
@@ -91,13 +91,13 @@ discard block |
||
91 | 91 | |
92 | 92 | $this->assertEquals( |
93 | 93 | array( |
94 | - 'subitem' => array ( |
|
94 | + 'subitem' => array( |
|
95 | 95 | 'a' => array( |
96 | 96 | 'aa' => '111', |
97 | 97 | ), |
98 | 98 | ), |
99 | 99 | 'subbla' => array( |
100 | - 'b' => array ( |
|
100 | + 'b' => array( |
|
101 | 101 | 'bb' => '22', |
102 | 102 | ), |
103 | 103 | ), |
@@ -12,7 +12,7 @@ |
||
12 | 12 | error_reporting( -1 ); |
13 | 13 | ini_set( 'display_errors', '1' ); |
14 | 14 | |
15 | -date_default_timezone_set('UTC'); |
|
15 | +date_default_timezone_set( 'UTC' ); |
|
16 | 16 | |
17 | 17 | |
18 | 18 | /* |