Skip to content
Snippets Groups Projects

Ptps controller 6

Merged Адлан Шамавов requested to merge PTPS_Controller_6 into main
4 unresolved threads
1 file
+ 0
26
Compare changes
  • Side-by-side
  • Inline
+ 0
26
<?php
namespace App\Validation;
class ArrayValidation
{
public static function validateFunc1(array $array): bool
{
$prices = array_column($array, 'price');
$counts = array_column($array, 'count');
return ctype_digit(implode('',$prices)) && ctype_digit(implode('', $counts));
}
public static function validateFunc2(array $array): bool
{
$ids = array_column($array, 'id');
$ages = array_column($array, 'age');
return ctype_digit(implode('', $ids)) && ctype_digit(implode('', $ages));
}
public static function validateFunc4(array $array): bool
{
$depths = array_column($array, 'depth');
return ctype_digit(implode('', $depths));
}
}
\ No newline at end of file
Loading