Skip to content

Commit e731d6d

Browse files
Style fixes.
1 parent f58b8cf commit e731d6d

2 files changed

Lines changed: 23 additions & 23 deletions

File tree

src/class-tiny-settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ protected static function get_intermediate_size( $size ) {
221221

222222
/* Note: dimensions might be 0 to indicate no limit. */
223223
if ( $width || $height ) {
224-
return array( $width, $height );
224+
return array( $width, $height );
225225
}
226226

227227
if ( isset( $_wp_additional_image_sizes[ $size ] ) ) {

test/unit/TinySettingsTest.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -80,28 +80,28 @@ public function test_should_retrieve_sizes_with_settings() {
8080
}
8181

8282
public function test_should_not_retrieve_sizes_with_zero_width_and_height_values() {
83-
$this->wp->addOption( 'tinypng_sizes[0]', 'on' );
84-
$this->wp->addOption( 'tinypng_sizes[medium]', 'on' );
85-
$this->wp->addOption( 'tinypng_sizes[post-thumbnail]', 'on' );
86-
$this->wp->addOption( 'tinypng_sizes[zero-width]', 'off' );
87-
$this->wp->addOption( 'tinypng_sizes[zero-height]', 'off' );
88-
$this->wp->addOption( 'tinypng_sizes[zero-width-height]', 'off' );
89-
90-
$this->wp->addImageSize( 'zero-width', array( 'width' => 0, 'height' => 510 ) );
91-
$this->wp->addImageSize( 'zero-height', array( 'width' => 825, 'height' => 0 ) );
92-
$this->wp->addImageSize( 'zero-width-height', array( 'width' => 0, 'height' => 0 ) );
93-
94-
$this->subject->get_sizes();
95-
$this->assertEquals(array(
96-
0 => array( 'width' => null, 'height' => null, 'tinify' => true ),
97-
'thumbnail' => array( 'width' => 150, 'height' => 150, 'tinify' => false ),
98-
'medium' => array( 'width' => 300, 'height' => 300, 'tinify' => true ),
99-
'medium_large' => array( 'width' => 768, 'height' => 0, 'tinify' => false ),
100-
'large' => array( 'width' => 1024, 'height' => 1024, 'tinify' => false ),
101-
'zero-width' => array( 'width' => 0, 'height' => 510, 'tinify' => false ),
102-
'zero-height' => array( 'width' => 825, 'height' => 0, 'tinify' => false )
103-
), $this->subject->get_sizes());
104-
}
83+
$this->wp->addOption( 'tinypng_sizes[0]', 'on' );
84+
$this->wp->addOption( 'tinypng_sizes[medium]', 'on' );
85+
$this->wp->addOption( 'tinypng_sizes[post-thumbnail]', 'on' );
86+
$this->wp->addOption( 'tinypng_sizes[zero-width]', 'off' );
87+
$this->wp->addOption( 'tinypng_sizes[zero-height]', 'off' );
88+
$this->wp->addOption( 'tinypng_sizes[zero-width-height]', 'off' );
89+
90+
$this->wp->addImageSize( 'zero-width', array( 'width' => 0, 'height' => 510 ) );
91+
$this->wp->addImageSize( 'zero-height', array( 'width' => 825, 'height' => 0 ) );
92+
$this->wp->addImageSize( 'zero-width-height', array( 'width' => 0, 'height' => 0 ) );
93+
94+
$this->subject->get_sizes();
95+
$this->assertEquals(array(
96+
0 => array( 'width' => null, 'height' => null, 'tinify' => true ),
97+
'thumbnail' => array( 'width' => 150, 'height' => 150, 'tinify' => false ),
98+
'medium' => array( 'width' => 300, 'height' => 300, 'tinify' => true ),
99+
'medium_large' => array( 'width' => 768, 'height' => 0, 'tinify' => false ),
100+
'large' => array( 'width' => 1024, 'height' => 1024, 'tinify' => false ),
101+
'zero-width' => array( 'width' => 0, 'height' => 510, 'tinify' => false ),
102+
'zero-height' => array( 'width' => 825, 'height' => 0, 'tinify' => false )
103+
), $this->subject->get_sizes());
104+
}
105105

106106
public function test_should_skip_dummy_size() {
107107
$this->wp->addOption( 'tinypng_sizes[tiny_dummy]', 'on' );

0 commit comments

Comments
 (0)