@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function __construct( $resourcepath, $format, array $options = [] ) |
40 | 40 | { |
41 | - $this->classname = '\\Aimeos\\MW\\Container\\Content\\' . $format; |
|
41 | + $this->classname = '\\Aimeos\\MW\\Container\\Content\\'.$format; |
|
42 | 42 | |
43 | 43 | if( class_exists( $this->classname ) === false ) { |
44 | 44 | throw new \Aimeos\MW\Container\Exception( sprintf( 'Unknown format "%1$s"', $format ) ); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | public function create( $name ) |
66 | 66 | { |
67 | - $resource = $this->resource->getPath() . DIRECTORY_SEPARATOR . $name; |
|
67 | + $resource = $this->resource->getPath().DIRECTORY_SEPARATOR.$name; |
|
68 | 68 | return new $this->classname( $resource, $name, $this->getOptions() ); |
69 | 69 | } |
70 | 70 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function get( $name ) |
90 | 90 | { |
91 | - return new $this->classname( $this->resource->getPath() . DIRECTORY_SEPARATOR . $name, $name, $this->getOptions() ); |
|
91 | + return new $this->classname( $this->resource->getPath().DIRECTORY_SEPARATOR.$name, $name, $this->getOptions() ); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | public function getMarkerNames() |
118 | 118 | { |
119 | 119 | $matches = []; |
120 | - $regex = '/' . str_replace( '\$', '(.*)', preg_quote( $this->begin, '/' ) ) . '/U'; |
|
120 | + $regex = '/'.str_replace( '\$', '(.*)', preg_quote( $this->begin, '/' ) ).'/U'; |
|
121 | 121 | |
122 | 122 | if( preg_match_all( $regex, $this->text, $matches ) === false ) { |
123 | 123 | throw new \Aimeos\MW\Template\Exception( sprintf( 'Invalid regular expression: %1$s', $regex ) ); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $matches = []; |
187 | 187 | $text = $this->text; |
188 | 188 | |
189 | - $regex = '/' . str_replace( '\$', '(.*)', preg_quote( $this->begin, '/' ) ) . '/U'; |
|
189 | + $regex = '/'.str_replace( '\$', '(.*)', preg_quote( $this->begin, '/' ) ).'/U'; |
|
190 | 190 | if( preg_match_all( $regex, $text, $matches ) === false ) { |
191 | 191 | throw new \Aimeos\MW\Template\Exception( sprintf( 'Invalid regular expression: %1$s', $regex ) ); |
192 | 192 | } |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $begin = str_replace( '\$', $match, preg_quote( $this->begin, '/' ) ); |
198 | 198 | $end = str_replace( '\$', $match, preg_quote( $this->end, '/' ) ); |
199 | 199 | |
200 | - $regex = '/' . $begin . '.*' . $end . '/smU'; |
|
200 | + $regex = '/'.$begin.'.*'.$end.'/smU'; |
|
201 | 201 | if( ( $text = preg_replace( $regex, '', $text ) ) === null ) { |
202 | 202 | throw new \Aimeos\MW\Template\Exception( sprintf( 'Invalid regular expression: %1$s', $regex ) ); |
203 | 203 | } |
@@ -52,13 +52,13 @@ |
||
52 | 52 | */ |
53 | 53 | public function transform( $target = null, $controller = null, $action = null, array $params = [], array $trailing = [], array $config = [] ) |
54 | 54 | { |
55 | - $path = ( $target !== null ? $target . '/' : '' ); |
|
56 | - $path .= ( $controller !== null ? $controller . '/' : '' ); |
|
57 | - $path .= ( $action !== null ? $action . '/' : '' ); |
|
55 | + $path = ( $target !== null ? $target.'/' : '' ); |
|
56 | + $path .= ( $controller !== null ? $controller.'/' : '' ); |
|
57 | + $path .= ( $action !== null ? $action.'/' : '' ); |
|
58 | 58 | |
59 | - $parameter = ( count( $params ) > 0 ? '?' . http_build_query( $this->sanitize( $params ) ) : '' ); |
|
59 | + $parameter = ( count( $params ) > 0 ? '?'.http_build_query( $this->sanitize( $params ) ) : '' ); |
|
60 | 60 | $pretty = ( count( $trailing ) > 0 ? implode( '-', $this->sanitize( $trailing ) ) : '' ); |
61 | 61 | |
62 | - return $this->baseUrl . '/' . $path . $pretty . $parameter; |
|
62 | + return $this->baseUrl.'/'.$path.$pretty.$parameter; |
|
63 | 63 | } |
64 | 64 | } |
65 | 65 | \ No newline at end of file |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * @param array $parts Configuration path parts to look for inside the array |
87 | 87 | * @return mixed Found value or null if no value is available |
88 | 88 | */ |
89 | - protected function getPart( $config, $parts ) |
|
89 | + protected function getPart( $config, $parts ) |
|
90 | 90 | { |
91 | 91 | if( ( $current = array_shift( $parts ) ) !== null && isset( $config[$current] ) ) |
92 | 92 | { |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | { |
138 | 138 | if( ( $key = array_shift( $parts ) ) !== null ) |
139 | 139 | { |
140 | - $newPath = $path . DIRECTORY_SEPARATOR . $key; |
|
140 | + $newPath = $path.DIRECTORY_SEPARATOR.$key; |
|
141 | 141 | |
142 | 142 | if( is_dir( $newPath ) ) |
143 | 143 | { |
@@ -148,13 +148,13 @@ discard block |
||
148 | 148 | $config[$key] = $this->load( $config[$key], $newPath, $parts ); |
149 | 149 | } |
150 | 150 | |
151 | - if( file_exists( $newPath . '.php' ) ) |
|
151 | + if( file_exists( $newPath.'.php' ) ) |
|
152 | 152 | { |
153 | 153 | if( !isset( $config[$key] ) ) { |
154 | 154 | $config[$key] = []; |
155 | 155 | } |
156 | 156 | |
157 | - $config[$key] = array_replace_recursive( $config[$key], $this->includeFile( $newPath . '.php' ) ); |
|
157 | + $config[$key] = array_replace_recursive( $config[$key], $this->includeFile( $newPath.'.php' ) ); |
|
158 | 158 | } |
159 | 159 | } |
160 | 160 |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | public function testConstruct() |
15 | 15 | { |
16 | 16 | $ds = DIRECTORY_SEPARATOR; |
17 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'application.txt' ); |
|
17 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'application.txt' ); |
|
18 | 18 | |
19 | 19 | $media = new \Aimeos\MW\Media\Application\Standard( $content, 'application/octet-stream', [] ); |
20 | 20 | |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public function testSave() |
26 | 26 | { |
27 | 27 | $ds = DIRECTORY_SEPARATOR; |
28 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'application.txt' ); |
|
28 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'application.txt' ); |
|
29 | 29 | |
30 | 30 | $media = new \Aimeos\MW\Media\Application\Standard( $content, 'application/octet-stream', [] ); |
31 | 31 | |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | public function testSaveFile() |
37 | 37 | { |
38 | 38 | $ds = DIRECTORY_SEPARATOR; |
39 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'application.txt' ); |
|
40 | - $dest = dirname( dirname( dirname( __DIR__ ) ) ) . $ds . 'tmp' . $ds . 'application.txt'; |
|
39 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'application.txt' ); |
|
40 | + $dest = dirname( dirname( dirname( __DIR__ ) ) ).$ds.'tmp'.$ds.'application.txt'; |
|
41 | 41 | |
42 | 42 | $media = new \Aimeos\MW\Media\Application\Standard( $content, 'application/octet-stream', [] ); |
43 | 43 | $media->save( $dest ); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | public function testConstructGif() |
16 | 16 | { |
17 | 17 | $ds = DIRECTORY_SEPARATOR; |
18 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.gif' ); |
|
18 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.gif' ); |
|
19 | 19 | |
20 | 20 | $media = new \Aimeos\MW\Media\Image\Standard( $content, 'image/gif', [] ); |
21 | 21 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public function testConstructJpeg() |
27 | 27 | { |
28 | 28 | $ds = DIRECTORY_SEPARATOR; |
29 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.jpg' ); |
|
29 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.jpg' ); |
|
30 | 30 | |
31 | 31 | $media = new \Aimeos\MW\Media\Image\Standard( $content, 'image/jpeg', [] ); |
32 | 32 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public function testConstructPng() |
38 | 38 | { |
39 | 39 | $ds = DIRECTORY_SEPARATOR; |
40 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
40 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
41 | 41 | |
42 | 42 | $media = new \Aimeos\MW\Media\Image\Standard( $content, 'image/png', [] ); |
43 | 43 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | public function testConstructImageException() |
49 | 49 | { |
50 | 50 | $ds = DIRECTORY_SEPARATOR; |
51 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'application.txt' ); |
|
51 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'application.txt' ); |
|
52 | 52 | |
53 | 53 | $this->setExpectedException( '\\Aimeos\\MW\\Media\\Exception' ); |
54 | 54 | new \Aimeos\MW\Media\Image\Standard( $content, 'text/plain', [] ); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | public function testDestruct() |
59 | 59 | { |
60 | 60 | $ds = DIRECTORY_SEPARATOR; |
61 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
61 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
62 | 62 | |
63 | 63 | $media = new \Aimeos\MW\Media\Image\Standard( $content, 'image/png', [] ); |
64 | 64 | |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | public function testSaveGif() |
70 | 70 | { |
71 | 71 | $ds = DIRECTORY_SEPARATOR; |
72 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
73 | - $dest = dirname( dirname( dirname( __DIR__ ) ) ) . $ds . 'tmp' . $ds . 'media.gif'; |
|
72 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
73 | + $dest = dirname( dirname( dirname( __DIR__ ) ) ).$ds.'tmp'.$ds.'media.gif'; |
|
74 | 74 | |
75 | 75 | $media = new \Aimeos\MW\Media\Image\Standard( $content, 'image/png', [] ); |
76 | 76 | $media->save( $dest, 'image/gif' ); |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | public function testSaveGifInvalidDest() |
84 | 84 | { |
85 | 85 | $ds = DIRECTORY_SEPARATOR; |
86 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
87 | - $dest = __DIR__ . $ds . 'notexisting' . $ds . 'media.gif'; |
|
86 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
87 | + $dest = __DIR__.$ds.'notexisting'.$ds.'media.gif'; |
|
88 | 88 | |
89 | 89 | $media = new \Aimeos\MW\Media\Image\Standard( $content, 'image/png', [] ); |
90 | 90 | |
@@ -96,8 +96,8 @@ discard block |
||
96 | 96 | public function testSaveJpeg() |
97 | 97 | { |
98 | 98 | $ds = DIRECTORY_SEPARATOR; |
99 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
100 | - $dest = dirname( dirname( dirname( __DIR__ ) ) ) . $ds . 'tmp' . $ds . 'media.jpg'; |
|
99 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
100 | + $dest = dirname( dirname( dirname( __DIR__ ) ) ).$ds.'tmp'.$ds.'media.jpg'; |
|
101 | 101 | |
102 | 102 | $media = new \Aimeos\MW\Media\Image\Standard( $content, 'image/gif', [] ); |
103 | 103 | $media->save( $dest, 'image/jpeg' ); |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | public function testSaveJpegInvalidDest() |
111 | 111 | { |
112 | 112 | $ds = DIRECTORY_SEPARATOR; |
113 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
114 | - $dest = __DIR__ . $ds . 'notexisting' . $ds . 'media.jpg'; |
|
113 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
114 | + $dest = __DIR__.$ds.'notexisting'.$ds.'media.jpg'; |
|
115 | 115 | |
116 | 116 | $media = new \Aimeos\MW\Media\Image\Standard( $content, 'image/png', [] ); |
117 | 117 | |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | public function testSavePng() |
124 | 124 | { |
125 | 125 | $ds = DIRECTORY_SEPARATOR; |
126 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.gif' ); |
|
127 | - $dest = dirname( dirname( dirname( __DIR__ ) ) ) . $ds . 'tmp' . $ds . 'media.png'; |
|
126 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.gif' ); |
|
127 | + $dest = dirname( dirname( dirname( __DIR__ ) ) ).$ds.'tmp'.$ds.'media.png'; |
|
128 | 128 | |
129 | 129 | $media = new \Aimeos\MW\Media\Image\Standard( $content, 'image/gif', [] ); |
130 | 130 | $media->save( $dest, 'image/png' ); |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | public function testSavePngInvalidDest() |
138 | 138 | { |
139 | 139 | $ds = DIRECTORY_SEPARATOR; |
140 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.gif' ); |
|
141 | - $dest = __DIR__ . $ds . 'notexisting' . $ds . 'media.png'; |
|
140 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.gif' ); |
|
141 | + $dest = __DIR__.$ds.'notexisting'.$ds.'media.png'; |
|
142 | 142 | |
143 | 143 | $media = new \Aimeos\MW\Media\Image\Standard( $content, 'image/gif', [] ); |
144 | 144 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | public function testScale() |
151 | 151 | { |
152 | 152 | $ds = DIRECTORY_SEPARATOR; |
153 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
153 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
154 | 154 | |
155 | 155 | $media = new \Aimeos\MW\Media\Image\Standard( $content, 'image/png', [] ); |
156 | 156 | $info = getimagesizefromstring( $media->scale( 100, 100, false )->save( null, 'image/png' ) ); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | public function testScaleFit() |
164 | 164 | { |
165 | 165 | $ds = DIRECTORY_SEPARATOR; |
166 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
166 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
167 | 167 | |
168 | 168 | $media = new \Aimeos\MW\Media\Image\Standard( $content, 'image/png', [] ); |
169 | 169 | $info = getimagesizefromstring( $media->scale( 5, 100 )->save( null, 'image/png' ) ); |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | public function testScaleFitInside() |
177 | 177 | { |
178 | 178 | $ds = DIRECTORY_SEPARATOR; |
179 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
179 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
180 | 180 | |
181 | 181 | $media = new \Aimeos\MW\Media\Image\Standard( $content, 'image/png', [] ); |
182 | 182 | $info = getimagesizefromstring( $media->scale( 100, 100 )->save( null, 'image/png' ) ); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | public function testConstructGif() |
23 | 23 | { |
24 | 24 | $ds = DIRECTORY_SEPARATOR; |
25 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.gif' ); |
|
25 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.gif' ); |
|
26 | 26 | |
27 | 27 | $media = new \Aimeos\MW\Media\Image\Imagick( $content, 'image/gif', [] ); |
28 | 28 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | public function testConstructJpeg() |
34 | 34 | { |
35 | 35 | $ds = DIRECTORY_SEPARATOR; |
36 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.jpg' ); |
|
36 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.jpg' ); |
|
37 | 37 | |
38 | 38 | $media = new \Aimeos\MW\Media\Image\Imagick( $content, 'image/jpeg', [] ); |
39 | 39 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | public function testConstructPng() |
45 | 45 | { |
46 | 46 | $ds = DIRECTORY_SEPARATOR; |
47 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
47 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
48 | 48 | |
49 | 49 | $media = new \Aimeos\MW\Media\Image\Imagick( $content, 'image/png', [] ); |
50 | 50 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | public function testConstructImageException() |
56 | 56 | { |
57 | 57 | $ds = DIRECTORY_SEPARATOR; |
58 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'application.txt' ); |
|
58 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'application.txt' ); |
|
59 | 59 | |
60 | 60 | $this->setExpectedException( '\\Aimeos\\MW\\Media\\Exception' ); |
61 | 61 | new \Aimeos\MW\Media\Image\Imagick( $content, 'text/plain', [] ); |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | public function testSaveGif() |
66 | 66 | { |
67 | 67 | $ds = DIRECTORY_SEPARATOR; |
68 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
69 | - $dest = dirname( dirname( dirname( __DIR__ ) ) ) . $ds . 'tmp' . $ds . 'media.gif'; |
|
68 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
69 | + $dest = dirname( dirname( dirname( __DIR__ ) ) ).$ds.'tmp'.$ds.'media.gif'; |
|
70 | 70 | |
71 | 71 | $media = new \Aimeos\MW\Media\Image\Imagick( $content, 'image/png', [] ); |
72 | 72 | $media->save( $dest, 'image/gif' ); |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | public function testSaveGifInvalidDest() |
80 | 80 | { |
81 | 81 | $ds = DIRECTORY_SEPARATOR; |
82 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
83 | - $dest = __DIR__ . $ds . 'notexisting' . $ds . 'media.gif'; |
|
82 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
83 | + $dest = __DIR__.$ds.'notexisting'.$ds.'media.gif'; |
|
84 | 84 | |
85 | 85 | $media = new \Aimeos\MW\Media\Image\Imagick( $content, 'image/png', [] ); |
86 | 86 | |
@@ -92,8 +92,8 @@ discard block |
||
92 | 92 | public function testSaveJpeg() |
93 | 93 | { |
94 | 94 | $ds = DIRECTORY_SEPARATOR; |
95 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
96 | - $dest = dirname( dirname( dirname( __DIR__ ) ) ) . $ds . 'tmp' . $ds . 'media.jpg'; |
|
95 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
96 | + $dest = dirname( dirname( dirname( __DIR__ ) ) ).$ds.'tmp'.$ds.'media.jpg'; |
|
97 | 97 | |
98 | 98 | $media = new \Aimeos\MW\Media\Image\Imagick( $content, 'image/gif', [] ); |
99 | 99 | $media->save( $dest, 'image/jpeg' ); |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | public function testSaveJpegInvalidDest() |
107 | 107 | { |
108 | 108 | $ds = DIRECTORY_SEPARATOR; |
109 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
110 | - $dest = __DIR__ . $ds . 'notexisting' . $ds . 'media.jpg'; |
|
109 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
110 | + $dest = __DIR__.$ds.'notexisting'.$ds.'media.jpg'; |
|
111 | 111 | |
112 | 112 | $media = new \Aimeos\MW\Media\Image\Imagick( $content, 'image/png', [] ); |
113 | 113 | |
@@ -119,8 +119,8 @@ discard block |
||
119 | 119 | public function testSavePng() |
120 | 120 | { |
121 | 121 | $ds = DIRECTORY_SEPARATOR; |
122 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.gif' ); |
|
123 | - $dest = dirname( dirname( dirname( __DIR__ ) ) ) . $ds . 'tmp' . $ds . 'media.png'; |
|
122 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.gif' ); |
|
123 | + $dest = dirname( dirname( dirname( __DIR__ ) ) ).$ds.'tmp'.$ds.'media.png'; |
|
124 | 124 | |
125 | 125 | $media = new \Aimeos\MW\Media\Image\Imagick( $content, 'image/gif', [] ); |
126 | 126 | $media->save( $dest, 'image/png' ); |
@@ -133,8 +133,8 @@ discard block |
||
133 | 133 | public function testSavePngInvalidDest() |
134 | 134 | { |
135 | 135 | $ds = DIRECTORY_SEPARATOR; |
136 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.gif' ); |
|
137 | - $dest = __DIR__ . $ds . 'notexisting' . $ds . 'media.png'; |
|
136 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.gif' ); |
|
137 | + $dest = __DIR__.$ds.'notexisting'.$ds.'media.png'; |
|
138 | 138 | |
139 | 139 | $media = new \Aimeos\MW\Media\Image\Imagick( $content, 'image/gif', [] ); |
140 | 140 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | public function testScale() |
147 | 147 | { |
148 | 148 | $ds = DIRECTORY_SEPARATOR; |
149 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
149 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
150 | 150 | |
151 | 151 | $media = new \Aimeos\MW\Media\Image\Imagick( $content, 'image/png', [] ); |
152 | 152 | $info = getimagesizefromstring( $media->scale( 100, 100, false )->save( null, 'image/png' ) ); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | public function testScaleFit() |
160 | 160 | { |
161 | 161 | $ds = DIRECTORY_SEPARATOR; |
162 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
162 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
163 | 163 | |
164 | 164 | $media = new \Aimeos\MW\Media\Image\Imagick( $content, 'image/png', [] ); |
165 | 165 | $info = getimagesizefromstring( $media->scale( 5, 100 )->save( null, 'image/png' ) ); |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | public function testScaleFitInside() |
173 | 173 | { |
174 | 174 | $ds = DIRECTORY_SEPARATOR; |
175 | - $content = file_get_contents( dirname( __DIR__ ) . $ds . '_testfiles' . $ds . 'image.png' ); |
|
175 | + $content = file_get_contents( dirname( __DIR__ ).$ds.'_testfiles'.$ds.'image.png' ); |
|
176 | 176 | |
177 | 177 | $media = new \Aimeos\MW\Media\Image\Imagick( $content, 'image/png', [] ); |
178 | 178 | $info = getimagesizefromstring( $media->scale( 100, 100 )->save( null, 'image/png' ) ); |
@@ -179,14 +179,14 @@ discard block |
||
179 | 179 | public function testConstructorNoDatabaseManager() |
180 | 180 | { |
181 | 181 | $this->setExpectedException( '\\Aimeos\\MW\\Tree\\Exception' ); |
182 | - new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, null); |
|
182 | + new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, null ); |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | |
186 | 186 | public function testConstructorNoConfig() |
187 | 187 | { |
188 | 188 | $this->setExpectedException( '\\Aimeos\\MW\\Tree\\Exception' ); |
189 | - new \Aimeos\MW\Tree\Manager\DBNestedSet([], self::$dbm); |
|
189 | + new \Aimeos\MW\Tree\Manager\DBNestedSet( [], self::$dbm ); |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | unset( $this->config['sql'] ); |
196 | 196 | |
197 | 197 | $this->setExpectedException( '\\Aimeos\\MW\\Tree\\Exception' ); |
198 | - new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm); |
|
198 | + new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm ); |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | unset( $this->config['sql']['newid'] ); |
205 | 205 | |
206 | 206 | $this->setExpectedException( '\\Aimeos\\MW\\Tree\\Exception' ); |
207 | - new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm); |
|
207 | + new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm ); |
|
208 | 208 | } |
209 | 209 | |
210 | 210 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | unset( $this->config['search']['id'] ); |
214 | 214 | |
215 | 215 | $this->setExpectedException( '\\Aimeos\\MW\\Tree\\Exception' ); |
216 | - new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm); |
|
216 | + new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm ); |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | |
261 | 261 | |
262 | 262 | if( ( $node = reset( $nodes ) ) === false ) { |
263 | - throw new \RuntimeException('No node found'); |
|
263 | + throw new \RuntimeException( 'No node found' ); |
|
264 | 264 | } |
265 | 265 | |
266 | 266 | $search->setConditions( $search->compare( '==', 'tree.level', 3 ) ); |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | |
285 | 285 | $this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' ); |
286 | 286 | |
287 | - $manager = new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm); |
|
287 | + $manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm ); |
|
288 | 288 | $manager->searchNodes( $manager->createSearch() ); |
289 | 289 | } |
290 | 290 | |
@@ -321,8 +321,8 @@ discard block |
||
321 | 321 | $this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' ); |
322 | 322 | |
323 | 323 | $manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm ); |
324 | - $root = $manager->getNode( null, \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE ); |
|
325 | - $manager->deleteNode($root->getId()); |
|
324 | + $root = $manager->getNode( null, \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE ); |
|
325 | + $manager->deleteNode( $root->getId() ); |
|
326 | 326 | } |
327 | 327 | |
328 | 328 | |
@@ -392,10 +392,10 @@ discard block |
||
392 | 392 | |
393 | 393 | public function testGetLevelFromConstantException() |
394 | 394 | { |
395 | - $manager = new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm); |
|
395 | + $manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm ); |
|
396 | 396 | |
397 | - $this->setExpectedException('\\Aimeos\\MW\\Tree\\Exception'); |
|
398 | - $manager->getNode( null, 0); |
|
397 | + $this->setExpectedException( '\\Aimeos\\MW\\Tree\\Exception' ); |
|
398 | + $manager->getNode( null, 0 ); |
|
399 | 399 | } |
400 | 400 | |
401 | 401 | |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | |
433 | 433 | public function testInsertNodeException() |
434 | 434 | { |
435 | - $manager = new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm); |
|
435 | + $manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm ); |
|
436 | 436 | $newNode = $manager->createNode(); |
437 | 437 | |
438 | 438 | $this->setExpectedException( '\\Aimeos\\MW\\Tree\\Exception' ); |
@@ -1002,7 +1002,7 @@ discard block |
||
1002 | 1002 | '; |
1003 | 1003 | |
1004 | 1004 | |
1005 | - $manager = new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm); |
|
1005 | + $manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm ); |
|
1006 | 1006 | |
1007 | 1007 | $root = $manager->getNode( null, \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE ); |
1008 | 1008 | |
@@ -1034,7 +1034,7 @@ discard block |
||
1034 | 1034 | $node = $manager->createNode(); |
1035 | 1035 | |
1036 | 1036 | $this->setExpectedException( '\\Aimeos\\MW\\Tree\\Exception' ); |
1037 | - $manager->saveNode($node); |
|
1037 | + $manager->saveNode( $node ); |
|
1038 | 1038 | } |
1039 | 1039 | |
1040 | 1040 | |
@@ -1044,7 +1044,7 @@ discard block |
||
1044 | 1044 | UPDATE "mw_tree_test" SET label123 = ?, status = ? WHERE id = ? |
1045 | 1045 | '; |
1046 | 1046 | |
1047 | - $manager = new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm); |
|
1047 | + $manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm ); |
|
1048 | 1048 | $root = $manager->getNode( null, \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE ); |
1049 | 1049 | |
1050 | 1050 | $root->setLabel( 'rooot' ); |
@@ -1060,7 +1060,7 @@ discard block |
||
1060 | 1060 | $method = $class->getMethod( 'setReadOnly' ); |
1061 | 1061 | $method->setAccessible( true ); |
1062 | 1062 | |
1063 | - $manager = new \Aimeos\MW\Tree\Manager\DBNestedSet($this->config, self::$dbm); |
|
1063 | + $manager = new \Aimeos\MW\Tree\Manager\DBNestedSet( $this->config, self::$dbm ); |
|
1064 | 1064 | |
1065 | 1065 | $method->invokeArgs( $manager, [] ); |
1066 | 1066 |
@@ -16,14 +16,14 @@ |
||
16 | 16 | { |
17 | 17 | $dbm = \Aimeos\MW\DB\Factory::createManager( \TestHelperMw::getConfig() ); |
18 | 18 | |
19 | - $this->setExpectedException('\Aimeos\MW\Tree\Exception'); |
|
19 | + $this->setExpectedException( '\Aimeos\MW\Tree\Exception' ); |
|
20 | 20 | \Aimeos\MW\Tree\Factory::createManager( 'DBNestedSet', [], $dbm ); |
21 | 21 | } |
22 | 22 | |
23 | 23 | |
24 | 24 | public function testFactoryFail() |
25 | 25 | { |
26 | - $this->setExpectedException('\Aimeos\MW\Tree\Exception'); |
|
26 | + $this->setExpectedException( '\Aimeos\MW\Tree\Exception' ); |
|
27 | 27 | \Aimeos\MW\Tree\Factory::createManager( 'invalid', [], null ); |
28 | 28 | } |
29 | 29 | } |