@@ -22,47 +22,43 @@ trait CommonAdjustmentTrait
22
22
/**
23
23
* Adjusts the brightness.
24
24
*
25
- * @param int $level The level of brightness (Range: -99 to 100, Server default: 80)
25
+ * @param int|null $level The level of brightness (Range: -99 to 100, Server default: 80)
26
26
*
27
- * @return LevelEffectAction
28
27
*/
29
- public static function brightness ($ level = null )
28
+ public static function brightness (? int $ level = null ): LevelEffectAction
30
29
{
31
30
return EffectAction::withLevel (Adjust::BRIGHTNESS , EffectRange::BRIGHTNESS , $ level );
32
31
}
33
32
34
33
/**
35
34
* Adjusts the contrast.
36
35
*
37
- * @param int $level The level of contrast (Range: -100 to 100, Server default: 0)
36
+ * @param int|null $level The level of contrast (Range: -100 to 100, Server default: 0)
38
37
*
39
- * @return LevelEffectAction
40
38
*/
41
- public static function contrast ($ level = null )
39
+ public static function contrast (? int $ level = null ): LevelEffectAction
42
40
{
43
41
return EffectAction::withLevel (Adjust::CONTRAST , EffectRange::DEFAULT_RANGE , $ level );
44
42
}
45
43
46
44
/**
47
45
* Adjusts the color saturation.
48
46
*
49
- * @param int $level The level of color saturation (Range: -100 to 100, Server default: 80).
47
+ * @param int|null $level The level of color saturation (Range: -100 to 100, Server default: 80).
50
48
*
51
- * @return LevelEffectAction
52
49
*/
53
- public static function saturation ($ level = null )
50
+ public static function saturation (? int $ level = null ): LevelEffectAction
54
51
{
55
52
return EffectAction::withLevel (Adjust::SATURATION , EffectRange::DEFAULT_RANGE , $ level );
56
53
}
57
54
58
55
/**
59
56
* Adjusts the gamma level.
60
57
*
61
- * @param int $level The level of gamma (Range: -50 to 150, Server default: 0).
58
+ * @param int|null $level The level of gamma (Range: -50 to 150, Server default: 0).
62
59
*
63
- * @return LevelEffectAction
64
60
*/
65
- public static function gamma ($ level = null )
61
+ public static function gamma (? int $ level = null ): LevelEffectAction
66
62
{
67
63
return EffectAction::withLevel (Adjust::GAMMA , EffectRange::SHIFTED_RANGE , $ level );
68
64
}
@@ -72,11 +68,10 @@ public static function gamma($level = null)
72
68
*
73
69
* @see https://cloudinary.com/documentation/image_transformations#applying_3d_luts_to_images
74
70
*
75
- * @param string $lutId The 3D LUT file id
71
+ * @param string|null $lutId The 3D LUT file id
76
72
*
77
- * @return LutLayer
78
73
*/
79
- public static function by3dLut ($ lutId = null )
74
+ public static function by3dLut (? string $ lutId = null ): LutLayer
80
75
{
81
76
return ClassUtils::verifyInstance ($ lutId , LutLayer::class);
82
77
}
@@ -87,12 +82,11 @@ public static function by3dLut($lutId = null)
87
82
* This is a generic way to apply an effect. For example, you could set $name to "gamma" and $args to 50, and this
88
83
* would have the same effect as calling gamma(50).
89
84
*
90
- * @param string $name The effect name.
85
+ * @param string $name The effect name.
91
86
* @param mixed ...$args The qualifiers of the effect.
92
87
*
93
- * @return EffectAction
94
88
*/
95
- public static function generic ($ name , ...$ args )
89
+ public static function generic (string $ name , ...$ args ): EffectAction
96
90
{
97
91
return EffectAction::named ($ name , ...$ args );
98
92
}
0 commit comments