12
12
/**
13
13
* Image abstract adapter
14
14
*
15
+ * phpcs:disable Magento2.Classes.AbstractApi
15
16
* @api
16
17
* @SuppressWarnings(PHPMD.TooManyFields)
17
18
*/
@@ -27,25 +28,25 @@ abstract class AbstractAdapter implements AdapterInterface
27
28
* Position constants.
28
29
* Used mainly for watermarks
29
30
*/
30
- const POSITION_TOP_LEFT = 'top-left ' ;
31
+ public const POSITION_TOP_LEFT = 'top-left ' ;
31
32
32
- const POSITION_TOP_RIGHT = 'top-right ' ;
33
+ public const POSITION_TOP_RIGHT = 'top-right ' ;
33
34
34
- const POSITION_BOTTOM_LEFT = 'bottom-left ' ;
35
+ public const POSITION_BOTTOM_LEFT = 'bottom-left ' ;
35
36
36
- const POSITION_BOTTOM_RIGHT = 'bottom-right ' ;
37
+ public const POSITION_BOTTOM_RIGHT = 'bottom-right ' ;
37
38
38
- const POSITION_STRETCH = 'stretch ' ;
39
+ public const POSITION_STRETCH = 'stretch ' ;
39
40
40
- const POSITION_TILE = 'tile ' ;
41
+ public const POSITION_TILE = 'tile ' ;
41
42
42
- const POSITION_CENTER = 'center ' ;
43
+ public const POSITION_CENTER = 'center ' ;
43
44
/**#@-*/
44
45
45
46
/**
46
47
* The size of the font to use as default
47
48
*/
48
- const DEFAULT_FONT_SIZE = 15 ;
49
+ public const DEFAULT_FONT_SIZE = 15 ;
49
50
50
51
/**
51
52
* @var int
@@ -627,7 +628,7 @@ protected function _checkDimensions($frameWidth, $frameHeight)
627
628
{
628
629
if ($ frameWidth !== null && $ frameWidth <= 0 ||
629
630
$ frameHeight !== null && $ frameHeight <= 0 ||
630
- empty ($ frameWidth) && empty ( $ frameHeight )
631
+ ($ frameWidth === '' && $ frameHeight === '' )
631
632
) {
632
633
//phpcs:ignore Magento2.Exceptions.DirectThrow
633
634
throw new \InvalidArgumentException ('Invalid image dimensions. ' );
0 commit comments