@@ -226,7 +226,7 @@ protected function _renderContent(): void
226226
227227 foreach ((array )$ serialize as $ viewVar ) {
228228 if (is_scalar ($ this ->viewVars [$ viewVar ])) {
229- throw new CakeException ("' " . $ viewVar . "' is not an array or iteratable object. " );
229+ throw new CakeException ("' " . $ viewVar . "' is not an array or iterable object. " );
230230 }
231231
232232 foreach ($ this ->viewVars [$ viewVar ] as $ _data ) {
@@ -250,7 +250,7 @@ protected function _renderContent(): void
250250 [$ path , $ format ] = $ formatter ;
251251 }
252252
253- if (strpos ($ path , '. ' ) === false ) {
253+ if (! str_contains ($ path , '. ' )) {
254254 $ value = $ _data [$ path ];
255255 } else {
256256 $ value = Hash::get ($ _data , $ path );
@@ -271,7 +271,7 @@ protected function _renderContent(): void
271271 /**
272272 * Aggregates the rows into a single csv
273273 *
274- * @param array|null $row Row data
274+ * @param array<string> |null $row Row data
275275 * @return string CSV with all data to date
276276 */
277277 protected function _renderRow (?array $ row = null ): string
@@ -293,7 +293,7 @@ protected function _renderRow(?array $row = null): string
293293 /**
294294 * Generates a single row in a csv from an array of
295295 * data by writing the array to a temporary file and
296- * returning it's contents
296+ * returning its contents
297297 *
298298 * @param array|null $row Row data
299299 * @return string|false String with the row in csv-syntax, false on fputscv failure
@@ -302,7 +302,7 @@ protected function _generateRow(?array $row = null): string|false
302302 {
303303 static $ fp = false ;
304304
305- if (empty ( $ row) ) {
305+ if (! $ row ) {
306306 return '' ;
307307 }
308308
0 commit comments