1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-11 16:34:00 +02:00

Remove unused trait

This commit is contained in:
Oliver Vogel
2023-10-24 19:29:19 +02:00
parent 4cbb0de586
commit 6bdea8cc9e

View File

@@ -1,31 +0,0 @@
<?php
namespace Intervention\Image\Traits;
trait CanValidateColors
{
protected function isValidColorArray($input): bool
{
if (!is_array($input)) {
return false;
}
if (count($input) < 3 || count($input) > 4) {
return false;
}
// validate rgb values
foreach ($input as $value) {
if ($value < 0 || $value > 255) {
return false;
}
}
// validate alpha value
if (isset($input[3]) && ($input[3] > 1 || $input[3] < 0)) {
return false;
}
return true;
}
}