Skip to content
Snippets Groups Projects
Commit 4e59581a authored by Адлан Шамавов's avatar Адлан Шамавов
Browse files

temp commit

parent b3f9aa8a
No related branches found
No related tags found
1 merge request!9Ptps controller 9
Раз, два, три, четыре,
пять, шесть, семь, восемь.
\ No newline at end of file
<?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
<?php
namespace App\Validation;
class DateValidation
{
public static function validate(string $date): bool
{
if (strtotime($date)) {
return true;
}
return false;
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment