This commit is contained in:
salam committed 2026-10-04 15:25:03 +02:00
1 parent 9bcd4432c6
commit 6f92f9e1d5
1209 files changed
+220940

No files matched your search

@@ -0,0 +1,53 @@
<?php
namespace App\Console\Commands\DbMapper\Helper;
class ArrayFunction
{
public static function remove($array, $value = [])
{
$tmp = str_replace(',', ' ', $str);
// $tmp = str_replace('-', ' ', $tmp);
$tmp = str_replace('/', ' ', $tmp);
$tmp = preg_replace('"\([^\)]*\)"', '', $tmp);
$tmp = preg_replace('/[^a-zA-Z0-9 ] /', '', $tmp);
$tmp = str_replace(' ', ' ', $tmp);
$elements = explode(' ', $tmp);
$_return = [];
foreach ($elements as $value) {
if (\strlen($value) > 3) {
$_return[] = $value;
}
}
usort($_return, function ($a, $b) {
return strlen($b) <=> strlen($a);
});
$remove = [
'fc',
'city',
'new',
'real',
'united',
'dinamo',
'town',
'club',
'union',
'sport',
'sports',
'basket',
'hapoel',
'maccabi',
'east'];
return array_diff($_return, $remove);
}
}