@@ -94,12 +94,12 @@ public static function evaluate( array $metrics, array $thresholds = array(), bo
9494 $ effective_warn_bytes = $ thresholds ['warn_free_bytes ' ];
9595 if ( null !== $ total_bytes && $ total_bytes > 0 ) {
9696 $ effective_refuse_bytes = self ::effective_free_bytes_threshold (
97- $ thresholds ['refuse_free_bytes ' ],
97+ ( int ) $ thresholds ['refuse_free_bytes ' ],
9898 $ thresholds ['refuse_free_percent ' ],
9999 $ total_bytes
100100 );
101101 $ effective_warn_bytes = self ::effective_free_bytes_threshold (
102- $ thresholds ['warn_free_bytes ' ],
102+ ( int ) $ thresholds ['warn_free_bytes ' ],
103103 $ thresholds ['warn_free_percent ' ],
104104 $ total_bytes
105105 );
@@ -112,15 +112,15 @@ public static function evaluate( array $metrics, array $thresholds = array(), bo
112112 'Free disk space is %.1f GiB%s, below the refusal threshold of %.1f GiB or %.1f%% free, whichever is stricter. ' ,
113113 self ::bytes_to_gib ($ free_bytes ),
114114 null === $ free_percent ? '' : sprintf (' (%.1f%%) ' , $ free_percent ),
115- self ::bytes_to_gib ($ thresholds ['refuse_free_bytes ' ]),
115+ self ::bytes_to_gib ( ( int ) $ thresholds ['refuse_free_bytes ' ] ),
116116 $ thresholds ['refuse_free_percent ' ]
117117 );
118118 } elseif ( $ free_bytes < $ effective_warn_bytes ) {
119119 $ warnings [] = sprintf (
120120 'Free disk space is %.1f GiB%s, below the warning threshold of %.1f GiB or %.1f%% free, whichever is stricter. ' ,
121121 self ::bytes_to_gib ($ free_bytes ),
122122 null === $ free_percent ? '' : sprintf (' (%.1f%%) ' , $ free_percent ),
123- self ::bytes_to_gib ($ thresholds ['warn_free_bytes ' ]),
123+ self ::bytes_to_gib ( ( int ) $ thresholds ['warn_free_bytes ' ] ),
124124 $ thresholds ['warn_free_percent ' ]
125125 );
126126 }
@@ -158,10 +158,10 @@ public static function evaluate( array $metrics, array $thresholds = array(), bo
158158 'workspace_size_exact ' => false ,
159159 'worktree_count ' => $ count ,
160160 'warn_free_bytes ' => $ thresholds ['warn_free_bytes ' ],
161- 'warn_free_gib ' => round (self ::bytes_to_gib ($ thresholds ['warn_free_bytes ' ]), 2 ),
161+ 'warn_free_gib ' => round (self ::bytes_to_gib ( ( int ) $ thresholds ['warn_free_bytes ' ] ), 2 ),
162162 'warn_free_percent ' => $ thresholds ['warn_free_percent ' ],
163163 'refuse_free_bytes ' => $ thresholds ['refuse_free_bytes ' ],
164- 'refuse_free_gib ' => round (self ::bytes_to_gib ($ thresholds ['refuse_free_bytes ' ]), 2 ),
164+ 'refuse_free_gib ' => round (self ::bytes_to_gib ( ( int ) $ thresholds ['refuse_free_bytes ' ] ), 2 ),
165165 'refuse_free_percent ' => $ thresholds ['refuse_free_percent ' ],
166166 'effective_refuse_bytes ' => $ effective_refuse_bytes ,
167167 'effective_refuse_gib ' => round (self ::bytes_to_gib ($ effective_refuse_bytes ), 2 ),
0 commit comments