wip del err
This commit is contained in:
1 parent
812736ca9a
commit
9bcd4432c6
1210 files changed
-220941
No files matched your search
@@ -1,53 +0,0 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user