@@ -22,47 +22,43 @@ trait CommonAdjustmentTrait
2222 /**
2323 * Adjusts the brightness.
2424 *
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)
2626 *
27- * @return LevelEffectAction
2827 */
29- public static function brightness ($ level = null )
28+ public static function brightness (? int $ level = null ): LevelEffectAction
3029 {
3130 return EffectAction::withLevel (Adjust::BRIGHTNESS , EffectRange::BRIGHTNESS , $ level );
3231 }
3332
3433 /**
3534 * Adjusts the contrast.
3635 *
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)
3837 *
39- * @return LevelEffectAction
4038 */
41- public static function contrast ($ level = null )
39+ public static function contrast (? int $ level = null ): LevelEffectAction
4240 {
4341 return EffectAction::withLevel (Adjust::CONTRAST , EffectRange::DEFAULT_RANGE , $ level );
4442 }
4543
4644 /**
4745 * Adjusts the color saturation.
4846 *
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).
5048 *
51- * @return LevelEffectAction
5249 */
53- public static function saturation ($ level = null )
50+ public static function saturation (? int $ level = null ): LevelEffectAction
5451 {
5552 return EffectAction::withLevel (Adjust::SATURATION , EffectRange::DEFAULT_RANGE , $ level );
5653 }
5754
5855 /**
5956 * Adjusts the gamma level.
6057 *
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).
6259 *
63- * @return LevelEffectAction
6460 */
65- public static function gamma ($ level = null )
61+ public static function gamma (? int $ level = null ): LevelEffectAction
6662 {
6763 return EffectAction::withLevel (Adjust::GAMMA , EffectRange::SHIFTED_RANGE , $ level );
6864 }
@@ -72,11 +68,10 @@ public static function gamma($level = null)
7268 *
7369 * @see https://cloudinary.com/documentation/image_transformations#applying_3d_luts_to_images
7470 *
75- * @param string $lutId The 3D LUT file id
71+ * @param string|null $lutId The 3D LUT file id
7672 *
77- * @return LutLayer
7873 */
79- public static function by3dLut ($ lutId = null )
74+ public static function by3dLut (? string $ lutId = null ): LutLayer
8075 {
8176 return ClassUtils::verifyInstance ($ lutId , LutLayer::class);
8277 }
@@ -87,12 +82,11 @@ public static function by3dLut($lutId = null)
8782 * This is a generic way to apply an effect. For example, you could set $name to "gamma" and $args to 50, and this
8883 * would have the same effect as calling gamma(50).
8984 *
90- * @param string $name The effect name.
85+ * @param string $name The effect name.
9186 * @param mixed ...$args The qualifiers of the effect.
9287 *
93- * @return EffectAction
9488 */
95- public static function generic ($ name , ...$ args )
89+ public static function generic (string $ name , ...$ args ): EffectAction
9690 {
9791 return EffectAction::named ($ name , ...$ args );
9892 }
0 commit comments