This commit is contained in:
Oliver Davies 2020-07-12 16:54:11 +01:00
parent fee5c1afe4
commit a62c22030e
4 changed files with 38 additions and 1 deletions

14
src/Pangram.php Normal file
View file

@ -0,0 +1,14 @@
<?php
declare(strict_types=1);
namespace App;
function isPangram(string $input): bool
{
$split = str_split($input);
$lower = array_map('strtolower', $split);
$filtered = array_filter($lower, fn(string $letter) => $letter != ' ');
return count(array_unique($filtered)) == 26;
}