...
This commit is contained in:
parent
9441631dd4
commit
8e704e7afa
4221 changed files with 1 additions and 544259 deletions
2
pfosten/.gitignore
vendored
2
pfosten/.gitignore
vendored
|
|
@ -2,7 +2,7 @@
|
||||||
/public/hot
|
/public/hot
|
||||||
/public/storage
|
/public/storage
|
||||||
/storage/*.key
|
/storage/*.key
|
||||||
/vendor
|
/vendor/*
|
||||||
/.idea
|
/.idea
|
||||||
/.vagrant
|
/.vagrant
|
||||||
Homestead.json
|
Homestead.json
|
||||||
|
|
|
||||||
|
|
@ -1,841 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Leagues;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
use App\Season;
|
|
||||||
use App\Round;
|
|
||||||
use App\User;
|
|
||||||
|
|
||||||
use App\Leagues\LeagueMember;
|
|
||||||
|
|
||||||
use DB;
|
|
||||||
use Log;
|
|
||||||
|
|
||||||
use App\MyClasses;
|
|
||||||
|
|
||||||
class League extends Model
|
|
||||||
{
|
|
||||||
|
|
||||||
const RANK_LEAGUE1 = 1;
|
|
||||||
const RANK_LEAGUE2 = 2;
|
|
||||||
const RANK_LEAGUE3 = 3;
|
|
||||||
const RANK_QUALIFICATION = 4;
|
|
||||||
|
|
||||||
protected $table ='leagues';
|
|
||||||
protected $fillable = [
|
|
||||||
'id','season_id','is_qualification','rank','subrank','start_round_id','round_count','name'
|
|
||||||
];
|
|
||||||
//
|
|
||||||
public static function neededLeagues($member_count, $round_count) {
|
|
||||||
$max_members_per_league=22;
|
|
||||||
if ( $round_count < $max_members_per_league-1 ) { $max_members_per_league = $round_count+1; }
|
|
||||||
if ($member_count <= $max_members_per_league) return $member_count;
|
|
||||||
|
|
||||||
$neededLeagues = intdiv($member_count, $max_members_per_league);
|
|
||||||
|
|
||||||
if ( $member_count - $max_members_per_league * $neededLeagues ) {
|
|
||||||
$neededLeagues+=1;
|
|
||||||
}
|
|
||||||
return $neededLeagues;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getMemberCount($league_id) {
|
|
||||||
$members = DB::table('leagues_members')->where('league_id','=',$league_id)->get();
|
|
||||||
return sizeof($members);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static function getNames() {
|
|
||||||
$season = Season::getCurrent();
|
|
||||||
|
|
||||||
$leagues = League::where('season_id','=',$season->id)->orderBy('rank')->orderBy('name')->get();
|
|
||||||
|
|
||||||
$leagueNames = array();
|
|
||||||
foreach($leagues as $league) {
|
|
||||||
$leagueNames[$league->id] = $league->name;
|
|
||||||
}
|
|
||||||
return $leagueNames;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getStartRoundId($leagueId)
|
|
||||||
{
|
|
||||||
$league = League::where('id','=',$leagueId)->first();
|
|
||||||
return $league->start_round_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static function cmpScore($score1, $score2) {
|
|
||||||
// [0] = user-id
|
|
||||||
// [1] = league_score
|
|
||||||
// [4] = rank
|
|
||||||
$_score1 = $score1[1];
|
|
||||||
$goals1 = $score1[2];
|
|
||||||
$cGoals1 = $score1[3];
|
|
||||||
$rank1 = -1;
|
|
||||||
if (array_key_exists(4, $score1 )) { $rank1 = $score1[4]; }
|
|
||||||
|
|
||||||
$_score2 = $score2[1];
|
|
||||||
$goals2 = $score2[2];
|
|
||||||
$cGoals2 = $score2[3];
|
|
||||||
$rank2 = -1;
|
|
||||||
if (array_key_exists(4, $score2 )) {$rank2 = $score2[4]; }
|
|
||||||
|
|
||||||
$diff1 = $goals1-$cGoals1;
|
|
||||||
$diff2 = $goals2-$cGoals2;
|
|
||||||
|
|
||||||
if ($rank1 > $rank2) return true;
|
|
||||||
if ($rank1 < $rank2) return false;
|
|
||||||
|
|
||||||
if ($_score1 == $_score2) {
|
|
||||||
if ($diff1==$diff2) {
|
|
||||||
if ($goals1 == $goals2) {
|
|
||||||
return $cGoals1 > $cGoals2;
|
|
||||||
}
|
|
||||||
return ( $goals1 < $goals2 );
|
|
||||||
}
|
|
||||||
return ($diff1<$diff2);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ($_score1 < $_score2);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Funktioniert nur auf bereits sortierter Liste, nur für Selektion Gruppe 3 Auf & Abstieg
|
|
||||||
public static function cmpScoreForPos($score1, $score2) {
|
|
||||||
// [0] = user-id
|
|
||||||
// [4] = rank
|
|
||||||
$_score1 = $score1[1];
|
|
||||||
$goals1 = $score1[2];
|
|
||||||
$cGoals1 = $score1[3];
|
|
||||||
$rank1 = $score1[4];
|
|
||||||
$pos1 = $score1[5];
|
|
||||||
|
|
||||||
$_score2 = $score2[1];
|
|
||||||
$goals2 = $score2[2];
|
|
||||||
$cGoals2 = $score2[3];
|
|
||||||
$rank2 = $score2[4];
|
|
||||||
$pos2 = $score2[5];
|
|
||||||
|
|
||||||
$diff1 = $goals1-$cGoals1;
|
|
||||||
$diff2 = $goals2-$cGoals2;
|
|
||||||
|
|
||||||
if ($rank1 > $rank2) return true;
|
|
||||||
if ($rank1 < $rank2) return false;
|
|
||||||
|
|
||||||
if ($pos1 > $pos2) return true;
|
|
||||||
if ($pos1 < $pos2) return false;
|
|
||||||
|
|
||||||
if ($_score1 == $_score2) {
|
|
||||||
if ($diff1==$diff2) {
|
|
||||||
if ($goals1 == $goals2) {
|
|
||||||
return $cGoals1 > $cGoals2;
|
|
||||||
}
|
|
||||||
return ( $goals1 < $goals2 );
|
|
||||||
}
|
|
||||||
return ($diff1<$diff2);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ($_score1 < $_score2);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static function getRanking($rank, $seasonId=-1) {
|
|
||||||
$season = Season::getCurrent();
|
|
||||||
if ($seasonId > -1) { $season=Season::where('id','=',$seasonId)->first(); };
|
|
||||||
$leagues = League::where('rank','=',$rank)->where('season_id','=', $season->id)->orderBy('id')->get();
|
|
||||||
|
|
||||||
$leagueScores=array();
|
|
||||||
foreach($leagues as $league) {
|
|
||||||
$memberIds = LeagueMember::getMembers($league->id);
|
|
||||||
|
|
||||||
$memberScores =array();
|
|
||||||
foreach($memberIds as $memberId) {
|
|
||||||
$tpl=array();
|
|
||||||
$tpl[0]=$memberId;
|
|
||||||
$tpl[1]=0; // league_score
|
|
||||||
$tpl[2]=0; // goals
|
|
||||||
$tpl[3]=0; // countergoals
|
|
||||||
$memberScores[$memberId] = $tpl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$lastLockedRoundId=Round::getLastLockedRoundId();
|
|
||||||
Log::info("LASTLOCKKEDROUNDID=".$lastLockedRoundId);
|
|
||||||
$matches=Match::getMatchResults($league->id,-1);
|
|
||||||
foreach ($matches as $match) {
|
|
||||||
if (Round::isCompleted($match->round_id) || $match->round_id==$lastLockedRoundId ) {
|
|
||||||
$memberScores[$match->user1_id][1] += $match->user1_league_score;
|
|
||||||
error_log("+++ ".$match->user1_id." +".$match->user1_league_score);
|
|
||||||
$memberScores[$match->user1_id][2] += $match->user1_rankscore; // goals
|
|
||||||
$memberScores[$match->user1_id][3] += $match->user2_rankscore; // countergoals
|
|
||||||
|
|
||||||
$memberScores[$match->user2_id][1] += $match->user2_league_score;
|
|
||||||
error_log("+++ ".$match->user2_id." +".$match->user2_league_score);
|
|
||||||
$memberScores[$match->user2_id][2] += $match->user2_rankscore; // goals
|
|
||||||
$memberScores[$match->user2_id][3] += $match->user1_rankscore; // countergoals
|
|
||||||
}
|
|
||||||
}
|
|
||||||
usort($memberScores, array('App\Leagues\League','cmpScore'));
|
|
||||||
|
|
||||||
$leagueScores[$league->id]=$memberScores;
|
|
||||||
|
|
||||||
error_log("League::getRanking leagueid / userid / score");
|
|
||||||
|
|
||||||
foreach ($memberScores as $entry) {
|
|
||||||
error_log($league->id." / ".$entry[0]." / ".$entry[1]);
|
|
||||||
}
|
|
||||||
error_log("---");
|
|
||||||
|
|
||||||
}
|
|
||||||
return $leagueScores;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Für Auf/Abstiegsberechnung - wird auf previous Season angewendet.
|
|
||||||
// getUnifiedRanking bezieht sich (nur) auf Gruppen-Übergreifende Listung (also alle Untergruppen)
|
|
||||||
// Rank = -1 bedeutet über alle Ranks (benötigt für Auf- und Abstieg über alle Ligen)
|
|
||||||
public static function getUnifiedRanking($rank, $seasonId=-1) {
|
|
||||||
|
|
||||||
//Log::info("getUnified Ranking [last season], rank=".$rank." seasonId=".$seasonId);
|
|
||||||
|
|
||||||
$leagueScores = League::getRanking($rank, $seasonId);
|
|
||||||
$unifiedScores = array();
|
|
||||||
foreach($leagueScores as $leagueId => $singleLeagueScores) {
|
|
||||||
foreach ($singleLeagueScores as $placeNr => $singleLeagueScore) {
|
|
||||||
$userId=$singleLeagueScores[$placeNr][0];
|
|
||||||
$scoreWithPos=$singleLeagueScores[$placeNr];
|
|
||||||
$scoreWithPos[4]=$placeNr+1;
|
|
||||||
$unifiedScores[$userId]=$scoreWithPos;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
usort($unifiedScores,array('App\Leagues\League','cmpScore'));
|
|
||||||
|
|
||||||
//Log::info("getUnifiedRanking result, $rank=".$rank.", SeasonId=".$seasonId);
|
|
||||||
//Log::info($unifiedScores);
|
|
||||||
return $unifiedScores;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Nur für Auf und Abstiegsberechnung.
|
|
||||||
// Schreibt den zukünftigen Rank auf Index4
|
|
||||||
public static function getTotalRankingOverall($seasonId=-1) {
|
|
||||||
$a=new MyClasses\TimeLogger("League::getTotalRankingOverall (seasonId=".$seasonId.")");
|
|
||||||
Log::info($a->getStartMessage());
|
|
||||||
|
|
||||||
$userNames = User::getNames();
|
|
||||||
|
|
||||||
$totalRanking=array();
|
|
||||||
$hasRank4 = false;
|
|
||||||
foreach([1,2,3,4] as $rank) {
|
|
||||||
|
|
||||||
foreach (League::getUnifiedRanking($rank, $seasonId) as $rankEntry) {
|
|
||||||
// Tuple: [0] = userId, [1] = league_score [2] = goals, [3] = counter_goals [4] = LigaPos
|
|
||||||
$tpl = array();
|
|
||||||
$tpl[0] = $rankEntry[0]; // userId
|
|
||||||
$tpl[1] = $rankEntry[1]; // league_score
|
|
||||||
$tpl[2] = $rankEntry[2]; // goals
|
|
||||||
$tpl[3] = $rankEntry[3]; // countergoals
|
|
||||||
$tpl[4] = $rank; // league_rank (1,2,3, 4=quali)
|
|
||||||
$tpl[5] = $rankEntry[4]; // league_pos (for multiple leagues per rank, usually ranks 3 and 4)
|
|
||||||
|
|
||||||
if ($rank==4) { $hasRank4=true;}
|
|
||||||
|
|
||||||
// only add to list if user has paid for season
|
|
||||||
if (User::is_season_paid($tpl[0])=="Ja") {
|
|
||||||
array_push($totalRanking, $tpl);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
usort($totalRanking, array('App\Leagues\League','cmpScore'));
|
|
||||||
usort($totalRanking, array('App\Leagues\League','cmpScoreForPos')); // Dieser Sort funktioniert nur auf bereits sortierter Liste !! Nur für GruppenRank=3
|
|
||||||
|
|
||||||
// Neuen Rang auf Index 4 schreiben
|
|
||||||
foreach ($totalRanking as $index => $entry) {
|
|
||||||
$rank=3;
|
|
||||||
if ($index<44) { $rank=2; }
|
|
||||||
if ($index<22) { $rank=1; }
|
|
||||||
$totalRanking[$index][4]=$rank;
|
|
||||||
}
|
|
||||||
|
|
||||||
// kein Rank4 ==> Ligaspiel ==> Auf & Abstieg wird angewendet.
|
|
||||||
if ($hasRank4) {
|
|
||||||
Log::info("Rank4 gesetzt, Quali, keine Vorsaison, Auf/Abstieg wird übersprungen");
|
|
||||||
}else {
|
|
||||||
Log::info("Rank4 nicht gesetzt, keine Quali, Auf/Abstieg wird berechnet");
|
|
||||||
// Liga 1/2: Swap rank 17-22 <> 23-28 ==> index 16-21 to rank=2, index 22-27 to rank=1
|
|
||||||
// Liga 2/3: Swap rank 39-44 <> 45-50 ==> index 38-43 to rank=3, index 44-49 to rank=2
|
|
||||||
|
|
||||||
$totalRanking[16][4]=2;
|
|
||||||
$uid=$totalRanking[16][0];
|
|
||||||
Log::info("Abstieg in Liga 2: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[17][4]=2;
|
|
||||||
$uid=$totalRanking[17][0];
|
|
||||||
Log::info("Abstieg in Liga 2: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[18][4]=2;
|
|
||||||
$uid=$totalRanking[18][0];
|
|
||||||
Log::info("Abstieg in Liga 2: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[19][4]=2;
|
|
||||||
$uid=$totalRanking[19][0];
|
|
||||||
Log::info("Abstieg in Liga 2: ["+$uid+"] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[20][4]=2;
|
|
||||||
$uid=$totalRanking[20][0];
|
|
||||||
Log::info("Abstieg in Liga 2: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[21][4]=2;
|
|
||||||
$uid=$totalRanking[21][0];
|
|
||||||
Log::info("Abstieg in Liga 2: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[22][4]=1;
|
|
||||||
$uid=$totalRanking[22][0];
|
|
||||||
Log::info("Aufstieg in Liga 1: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[23][4]=1;
|
|
||||||
$uid=$totalRanking[23][0];
|
|
||||||
Log::info("Aufstieg in Liga 1: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[24][4]=1;
|
|
||||||
$uid=$totalRanking[24][0];
|
|
||||||
Log::info("Aufstieg in Liga 1: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[25][4]=1;
|
|
||||||
$uid=$totalRanking[25][0];
|
|
||||||
Log::info("Aufstieg in Liga 1: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[26][4]=1;
|
|
||||||
$uid=$totalRanking[26][0];
|
|
||||||
Log::info("Aufstieg in Liga 1: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[27][4]=1;
|
|
||||||
$uid=$totalRanking[27][0];
|
|
||||||
Log::info("Aufstieg in Liga 1: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[38][4]=3;
|
|
||||||
$uid=$totalRanking[38][0];
|
|
||||||
Log::info("Abstieg in Liga 3: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[39][4]=3;
|
|
||||||
$uid=$totalRanking[39][0];
|
|
||||||
Log::info("Abstieg in Liga 3: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[40][4]=3;
|
|
||||||
$uid=$totalRanking[40][0];
|
|
||||||
Log::info("Abstieg in Liga 3: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[41][4]=3;
|
|
||||||
$uid=$totalRanking[41][0];
|
|
||||||
Log::info("Abstieg in Liga 3: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[42][4]=3;
|
|
||||||
$uid=$totalRanking[42][0];
|
|
||||||
Log::info("Abstieg in Liga 3: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[43][4]=3;
|
|
||||||
$uid=$totalRanking[43][0];
|
|
||||||
Log::info("Abstieg in Liga 3: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$totalRanking[44][4]=2;
|
|
||||||
$uid=$totalRanking[44][0];
|
|
||||||
Log::info("Aufstieg in Liga 2: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[45][4]=2;
|
|
||||||
$uid=$totalRanking[45][0];
|
|
||||||
Log::info("Abstieg in Liga 3: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[46][4]=2;
|
|
||||||
$uid=$totalRanking[46][0];
|
|
||||||
Log::info("Abstieg in Liga 3: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[47][4]=2;
|
|
||||||
$uid=$totalRanking[47][0];
|
|
||||||
Log::info("Abstieg in Liga 3: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[48][4]=2;
|
|
||||||
$uid=$totalRanking[48][0];
|
|
||||||
Log::info("Abstieg in Liga 3: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
$totalRanking[49][4]=2;
|
|
||||||
$uid=$totalRanking[49][0];
|
|
||||||
Log::info("Abstieg in Liga 3: [".$uid."] ".$userNames[$uid]);
|
|
||||||
|
|
||||||
|
|
||||||
usort($totalRanking, array('App\Leagues\League','cmpScore'));
|
|
||||||
}
|
|
||||||
|
|
||||||
// HACK TO BE REMOVED: SET POSITIONS MANUALLY 2018-08
|
|
||||||
|
|
||||||
/*
|
|
||||||
foreach ($totalRanking as $index => $entry) {
|
|
||||||
$uid=$totalRanking[$index][0];
|
|
||||||
if ($uid==65 or $uid==80 or $uid==84 or $uid==3) {
|
|
||||||
$totalRanking[$index][4]=3;
|
|
||||||
}
|
|
||||||
if ($uid==68 or $uid==32 or $uid==9 or $uid==74) {
|
|
||||||
$totalRanking[$index][4]=2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
usort($totalRanking, array('App\Leagues\League','cmpScore'));
|
|
||||||
*/
|
|
||||||
|
|
||||||
// END OF HACK
|
|
||||||
|
|
||||||
Log::info($a->getEndMessage());
|
|
||||||
//error_log($a->getEndMessage());
|
|
||||||
|
|
||||||
return $totalRanking;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static function getNewUsers($seasonId=-1) {
|
|
||||||
$users=User::getActives($seasonId);
|
|
||||||
$previousSeason=Season::getPrevious($seasonId);
|
|
||||||
$old_users=User::getActives($previousSeason->id);
|
|
||||||
|
|
||||||
// Structure of unified list entry
|
|
||||||
/*
|
|
||||||
$tpl = array();
|
|
||||||
$tpl[0] = $rankEntry[0]; // userId
|
|
||||||
$tpl[1] = $rankEntry[1]; // league_score
|
|
||||||
$tpl[2] = $rankEntry[2]; // goals
|
|
||||||
$tpl[3] = $rankEntry[3]; // countergoals
|
|
||||||
$tpl[4] = $rank; // league_rank (1,2,3, 4=quali)
|
|
||||||
$tpl[5] = $rankEntry[4]; // league_pos (for multiple leagues per rank, usually ranks 3 and 4)
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
$new_users=array();
|
|
||||||
foreach($users as $user) {
|
|
||||||
$exists=0;
|
|
||||||
foreach($old_users as $old_user) {
|
|
||||||
if ($old_user->id == $user->id) { $exists=1;}
|
|
||||||
}
|
|
||||||
if (!$exists) {
|
|
||||||
if (User::payment_date($user->id, $seasonId)) {
|
|
||||||
$entry = [$user->id,0,0,0,3,0];
|
|
||||||
array_push($new_users, $entry);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $new_users;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ausfaktoriert aus LeaguesController::createLeagues()
|
|
||||||
// TODO: $round_count ist nur im Quali-Modus relevant und steuert, wieviele Quali-Gruppen benötigt werden.
|
|
||||||
// TODO: Sobald es Liga1 und Liga2 gibt, wird der round_count immer 21 sein, da Liga1 und Liga2 auf
|
|
||||||
// TODO: 22 Mitspieler festgelegt sind.
|
|
||||||
|
|
||||||
public static function createLeagues($start_round_id, $round_count) {
|
|
||||||
|
|
||||||
Log::info("Leagues\League::createLeagues, start_round_id=".$start_round_id.", round_count=".$round_count);
|
|
||||||
$currentSeason=Season::getCurrent();
|
|
||||||
$previousSeason=Season::getPrevious();
|
|
||||||
|
|
||||||
$userNames = User::getNames();
|
|
||||||
|
|
||||||
// Eventuell vorhandene Ligen loeschen
|
|
||||||
$leagues=League::where('season_id','=',$currentSeason->id)->get();
|
|
||||||
if ($leagues) {
|
|
||||||
foreach ($leagues as $league) {
|
|
||||||
DB::table('leagues_matches')->where('league_id', '=', $league->id)->delete();
|
|
||||||
DB::table('leagues_members')->where('league_id', '=', $league->id)->delete();
|
|
||||||
DB::table('leagues')->where('id', '=', $league->id)->delete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$active_member_count=sizeof(User::getActives());
|
|
||||||
Log::info("Aktive Spieler: ".$active_member_count);
|
|
||||||
$neededLeagues3 = League::neededLeagues($active_member_count, $round_count);
|
|
||||||
Log::info("Benötigte Liga-Gruppen: ".$neededLeagues3);
|
|
||||||
|
|
||||||
$league_ids=array();
|
|
||||||
|
|
||||||
//TODO: Wenn es keine Vorsaison gibt -> Qualifikation
|
|
||||||
//TODO: Ansonsten: Standard-Ligen (1,2,3) erzeugen. Liga 1 und 2 sind auf 22 Spieler festgelegt.
|
|
||||||
|
|
||||||
if (!$previousSeason) {
|
|
||||||
// Alle Spieler werden gleichmässig auf Qualifikationsgruppen aufgeteilt
|
|
||||||
// Dieser Modus wird gewählt, wenn es keine Vorsaison gibt, es also
|
|
||||||
// die erste Saison im System ist.
|
|
||||||
Log::info("League::createLeagues => No previous season detected.");
|
|
||||||
for ($league_nr=1; $league_nr<=$neededLeagues3; $league_nr+=1) {
|
|
||||||
$league = League::create([
|
|
||||||
'is_qualification' => true,
|
|
||||||
'name' => 'Qualifikationsgruppe '.$league_nr,
|
|
||||||
'rank' => '4',
|
|
||||||
'subrank' => $league_nr,
|
|
||||||
'round_count' => $round_count,
|
|
||||||
'season_id' => $currentSeason->id,
|
|
||||||
'start_round_id' => $start_round_id
|
|
||||||
]);
|
|
||||||
$league->save();
|
|
||||||
$league_ids[$league_nr-1] = $league->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Distribute members
|
|
||||||
$users = User::getActives();
|
|
||||||
shuffle($users);
|
|
||||||
$league_index=0;
|
|
||||||
Log::info("Distributing Members between groups");
|
|
||||||
while(sizeof($users)>0) {
|
|
||||||
$user = array_pop($users);
|
|
||||||
|
|
||||||
$leagueMember = LeagueMember::create([
|
|
||||||
'user_id' => $user->id,
|
|
||||||
'league_id' => $league_ids[$league_index]
|
|
||||||
]);
|
|
||||||
$leagueMember->save();
|
|
||||||
error_log("Saving user_id ".$user->id);
|
|
||||||
$league_index+=1;
|
|
||||||
if (sizeof($league_ids)==$league_index) { $league_index=0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// Es gibt eine Vorsaison.
|
|
||||||
// - 1.) Ligen erzeugen
|
|
||||||
// - 2.) unified Liste bauen
|
|
||||||
// - 3.) Wenn Vorsaison keine Quali war, dann Auf & Abstieg umsetzen ( unfified Liste als Basis )
|
|
||||||
// - 4.) Member den Ligen zuordnen
|
|
||||||
Log::info("League::createLeagues => Previous season detected. Creating Leagues 1, 2 and 3");
|
|
||||||
|
|
||||||
// Erzeugung der Ligen
|
|
||||||
$createdLeagues=array();
|
|
||||||
$neededLeagues3=0;
|
|
||||||
|
|
||||||
$league_size1= min(22,$active_member_count);
|
|
||||||
$league1 = League::create([
|
|
||||||
'is_qualification' => false,
|
|
||||||
'name' => 'Spielerliga 1',
|
|
||||||
'rank' => '1',
|
|
||||||
'subrank' => '1',
|
|
||||||
'round_count' => $round_count,
|
|
||||||
'season_id' => $currentSeason->id,
|
|
||||||
'start_round_id' => $start_round_id
|
|
||||||
]);
|
|
||||||
array_push($createdLeagues, $league1);
|
|
||||||
$league_size2=min(22,$active_member_count - $league_size1);
|
|
||||||
|
|
||||||
if ($league_size2>0) {
|
|
||||||
$league2 = League::create([
|
|
||||||
'is_qualification' => false,
|
|
||||||
'name' => 'Spielerliga 2',
|
|
||||||
'rank' => '2',
|
|
||||||
'subrank' => '1',
|
|
||||||
'round_count' => $round_count,
|
|
||||||
'season_id' => $currentSeason->id,
|
|
||||||
'start_round_id' => $start_round_id
|
|
||||||
]);
|
|
||||||
array_push($createdLeagues, $league2);
|
|
||||||
$league_size3 = $active_member_count - $league_size1 - $league_size2;
|
|
||||||
|
|
||||||
// Make neededLeagues3 visible outside of scope
|
|
||||||
$neededLeagues3=-1;
|
|
||||||
|
|
||||||
if ($league_size3>0) {
|
|
||||||
$neededLeagues3 = League::neededLeagues($league_size3, $round_count);
|
|
||||||
|
|
||||||
// Wenn es mehr als eine Gruppe ist, mpssen
|
|
||||||
if ($neededLeagues3>1) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
for ($league_nr=1; $league_nr<=$neededLeagues3; $league_nr+=1) {
|
|
||||||
$league = League::create([
|
|
||||||
'is_qualification' => false,
|
|
||||||
'name' => 'Spielerliga 3, Gruppe '.$league_nr,
|
|
||||||
'rank' => '3',
|
|
||||||
'subrank' => $league_nr,
|
|
||||||
'round_count' => $round_count,
|
|
||||||
'season_id' => $currentSeason->id,
|
|
||||||
'start_round_id' => $start_round_id
|
|
||||||
]);
|
|
||||||
$league->save();
|
|
||||||
array_push($createdLeagues,$league);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Log::info("League::createLeagues Creating unified List from previous season (i call League::getTotalRankingOverall)");
|
|
||||||
$unifiedList = League::getTotalRankingOverall($previousSeason->id); // WICHTIG !! getTotalRankingOverall implentiert Auf- und Abstieg !!
|
|
||||||
|
|
||||||
Log:info("League::createLeagues Unified List:");
|
|
||||||
$userNames = User::getNames();
|
|
||||||
|
|
||||||
$unifiedList2=array(); // We will only transfer users over to here that have paid the current season and are not deleted.
|
|
||||||
$count=0;
|
|
||||||
foreach($unifiedList as $listEntry) {
|
|
||||||
$userId = $listEntry[0];
|
|
||||||
$leagueScore=$listEntry[1];
|
|
||||||
if (User::is_season_paid($userId) && !User::isDeleted($userId)) {
|
|
||||||
$count+=1;
|
|
||||||
array_push($unifiedList2, $listEntry);
|
|
||||||
Log::info($count.".) [".$userId."] ".$userNames[$userId]." ".$leagueScore." Punkte");
|
|
||||||
} else {
|
|
||||||
Log::info($count.".) [".$userId."] ".$userNames[$userId]." [DELETED]");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$unifiedList = $unifiedList2;
|
|
||||||
|
|
||||||
|
|
||||||
// Jetzt neue Spieler hinzufügen, die letzte Saison noch nicht dabei waren, und deshalb in getTotalRankingOverall nicht enthalten sind.
|
|
||||||
Log::info("League::createLeagues Adding new users not within previous season");
|
|
||||||
foreach( League::getNewUsers() as $entry) {
|
|
||||||
array_push($unifiedList, $entry);
|
|
||||||
$userId=$entry[0];
|
|
||||||
Log::info("adding new user not in previous season: ( [".$userId."] ".$userNames[$userId]." )");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wenn es für Liga 3 mehr als eine Gruppe gibt, dann die Reihenfolge der Members randomisieren.
|
|
||||||
if ($neededLeagues3>1) {
|
|
||||||
$numberOfSwaps=50;
|
|
||||||
// Structure of unified list entry
|
|
||||||
/*
|
|
||||||
$tpl = array();
|
|
||||||
$tpl[0] = $rankEntry[0]; // userId
|
|
||||||
$tpl[1] = $rankEntry[1]; // league_score
|
|
||||||
$tpl[2] = $rankEntry[2]; // goals
|
|
||||||
$tpl[3] = $rankEntry[3]; // countergoals
|
|
||||||
$tpl[4] = $rank; // league_rank (1,2,3, 4=quali)
|
|
||||||
$tpl[5] = $rankEntry[4]; // league_pos (for multiple leagues per rank, usually ranks 3 and 4)
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Log::info("League 3 entries before shuffling:");
|
|
||||||
|
|
||||||
foreach($unifiedList as $entry) {
|
|
||||||
if ($entry[4]==3) {
|
|
||||||
Log::info ("(".$entry[0].") ".$userNames[$entry[0]]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$league3entries=array();
|
|
||||||
foreach($unifiedList as $pos => $entry) {
|
|
||||||
if ($entry[4]==3) {
|
|
||||||
array_push($league3entries, $entry);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
shuffle($league3entries);
|
|
||||||
$pos=0;
|
|
||||||
foreach ( $unifiedList as $key => $entry) {
|
|
||||||
if ($entry[4]==3) {
|
|
||||||
$unifiedList[$key] = $league3entries[$pos];
|
|
||||||
$pos += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Log::info("League 3 entries after shuffling:");
|
|
||||||
foreach($unifiedList as $entry) {
|
|
||||||
if ($entry[4]==3) { Log::info ("(".$entry[0].") ".$userNames[$entry[0]]); }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$currentCount = 1;
|
|
||||||
|
|
||||||
$nr=1;
|
|
||||||
$leagueNr=1;
|
|
||||||
$neededSize3=0;
|
|
||||||
$subLeague=1; // for rank 3 leagues only
|
|
||||||
$leagueCount=1;
|
|
||||||
$leagueIndex=0;
|
|
||||||
Log::info("League::createLeagues unified list size= ".sizeof($unifiedList));
|
|
||||||
|
|
||||||
foreach($unifiedList as $entry) {
|
|
||||||
|
|
||||||
if ($nr==23) { $leagueNr=2; $leagueCount=1; $leagueIndex=1; }
|
|
||||||
if ($nr==45) {
|
|
||||||
$leagueNr=3; $leagueCount=1; $leagueIndex=2;
|
|
||||||
$neededSize3=intdiv(($active_member_count-44),$neededLeagues3); // $neededLeagues = needed Groups for rank 3 leagues
|
|
||||||
|
|
||||||
if ( ($active_member_count-44) % 2) {
|
|
||||||
$neededSize3+=1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Log::info("League::createLeagues Needed min/switch size for rank 3 leagues: ".$neededSize3);
|
|
||||||
}
|
|
||||||
if ($nr>45 && $leagueCount > $neededSize3) {
|
|
||||||
$subLeague+=1;
|
|
||||||
$leagueCount=1;
|
|
||||||
$leagueIndex+=1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Log::info("League::createLeagues "."#".$leagueCount." Liga ".$leagueNr."-".$subLeague.") ".$nr." ".$entry[0]." (".$userNames[$entry[0]].")");
|
|
||||||
|
|
||||||
$league=$createdLeagues[$leagueIndex];
|
|
||||||
$leagueMember = LeagueMember::create([
|
|
||||||
'user_id' => $entry[0],
|
|
||||||
'league_id' => $league->id
|
|
||||||
]);
|
|
||||||
Log::Info("(".$entry[0].") ".$userNames[$entry[0]]." => leagueIndex=".$leagueIndex);
|
|
||||||
$leagueMember->save();
|
|
||||||
|
|
||||||
|
|
||||||
$leagueCount+=1;
|
|
||||||
$nr++;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Aktuelle Liga-Zuordnung auf Basis des Rangs in der letzten Liga
|
|
||||||
// Oder des Rangs in der Qualifikation
|
|
||||||
// oder erstellung des Quali Rangs wenn es keine previous Season gibt.
|
|
||||||
|
|
||||||
|
|
||||||
// Liga-Zugehörigkeit festlegen. Setzt voraus, dass die Ligen bereits erzeugt wurden.
|
|
||||||
public static function setLeagueForPlayers()
|
|
||||||
/*
|
|
||||||
* setLeagueForPlayers__NEW_QUALIFICATION case1
|
|
||||||
* setLeagueForPlayers__FROM_QUALIFICATION case2
|
|
||||||
* setLeagueForPlayers__FROM_LEAGUES case3
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
$previousSeason = Season::getPrevious();
|
|
||||||
$currentSeason = Season::getCurrent();
|
|
||||||
$users = User::getActives();
|
|
||||||
|
|
||||||
if (!$previousSeason) {
|
|
||||||
// case 1: first season ever, no previous season exists, qualification (league-rank=4)
|
|
||||||
} elseif (Season::hasQualification($previousSeason->id)){
|
|
||||||
// case 2: previous season was qualification season (rank 4)
|
|
||||||
} else { /*case 3 - default: determine league-ranks 1,2,3 from previous Season rank verwenden*/
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 2 Möglichkeiten:
|
|
||||||
// 1.) previousSeason hat rank=4 => Qualification Round
|
|
||||||
// 2.) sonst aus .
|
|
||||||
|
|
||||||
|
|
||||||
$usersLastSeason = User::getActives($previousSeason->id);
|
|
||||||
|
|
||||||
$league1 = League::getUnifiedRanking(1, $previousSeason->id);
|
|
||||||
$league2 = League::getUnifiedRanking( 2, $previousSeason->id);
|
|
||||||
$league3 = League::getUnifiedRanking( 3, $previousSeason->id);
|
|
||||||
//$lastLeagues = League::where('season_id','=',$previousSeason->id)->get();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
foreach ($users as $index => $user) {
|
|
||||||
|
|
||||||
$found = false;
|
|
||||||
foreach ($usersLastSeason as $userLastSeason) {
|
|
||||||
if ($userLastSeason->id == $user->id) $found = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$found) {
|
|
||||||
$users[$index]['rank']=League::RANK_LEAGUE3; // In der letzten Season unter den Actives nicht gefunden
|
|
||||||
$leagueMember = LeagueMember::create([
|
|
||||||
'user_id' => $user->id,
|
|
||||||
'league_id' => $league3->id
|
|
||||||
]);
|
|
||||||
$leagueMember->save();
|
|
||||||
} else {
|
|
||||||
|
|
||||||
// League1, 1-16: RANK_LEAGUE1
|
|
||||||
// League1, 17-22: RANK_LEAGUE2
|
|
||||||
// League2, 1-6: RANK_LEAGUE1
|
|
||||||
// League2, 7-16: RANK_LEAGUE2
|
|
||||||
// League2, 17-22: RANK_LEAGUE3
|
|
||||||
// League3, best6: RANK_LEAGUE2
|
|
||||||
// League3, 7-end: RANK_LEAGUE3
|
|
||||||
//
|
|
||||||
|
|
||||||
//alte Ligen durchsuchen und entsprechend einordnen
|
|
||||||
foreach($league1 as $index => $entry) {
|
|
||||||
$userId = $entry[0];
|
|
||||||
$score = $entry[1];
|
|
||||||
$goals = $entry[2];
|
|
||||||
$cGoals = $entry[3];
|
|
||||||
$leagueId = -1;
|
|
||||||
if ($user->id == $userId) {
|
|
||||||
$rank=-1;
|
|
||||||
if ($index<16) {
|
|
||||||
$rank=1;
|
|
||||||
$leagueId=$league1->id;
|
|
||||||
} else {
|
|
||||||
$rank=2;
|
|
||||||
$leagueId=$league2->id;
|
|
||||||
}
|
|
||||||
$leagueMember = LeagueMember::create([
|
|
||||||
'user_id' => $userId,
|
|
||||||
'league_id' => $leagueId
|
|
||||||
]);
|
|
||||||
$leagueMember->save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach($league2 as $index => $entry) {
|
|
||||||
$userId = $entry[0];
|
|
||||||
$score = $entry[1];
|
|
||||||
$goals = $entry[2];
|
|
||||||
$cGoals = $entry[3];
|
|
||||||
$leagueId = -1;
|
|
||||||
if ($user->id == $userId) {
|
|
||||||
$rank=-1;
|
|
||||||
$leagueId=$league1->id;
|
|
||||||
if ($index<6) {
|
|
||||||
$rank=1;
|
|
||||||
} elseif ($index<16) {
|
|
||||||
$rank=2;
|
|
||||||
$leagueId=$league2->id;
|
|
||||||
} else {
|
|
||||||
$rank=3;
|
|
||||||
$leagueId=$league3->id;
|
|
||||||
}
|
|
||||||
$leagueMember = LeagueMember::create([
|
|
||||||
'user_id' => $userId,
|
|
||||||
'league_id' => $leagueId
|
|
||||||
]);
|
|
||||||
$leagueMember->save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach($league3 as $index => $entry) {
|
|
||||||
$userId = $entry[0];
|
|
||||||
$score = $entry[1];
|
|
||||||
$goals = $entry[2];
|
|
||||||
$cGoals = $entry[3];
|
|
||||||
if ($user->id == $userId) {
|
|
||||||
$rank=-1;
|
|
||||||
if ($index<6) {
|
|
||||||
$rank=2;
|
|
||||||
$leagueId=$league2->id;
|
|
||||||
} else {
|
|
||||||
$rank=3;
|
|
||||||
$leagueId=$league3->id;
|
|
||||||
}
|
|
||||||
$leagueMember = LeagueMember::create([
|
|
||||||
'user_id' => $userId,
|
|
||||||
'league_id' => $leagueId
|
|
||||||
]);
|
|
||||||
$leagueMember->save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Leagues;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
use App\User;
|
|
||||||
|
|
||||||
class LeagueMember extends Model
|
|
||||||
{
|
|
||||||
protected $table ='leagues_members';
|
|
||||||
protected $fillable = [
|
|
||||||
'id','user_id','league_id'
|
|
||||||
];
|
|
||||||
//
|
|
||||||
|
|
||||||
public static function getMembers($league_id) {
|
|
||||||
$members =LeagueMember::where('league_id','=',$league_id)->orderBy('id')->get();
|
|
||||||
$userList=array();
|
|
||||||
foreach($members as $member) {
|
|
||||||
array_push($userList,$member->user_id);
|
|
||||||
}
|
|
||||||
return $userList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function playsInRound($userId, $roundId, $leagueId) {
|
|
||||||
$matches1 = Match::where('user1_id','=',$userId)->where('round_id','=',$roundId)->where('league_id','=',$leagueId)->get();
|
|
||||||
if (sizeof($matches1)>0) return true;
|
|
||||||
|
|
||||||
|
|
||||||
$matches2 = Match::where('user2_id','=',$userId)->where('round_id','=',$roundId)->where('league_id','=',$leagueId)->get();
|
|
||||||
return sizeof($matches2)>0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,329 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Leagues;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
use App\Leagues\League;
|
|
||||||
use App\Leagues\LeagueMember;
|
|
||||||
|
|
||||||
use App\User;
|
|
||||||
use App\Round;
|
|
||||||
use App\Season;
|
|
||||||
use App\Tipp;
|
|
||||||
|
|
||||||
use Log;
|
|
||||||
use DB;
|
|
||||||
|
|
||||||
class Match extends Model
|
|
||||||
{
|
|
||||||
protected $table ='leagues_matches';
|
|
||||||
protected $fillable = [
|
|
||||||
'id','league_id','round_id','user1_id','user2_id'
|
|
||||||
];
|
|
||||||
|
|
||||||
// https://en.wikipedia.org/wiki/Round-robin_tournament
|
|
||||||
public static function createMatchups()
|
|
||||||
|
|
||||||
{ // should be restricted to league ranks 1,2,3 and 4. All other leagues will have to use some
|
|
||||||
// incremental matchmaking system.
|
|
||||||
|
|
||||||
Log::info("Match::Creating matchups()");
|
|
||||||
$currentSeason = Season::getCurrent();
|
|
||||||
$leagues = League::where('season_id', '=', $currentSeason->id)->get();
|
|
||||||
foreach ($leagues as $league) {
|
|
||||||
error_log("Match::createMatchups league_id=".$league->id);
|
|
||||||
Log::info("Match::createMatchups: Creating matchups for league_id=".$league->id);
|
|
||||||
// Wenn es keine previous League gibt, dann ist $league->rank immer RANK_QUALIFICATION,
|
|
||||||
// ansonsten ist es einer von RANK_LEAGUE1, RANK_LEAGUE2, RANK_LEAGUE3
|
|
||||||
|
|
||||||
Log::info("rank_id of league_id ".$league->id." = ".$league->rank);
|
|
||||||
|
|
||||||
if ($league->rank <= League::RANK_QUALIFICATION) {
|
|
||||||
|
|
||||||
$rounds = Round::where('id','>=',$league->start_round_id)->get();
|
|
||||||
|
|
||||||
error_log("Match::createMatchups. start_round_id = ".$league->start_round_id);
|
|
||||||
|
|
||||||
$roundNr=1;
|
|
||||||
$neededRoundCount = Match::getNumberOfNeededRounds($league->id);
|
|
||||||
|
|
||||||
Log::info("Match::createMatchups( league_id=".$league->id.", numberOfrounds=".sizeof($rounds));
|
|
||||||
$allPairings=Match::getAllPairings($league->id);
|
|
||||||
|
|
||||||
Log::info("Match::createMatchups: Rounds:");
|
|
||||||
$counter=1;
|
|
||||||
foreach($rounds as $round) {
|
|
||||||
Log::info($counter);
|
|
||||||
Log::info($round."\n");
|
|
||||||
$counter+=1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Log::info("Match::createMatchups: League-id=".$league->id.", Size of allPairings:".sizeof($allPairings));
|
|
||||||
foreach ($rounds as $round) {
|
|
||||||
Log::info("Match::createMatchups: Fetching roundNr/index=".$roundNr);
|
|
||||||
$pairings = $allPairings[$roundNr];
|
|
||||||
// Save pairings
|
|
||||||
foreach($pairings as $pair) {
|
|
||||||
Log::info("Match::createMatchups: Saving match. " . $pair[0] . " vs " . $pair[1] . " roundid=" . $round->id);
|
|
||||||
$newMatch = Match::create([
|
|
||||||
'league_id' => $league->id,
|
|
||||||
'round_id' => $round->id,
|
|
||||||
'user1_id' => $pair[0],
|
|
||||||
'user2_id' => $pair[1]
|
|
||||||
]);
|
|
||||||
$newMatch->save();
|
|
||||||
//Log::info("Saving match: league_id=".$league->id.", round_id=".$round->id.", ".$pair[0]." vs ".$pair[2]);
|
|
||||||
}
|
|
||||||
$roundNr += 1;
|
|
||||||
if ($roundNr > $neededRoundCount) break;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {Log::info("Match::createMatchups: Skipped match creation because of unfitting rank=".$league->rank);}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function hasMatched($user1_id, $user2_id, $league_id)
|
|
||||||
{
|
|
||||||
$matches = DB::table('leagues_matches')
|
|
||||||
->where('league_id', '=', $league_id)
|
|
||||||
->where('user1_id', '=', $user1_id)
|
|
||||||
->where('user2_id', '=', $user2_id)
|
|
||||||
->get();
|
|
||||||
if (sizeof($matches)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$matches = DB::table('leagues_matches')
|
|
||||||
->where('league_id', '=', $league_id)
|
|
||||||
->where('user1_id', '=', $user2_id)
|
|
||||||
->where('user2_id', '=', $user1_id)
|
|
||||||
->get();
|
|
||||||
if (sizeof($matches)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Selektiert nur die "Heimspiele"
|
|
||||||
public static function getMatches($user_id, $league_id) {
|
|
||||||
$matches = DB::table('leagues_matches')->where('league_id', '=', $league_id)->where('user1_id','=',$user_id)->get();
|
|
||||||
return $matches;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static function getLeagueMatches($leagueId) {
|
|
||||||
//error_log("App\Match::getLeagueMatches(leagueId=".$leagueId.")");
|
|
||||||
$matches = DB::table('leagues_matches')->where('league_id','=',$leagueId)->orderBy('round_id')->get();
|
|
||||||
$league=League::where('id','=',$leagueId)->first();
|
|
||||||
$season = Season::where('id','=',$league->season_id)->first();
|
|
||||||
$roundnames = Round::getNames($season->id);
|
|
||||||
$usernames = User::getNames();
|
|
||||||
|
|
||||||
foreach($matches as $match) {
|
|
||||||
//error_log("Needed round_id: ".$match->round_id);
|
|
||||||
$match->round_name = $roundnames[$match->round_id];
|
|
||||||
$match->user1_name = $usernames[$match->user1_id];
|
|
||||||
$match->user2_name = $usernames[$match->user2_id];
|
|
||||||
// Punktauswertung in Match::getMatchResults($leagueId, $maxRoundId);
|
|
||||||
}
|
|
||||||
return $matches;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Hier findet RoundRobin statt.
|
|
||||||
public static function getAllPairings($leagueId) {
|
|
||||||
Log::info("GetAllPairings for LeagueId=".$leagueId);
|
|
||||||
$members = LeagueMember::getMembers($leagueId);
|
|
||||||
|
|
||||||
$roundCount=Match::getNumberOfNeededRounds($leagueId);
|
|
||||||
|
|
||||||
if (sizeof($members) % 2 == 1) { // ungerade memberzahl => freilos einfügen
|
|
||||||
error_log("Adding -1 free entry");
|
|
||||||
Log::info("Adding -1 free entry");
|
|
||||||
array_push($members,-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
shuffle($members);
|
|
||||||
error_log("Number of members:".sizeof($members));
|
|
||||||
Log::info("Number of members.".sizeof($members));
|
|
||||||
$pairingCount = Match::getNumberOfPairingsPerRound($leagueId);
|
|
||||||
|
|
||||||
error_log("pairingCount=".$pairingCount);
|
|
||||||
Log::info("pairingCount=".$pairingCount);
|
|
||||||
$all = array();
|
|
||||||
|
|
||||||
for ($currentRoundNr=1; $currentRoundNr<= $roundCount; $currentRoundNr++) {
|
|
||||||
|
|
||||||
$roundRobin = array();
|
|
||||||
foreach ($members as $userId) {
|
|
||||||
array_push($roundRobin, $userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
//error_log("RoundNr ".$currentRoundNr." Array start:");
|
|
||||||
//error_log(implode(",",$roundRobin));
|
|
||||||
Log::info("RoundNr ".$currentRoundNr." Array start:");
|
|
||||||
Log::info(implode(",",$roundRobin));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$_roundNr = $currentRoundNr;
|
|
||||||
while ($_roundNr >= 1) {
|
|
||||||
// Round-Robin shift: First element stays, rest rotates
|
|
||||||
$first = array_shift($roundRobin); // Erstes Element sichern & entfernen
|
|
||||||
$last = array_pop($roundRobin); // Letztes Element sichern & entfernen
|
|
||||||
array_unshift($roundRobin, $last); // Vorne einfügen
|
|
||||||
array_unshift($roundRobin, $first); // Vorne einfügen
|
|
||||||
$_roundNr--;
|
|
||||||
}
|
|
||||||
|
|
||||||
//error_log("RoundNr ".$currentRoundNr." Array end:");
|
|
||||||
//error_log(implode(",",$roundRobin));
|
|
||||||
Log::info("RoundNr ".$currentRoundNr." Array end:");
|
|
||||||
Log::info(implode(",",$roundRobin));
|
|
||||||
|
|
||||||
$idx = 0;
|
|
||||||
$slot = 0;
|
|
||||||
$pairings = array();
|
|
||||||
foreach ($roundRobin as $index => $userId) {
|
|
||||||
$idx = $index;
|
|
||||||
if ($index >= $pairingCount) {
|
|
||||||
$idx = 2 * $pairingCount - $index - 1;
|
|
||||||
$slot = 1;
|
|
||||||
}
|
|
||||||
$pairings[$idx][$slot] = $userId;
|
|
||||||
//error_log($idx.",".$slot." => ".$userId);
|
|
||||||
Log::info($idx.",".$slot." => ".$userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Matches die nur einen Teilnehmer haben entfernen. Passiert bei ungerader Teilnehmerzahl.
|
|
||||||
// Der nicht im Pairing befindliche Spieler hat einen spielfreien Tag.
|
|
||||||
|
|
||||||
//error_log(" Cleaning up Round pairings");
|
|
||||||
Log::info("Cleaning up Round pairings");
|
|
||||||
$pairings_clean=array();
|
|
||||||
//error_log(":".$pairings[0]);
|
|
||||||
foreach($pairings as $idx => $pairing) {
|
|
||||||
|
|
||||||
if ($pairing[0] == -1 || $pairing[1] == -1) {
|
|
||||||
//error_log("DONT ADD");
|
|
||||||
Log::info("DONT ADD");
|
|
||||||
} else {
|
|
||||||
//error_log("adding...");
|
|
||||||
Log::info("adding...");
|
|
||||||
$pairings_clean[$idx] = $pairing;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$all[$currentRoundNr]=$pairings_clean;
|
|
||||||
//$all[$currentRoundNr]=$pairings;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($all as $roundNr => $pairings) {
|
|
||||||
foreach ($pairings as $slotIdx => $pairing) {
|
|
||||||
error_log($pairing[0]." vs ".$pairing[1]);
|
|
||||||
Log::info($pairing[0]." vs ".$pairing[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $all; // $all[$roundnr]= Array of Tuples ( UserId1, UserId2 )
|
|
||||||
//return null;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getNumberOfPairingsPerRound($leagueId) {
|
|
||||||
$members = LeagueMember::getMembers($leagueId);
|
|
||||||
$pairingsPerRound = intdiv(sizeof($members),2);
|
|
||||||
if (sizeof($members)-$pairingsPerRound*2) {
|
|
||||||
$pairingsPerRound+=1;
|
|
||||||
}
|
|
||||||
return $pairingsPerRound;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getNumberOfNeededRounds($leagueId) {
|
|
||||||
$members = LeagueMember::getMembers($leagueId);
|
|
||||||
$memberCount = sizeof($members);
|
|
||||||
|
|
||||||
if ($memberCount % 2 == 1) { return $memberCount; } // 1 Runde mehr wg. Freilos für 1 Spieler
|
|
||||||
return $memberCount-1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getMatchResults($leagueId, $maxRoundId=-1) {
|
|
||||||
|
|
||||||
$league=League::where('id','=',$leagueId)->first();
|
|
||||||
$season=Season::where('id','=',$league->season_id)->first();
|
|
||||||
|
|
||||||
$roundtipps = Tipp::getRoundTipps($maxRoundId, $season->id);
|
|
||||||
$roundtipps = $roundtipps["roundtipps"];
|
|
||||||
$matches = Match::getLeagueMatches($leagueId, $maxRoundId);
|
|
||||||
|
|
||||||
if ($maxRoundId==-1) {
|
|
||||||
//$maxRoundId = Round::getLastRoundId($season->id);
|
|
||||||
$maxRoundId = Round::getLastLockedRoundId($season->id);
|
|
||||||
Log::info("LASTLOCKEDROUND_ID=".$maxRoundId);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach($matches as $key => $match) {
|
|
||||||
|
|
||||||
$user1_key = $match->round_id."_".$match->user1_id;
|
|
||||||
$user2_key = $match->round_id."_".$match->user2_id;
|
|
||||||
|
|
||||||
if (array_key_exists($user1_key,$roundtipps ) && array_key_exists($user2_key,$roundtipps) ) {
|
|
||||||
|
|
||||||
$user1_score = $roundtipps[$user1_key]["rankscore"];
|
|
||||||
$user2_score = $roundtipps[$user2_key]["rankscore"];
|
|
||||||
|
|
||||||
$matches[$key]->user1_rankscore = $user1_score;
|
|
||||||
$matches[$key]->user2_rankscore = $user2_score;
|
|
||||||
|
|
||||||
//$matches[$key]->user1_hits = $roundtipps[$user1_key][]
|
|
||||||
|
|
||||||
if ($user1_score > $user2_score) {
|
|
||||||
$matches[$key]->user1_league_score = 3;
|
|
||||||
$matches[$key]->user2_league_score = 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
else if ($user1_score < $user2_score){
|
|
||||||
$matches[$key]->user1_league_score = 0;
|
|
||||||
$matches[$key]->user2_league_score = 3;
|
|
||||||
} else {
|
|
||||||
$matches[$key]->user1_league_score = 1;
|
|
||||||
$matches[$key]->user2_league_score = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else { // Untipped/future round
|
|
||||||
$matches[$key]->user1_league_score = 0;
|
|
||||||
$matches[$key]->user2_league_score = 0;
|
|
||||||
$matches[$key]->user1_rankscore = -1;
|
|
||||||
$matches[$key]->user2_rankscore = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return $matches;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getMatchResultsForUser($userId, $maxRoundId=-1) {
|
|
||||||
$season = Season::getCurrent();
|
|
||||||
$leagues = League::where('season_id','=',$season->id)->get();
|
|
||||||
|
|
||||||
$matchList=array();
|
|
||||||
|
|
||||||
foreach($leagues as $league) {
|
|
||||||
$member=LeagueMember::where('league_id','=',$league->id)->where('user_id','=',$userId)->first();
|
|
||||||
if ($member) {
|
|
||||||
// $userId ist member dieser League
|
|
||||||
$matchResults = Match::getMatchResults($league->id,$maxRoundId);
|
|
||||||
foreach($matchResults as $result) {
|
|
||||||
if ($result->user1_id == $userId || $result->user2_id==$userId) {
|
|
||||||
array_push($matchList, $result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $matchList;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Binary file not shown.
7
pfosten/vendor/autoload.php
vendored
7
pfosten/vendor/autoload.php
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
// autoload.php @generated by Composer
|
|
||||||
|
|
||||||
require_once __DIR__ . '/composer/autoload_real.php';
|
|
||||||
|
|
||||||
return ComposerAutoloaderInita19fb0695e1b61b4feeb3cc3fbdd2feb::getLoader();
|
|
||||||
1
pfosten/vendor/bin/php-parse
vendored
1
pfosten/vendor/bin/php-parse
vendored
|
|
@ -1 +0,0 @@
|
||||||
../nikic/php-parser/bin/php-parse
|
|
||||||
1
pfosten/vendor/bin/phpunit
vendored
1
pfosten/vendor/bin/phpunit
vendored
|
|
@ -1 +0,0 @@
|
||||||
../phpunit/phpunit/phpunit
|
|
||||||
1
pfosten/vendor/bin/psysh
vendored
1
pfosten/vendor/bin/psysh
vendored
|
|
@ -1 +0,0 @@
|
||||||
../psy/psysh/bin/psysh
|
|
||||||
445
pfosten/vendor/composer/ClassLoader.php
vendored
445
pfosten/vendor/composer/ClassLoader.php
vendored
|
|
@ -1,445 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file is part of Composer.
|
|
||||||
*
|
|
||||||
* (c) Nils Adermann <naderman@naderman.de>
|
|
||||||
* Jordi Boggiano <j.boggiano@seld.be>
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Composer\Autoload;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
|
||||||
*
|
|
||||||
* $loader = new \Composer\Autoload\ClassLoader();
|
|
||||||
*
|
|
||||||
* // register classes with namespaces
|
|
||||||
* $loader->add('Symfony\Component', __DIR__.'/component');
|
|
||||||
* $loader->add('Symfony', __DIR__.'/framework');
|
|
||||||
*
|
|
||||||
* // activate the autoloader
|
|
||||||
* $loader->register();
|
|
||||||
*
|
|
||||||
* // to enable searching the include path (eg. for PEAR packages)
|
|
||||||
* $loader->setUseIncludePath(true);
|
|
||||||
*
|
|
||||||
* In this example, if you try to use a class in the Symfony\Component
|
|
||||||
* namespace or one of its children (Symfony\Component\Console for instance),
|
|
||||||
* the autoloader will first look for the class under the component/
|
|
||||||
* directory, and it will then fallback to the framework/ directory if not
|
|
||||||
* found before giving up.
|
|
||||||
*
|
|
||||||
* This class is loosely based on the Symfony UniversalClassLoader.
|
|
||||||
*
|
|
||||||
* @author Fabien Potencier <fabien@symfony.com>
|
|
||||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
|
||||||
* @see http://www.php-fig.org/psr/psr-0/
|
|
||||||
* @see http://www.php-fig.org/psr/psr-4/
|
|
||||||
*/
|
|
||||||
class ClassLoader
|
|
||||||
{
|
|
||||||
// PSR-4
|
|
||||||
private $prefixLengthsPsr4 = array();
|
|
||||||
private $prefixDirsPsr4 = array();
|
|
||||||
private $fallbackDirsPsr4 = array();
|
|
||||||
|
|
||||||
// PSR-0
|
|
||||||
private $prefixesPsr0 = array();
|
|
||||||
private $fallbackDirsPsr0 = array();
|
|
||||||
|
|
||||||
private $useIncludePath = false;
|
|
||||||
private $classMap = array();
|
|
||||||
private $classMapAuthoritative = false;
|
|
||||||
private $missingClasses = array();
|
|
||||||
private $apcuPrefix;
|
|
||||||
|
|
||||||
public function getPrefixes()
|
|
||||||
{
|
|
||||||
if (!empty($this->prefixesPsr0)) {
|
|
||||||
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getPrefixesPsr4()
|
|
||||||
{
|
|
||||||
return $this->prefixDirsPsr4;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getFallbackDirs()
|
|
||||||
{
|
|
||||||
return $this->fallbackDirsPsr0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getFallbackDirsPsr4()
|
|
||||||
{
|
|
||||||
return $this->fallbackDirsPsr4;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getClassMap()
|
|
||||||
{
|
|
||||||
return $this->classMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $classMap Class to filename map
|
|
||||||
*/
|
|
||||||
public function addClassMap(array $classMap)
|
|
||||||
{
|
|
||||||
if ($this->classMap) {
|
|
||||||
$this->classMap = array_merge($this->classMap, $classMap);
|
|
||||||
} else {
|
|
||||||
$this->classMap = $classMap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers a set of PSR-0 directories for a given prefix, either
|
|
||||||
* appending or prepending to the ones previously set for this prefix.
|
|
||||||
*
|
|
||||||
* @param string $prefix The prefix
|
|
||||||
* @param array|string $paths The PSR-0 root directories
|
|
||||||
* @param bool $prepend Whether to prepend the directories
|
|
||||||
*/
|
|
||||||
public function add($prefix, $paths, $prepend = false)
|
|
||||||
{
|
|
||||||
if (!$prefix) {
|
|
||||||
if ($prepend) {
|
|
||||||
$this->fallbackDirsPsr0 = array_merge(
|
|
||||||
(array) $paths,
|
|
||||||
$this->fallbackDirsPsr0
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$this->fallbackDirsPsr0 = array_merge(
|
|
||||||
$this->fallbackDirsPsr0,
|
|
||||||
(array) $paths
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$first = $prefix[0];
|
|
||||||
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
|
||||||
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ($prepend) {
|
|
||||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
|
||||||
(array) $paths,
|
|
||||||
$this->prefixesPsr0[$first][$prefix]
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
|
||||||
$this->prefixesPsr0[$first][$prefix],
|
|
||||||
(array) $paths
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers a set of PSR-4 directories for a given namespace, either
|
|
||||||
* appending or prepending to the ones previously set for this namespace.
|
|
||||||
*
|
|
||||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
|
||||||
* @param array|string $paths The PSR-4 base directories
|
|
||||||
* @param bool $prepend Whether to prepend the directories
|
|
||||||
*
|
|
||||||
* @throws \InvalidArgumentException
|
|
||||||
*/
|
|
||||||
public function addPsr4($prefix, $paths, $prepend = false)
|
|
||||||
{
|
|
||||||
if (!$prefix) {
|
|
||||||
// Register directories for the root namespace.
|
|
||||||
if ($prepend) {
|
|
||||||
$this->fallbackDirsPsr4 = array_merge(
|
|
||||||
(array) $paths,
|
|
||||||
$this->fallbackDirsPsr4
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$this->fallbackDirsPsr4 = array_merge(
|
|
||||||
$this->fallbackDirsPsr4,
|
|
||||||
(array) $paths
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
|
||||||
// Register directories for a new namespace.
|
|
||||||
$length = strlen($prefix);
|
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
|
||||||
}
|
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
|
||||||
} elseif ($prepend) {
|
|
||||||
// Prepend directories for an already registered namespace.
|
|
||||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
|
||||||
(array) $paths,
|
|
||||||
$this->prefixDirsPsr4[$prefix]
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
// Append directories for an already registered namespace.
|
|
||||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
|
||||||
$this->prefixDirsPsr4[$prefix],
|
|
||||||
(array) $paths
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers a set of PSR-0 directories for a given prefix,
|
|
||||||
* replacing any others previously set for this prefix.
|
|
||||||
*
|
|
||||||
* @param string $prefix The prefix
|
|
||||||
* @param array|string $paths The PSR-0 base directories
|
|
||||||
*/
|
|
||||||
public function set($prefix, $paths)
|
|
||||||
{
|
|
||||||
if (!$prefix) {
|
|
||||||
$this->fallbackDirsPsr0 = (array) $paths;
|
|
||||||
} else {
|
|
||||||
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers a set of PSR-4 directories for a given namespace,
|
|
||||||
* replacing any others previously set for this namespace.
|
|
||||||
*
|
|
||||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
|
||||||
* @param array|string $paths The PSR-4 base directories
|
|
||||||
*
|
|
||||||
* @throws \InvalidArgumentException
|
|
||||||
*/
|
|
||||||
public function setPsr4($prefix, $paths)
|
|
||||||
{
|
|
||||||
if (!$prefix) {
|
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
|
||||||
} else {
|
|
||||||
$length = strlen($prefix);
|
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
|
||||||
}
|
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Turns on searching the include path for class files.
|
|
||||||
*
|
|
||||||
* @param bool $useIncludePath
|
|
||||||
*/
|
|
||||||
public function setUseIncludePath($useIncludePath)
|
|
||||||
{
|
|
||||||
$this->useIncludePath = $useIncludePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Can be used to check if the autoloader uses the include path to check
|
|
||||||
* for classes.
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function getUseIncludePath()
|
|
||||||
{
|
|
||||||
return $this->useIncludePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Turns off searching the prefix and fallback directories for classes
|
|
||||||
* that have not been registered with the class map.
|
|
||||||
*
|
|
||||||
* @param bool $classMapAuthoritative
|
|
||||||
*/
|
|
||||||
public function setClassMapAuthoritative($classMapAuthoritative)
|
|
||||||
{
|
|
||||||
$this->classMapAuthoritative = $classMapAuthoritative;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Should class lookup fail if not found in the current class map?
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function isClassMapAuthoritative()
|
|
||||||
{
|
|
||||||
return $this->classMapAuthoritative;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
|
||||||
*
|
|
||||||
* @param string|null $apcuPrefix
|
|
||||||
*/
|
|
||||||
public function setApcuPrefix($apcuPrefix)
|
|
||||||
{
|
|
||||||
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The APCu prefix in use, or null if APCu caching is not enabled.
|
|
||||||
*
|
|
||||||
* @return string|null
|
|
||||||
*/
|
|
||||||
public function getApcuPrefix()
|
|
||||||
{
|
|
||||||
return $this->apcuPrefix;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers this instance as an autoloader.
|
|
||||||
*
|
|
||||||
* @param bool $prepend Whether to prepend the autoloader or not
|
|
||||||
*/
|
|
||||||
public function register($prepend = false)
|
|
||||||
{
|
|
||||||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unregisters this instance as an autoloader.
|
|
||||||
*/
|
|
||||||
public function unregister()
|
|
||||||
{
|
|
||||||
spl_autoload_unregister(array($this, 'loadClass'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Loads the given class or interface.
|
|
||||||
*
|
|
||||||
* @param string $class The name of the class
|
|
||||||
* @return bool|null True if loaded, null otherwise
|
|
||||||
*/
|
|
||||||
public function loadClass($class)
|
|
||||||
{
|
|
||||||
if ($file = $this->findFile($class)) {
|
|
||||||
includeFile($file);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Finds the path to the file where the class is defined.
|
|
||||||
*
|
|
||||||
* @param string $class The name of the class
|
|
||||||
*
|
|
||||||
* @return string|false The path if found, false otherwise
|
|
||||||
*/
|
|
||||||
public function findFile($class)
|
|
||||||
{
|
|
||||||
// class map lookup
|
|
||||||
if (isset($this->classMap[$class])) {
|
|
||||||
return $this->classMap[$class];
|
|
||||||
}
|
|
||||||
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (null !== $this->apcuPrefix) {
|
|
||||||
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
|
|
||||||
if ($hit) {
|
|
||||||
return $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$file = $this->findFileWithExtension($class, '.php');
|
|
||||||
|
|
||||||
// Search for Hack files if we are running on HHVM
|
|
||||||
if (false === $file && defined('HHVM_VERSION')) {
|
|
||||||
$file = $this->findFileWithExtension($class, '.hh');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null !== $this->apcuPrefix) {
|
|
||||||
apcu_add($this->apcuPrefix.$class, $file);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (false === $file) {
|
|
||||||
// Remember that this class does not exist.
|
|
||||||
$this->missingClasses[$class] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $file;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function findFileWithExtension($class, $ext)
|
|
||||||
{
|
|
||||||
// PSR-4 lookup
|
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
|
||||||
|
|
||||||
$first = $class[0];
|
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
|
||||||
$subPath = $class;
|
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
|
||||||
$search = $subPath . '\\';
|
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
|
||||||
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
|
||||||
if (file_exists($file = $dir . $pathEnd)) {
|
|
||||||
return $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// PSR-4 fallback dirs
|
|
||||||
foreach ($this->fallbackDirsPsr4 as $dir) {
|
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
|
||||||
return $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// PSR-0 lookup
|
|
||||||
if (false !== $pos = strrpos($class, '\\')) {
|
|
||||||
// namespaced class name
|
|
||||||
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
|
||||||
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
|
||||||
} else {
|
|
||||||
// PEAR-like class name
|
|
||||||
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($this->prefixesPsr0[$first])) {
|
|
||||||
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
|
||||||
if (0 === strpos($class, $prefix)) {
|
|
||||||
foreach ($dirs as $dir) {
|
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
|
||||||
return $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// PSR-0 fallback dirs
|
|
||||||
foreach ($this->fallbackDirsPsr0 as $dir) {
|
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
|
||||||
return $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// PSR-0 include paths.
|
|
||||||
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
|
||||||
return $file;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Scope isolated include.
|
|
||||||
*
|
|
||||||
* Prevents access to $this/self from included files.
|
|
||||||
*/
|
|
||||||
function includeFile($file)
|
|
||||||
{
|
|
||||||
include $file;
|
|
||||||
}
|
|
||||||
21
pfosten/vendor/composer/LICENSE
vendored
21
pfosten/vendor/composer/LICENSE
vendored
|
|
@ -1,21 +0,0 @@
|
||||||
|
|
||||||
Copyright (c) Nils Adermann, Jordi Boggiano
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is furnished
|
|
||||||
to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
560
pfosten/vendor/composer/autoload_classmap.php
vendored
560
pfosten/vendor/composer/autoload_classmap.php
vendored
|
|
@ -1,560 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
// autoload_classmap.php @generated by Composer
|
|
||||||
|
|
||||||
$vendorDir = dirname(dirname(__FILE__));
|
|
||||||
$baseDir = dirname($vendorDir);
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'AddMaxIdenticalJokertippsToSeasons' => $baseDir . '/database/migrations/2020_01_08_120739_add_max_identical_jokertipps_to_seasons.php',
|
|
||||||
'AddMobileFieldToUsers' => $baseDir . '/database/migrations/2020_01_14_131714_add_mobile_field_to_users.php',
|
|
||||||
'AddReminderfieldToUsers' => $baseDir . '/database/migrations/2017_08_28_110358_add_reminderfield_to_users.php',
|
|
||||||
'CreateGamesTable' => $baseDir . '/database/migrations/2017_06_19_112641_create_games_table.php',
|
|
||||||
'CreateLeaguesTable' => $baseDir . '/database/migrations/2017_09_08_095721_create_leagues_table.php',
|
|
||||||
'CreateManualPayoutsTable' => $baseDir . '/database/migrations/2018_01_15_140815_create_manual_payouts_table.php',
|
|
||||||
'CreateMatchesTable' => $baseDir . '/database/migrations/2017_09_08_095740_create_matches_table.php',
|
|
||||||
'CreatePasswordResetsTable' => $baseDir . '/database/migrations/2014_10_12_100000_create_password_resets_table.php',
|
|
||||||
'CreatePaymentsTable' => $baseDir . '/database/migrations/2017_06_19_112638_create_payments_table.php',
|
|
||||||
'CreateQuotasTable' => $baseDir . '/database/migrations/2017_08_16_164654_create_quotas_table.php',
|
|
||||||
'CreateRoundmailsTable' => $baseDir . '/database/migrations/2017_08_22_111913_create_roundmails_table.php',
|
|
||||||
'CreateRoundsTable' => $baseDir . '/database/migrations/2017_06_19_112646_create_rounds_table.php',
|
|
||||||
'CreateSeasonsTable' => $baseDir . '/database/migrations/2017_06_19_112652_create_seasons_table.php',
|
|
||||||
'CreateSettingsTable' => $baseDir . '/database/migrations/2017_06_19_112625_create_settings_table.php',
|
|
||||||
'CreateTippsTable' => $baseDir . '/database/migrations/2017_06_19_112632_create_tipps_table.php',
|
|
||||||
'CreateUsersTable' => $baseDir . '/database/migrations/2014_10_12_000000_create_users_table.php',
|
|
||||||
'DatabaseSeeder' => $baseDir . '/database/seeds/DatabaseSeeder.php',
|
|
||||||
'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php',
|
|
||||||
'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php',
|
|
||||||
'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArray' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArrayContaining' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArrayContainingInAnyOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArrayContainingInOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArrayContainingKey' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArrayContainingKeyValuePair' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArrayWithSize' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php',
|
|
||||||
'Hamcrest\\Arrays\\MatchingOnce' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/MatchingOnce.php',
|
|
||||||
'Hamcrest\\Arrays\\SeriesMatchingOnce' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php',
|
|
||||||
'Hamcrest\\AssertionError' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php',
|
|
||||||
'Hamcrest\\BaseDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseDescription.php',
|
|
||||||
'Hamcrest\\BaseMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php',
|
|
||||||
'Hamcrest\\Collection\\IsEmptyTraversable' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php',
|
|
||||||
'Hamcrest\\Collection\\IsTraversableWithSize' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php',
|
|
||||||
'Hamcrest\\Core\\AllOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AllOf.php',
|
|
||||||
'Hamcrest\\Core\\AnyOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php',
|
|
||||||
'Hamcrest\\Core\\CombinableMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php',
|
|
||||||
'Hamcrest\\Core\\DescribedAs' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php',
|
|
||||||
'Hamcrest\\Core\\Every' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php',
|
|
||||||
'Hamcrest\\Core\\HasToString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php',
|
|
||||||
'Hamcrest\\Core\\Is' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php',
|
|
||||||
'Hamcrest\\Core\\IsAnything' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php',
|
|
||||||
'Hamcrest\\Core\\IsCollectionContaining' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php',
|
|
||||||
'Hamcrest\\Core\\IsEqual' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php',
|
|
||||||
'Hamcrest\\Core\\IsIdentical' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php',
|
|
||||||
'Hamcrest\\Core\\IsInstanceOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php',
|
|
||||||
'Hamcrest\\Core\\IsNot' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php',
|
|
||||||
'Hamcrest\\Core\\IsNull' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php',
|
|
||||||
'Hamcrest\\Core\\IsSame' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php',
|
|
||||||
'Hamcrest\\Core\\IsTypeOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php',
|
|
||||||
'Hamcrest\\Core\\Set' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php',
|
|
||||||
'Hamcrest\\Core\\ShortcutCombination' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php',
|
|
||||||
'Hamcrest\\Description' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php',
|
|
||||||
'Hamcrest\\DiagnosingMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/DiagnosingMatcher.php',
|
|
||||||
'Hamcrest\\FeatureMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php',
|
|
||||||
'Hamcrest\\Internal\\SelfDescribingValue' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php',
|
|
||||||
'Hamcrest\\Matcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php',
|
|
||||||
'Hamcrest\\MatcherAssert' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php',
|
|
||||||
'Hamcrest\\Matchers' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php',
|
|
||||||
'Hamcrest\\NullDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php',
|
|
||||||
'Hamcrest\\Number\\IsCloseTo' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/IsCloseTo.php',
|
|
||||||
'Hamcrest\\Number\\OrderingComparison' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php',
|
|
||||||
'Hamcrest\\SelfDescribing' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php',
|
|
||||||
'Hamcrest\\StringDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/StringDescription.php',
|
|
||||||
'Hamcrest\\Text\\IsEmptyString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php',
|
|
||||||
'Hamcrest\\Text\\IsEqualIgnoringCase' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php',
|
|
||||||
'Hamcrest\\Text\\IsEqualIgnoringWhiteSpace' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php',
|
|
||||||
'Hamcrest\\Text\\MatchesPattern' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php',
|
|
||||||
'Hamcrest\\Text\\StringContains' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php',
|
|
||||||
'Hamcrest\\Text\\StringContainsIgnoringCase' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php',
|
|
||||||
'Hamcrest\\Text\\StringContainsInOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php',
|
|
||||||
'Hamcrest\\Text\\StringEndsWith' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php',
|
|
||||||
'Hamcrest\\Text\\StringStartsWith' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php',
|
|
||||||
'Hamcrest\\Text\\SubstringMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php',
|
|
||||||
'Hamcrest\\TypeSafeDiagnosingMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeDiagnosingMatcher.php',
|
|
||||||
'Hamcrest\\TypeSafeMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php',
|
|
||||||
'Hamcrest\\Type\\IsArray' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php',
|
|
||||||
'Hamcrest\\Type\\IsBoolean' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsBoolean.php',
|
|
||||||
'Hamcrest\\Type\\IsCallable' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsCallable.php',
|
|
||||||
'Hamcrest\\Type\\IsDouble' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsDouble.php',
|
|
||||||
'Hamcrest\\Type\\IsInteger' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsInteger.php',
|
|
||||||
'Hamcrest\\Type\\IsNumeric' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsNumeric.php',
|
|
||||||
'Hamcrest\\Type\\IsObject' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php',
|
|
||||||
'Hamcrest\\Type\\IsResource' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsResource.php',
|
|
||||||
'Hamcrest\\Type\\IsScalar' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsScalar.php',
|
|
||||||
'Hamcrest\\Type\\IsString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsString.php',
|
|
||||||
'Hamcrest\\Util' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php',
|
|
||||||
'Hamcrest\\Xml\\HasXPath' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php',
|
|
||||||
'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
|
|
||||||
'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php',
|
|
||||||
'PHPUnit\\Framework\\AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php',
|
|
||||||
'PHPUnit\\Framework\\BaseTestListener' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php',
|
|
||||||
'PHPUnit\\Framework\\Test' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/Test.php',
|
|
||||||
'PHPUnit\\Framework\\TestCase' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php',
|
|
||||||
'PHPUnit\\Framework\\TestListener' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/TestListener.php',
|
|
||||||
'PHPUnit\\Framework\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php',
|
|
||||||
'PHPUnit_Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php',
|
|
||||||
'PHPUnit_Extensions_GroupTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php',
|
|
||||||
'PHPUnit_Extensions_PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestCase.php',
|
|
||||||
'PHPUnit_Extensions_PhptTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestSuite.php',
|
|
||||||
'PHPUnit_Extensions_RepeatedTest' => $vendorDir . '/phpunit/phpunit/src/Extensions/RepeatedTest.php',
|
|
||||||
'PHPUnit_Extensions_TestDecorator' => $vendorDir . '/phpunit/phpunit/src/Extensions/TestDecorator.php',
|
|
||||||
'PHPUnit_Extensions_TicketListener' => $vendorDir . '/phpunit/phpunit/src/Extensions/TicketListener.php',
|
|
||||||
'PHPUnit_Framework_Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php',
|
|
||||||
'PHPUnit_Framework_AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/AssertionFailedError.php',
|
|
||||||
'PHPUnit_Framework_BaseTestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/BaseTestListener.php',
|
|
||||||
'PHPUnit_Framework_CodeCoverageException' => $vendorDir . '/phpunit/phpunit/src/Framework/CodeCoverageException.php',
|
|
||||||
'PHPUnit_Framework_Constraint' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint.php',
|
|
||||||
'PHPUnit_Framework_Constraint_And' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/And.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ArrayHasKey' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ArraySubset' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Attribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Callback' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Callback.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ClassHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Composite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Composite.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Count' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Count.php',
|
|
||||||
'PHPUnit_Framework_Constraint_DirectoryExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ExceptionCode' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ExceptionMessage' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php',
|
|
||||||
'PHPUnit_Framework_Constraint_FileExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php',
|
|
||||||
'PHPUnit_Framework_Constraint_GreaterThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsAnything' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsFinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFinite.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsInfinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsNan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNan.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsReadable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsReadable.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsType.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsWritable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsWritable.php',
|
|
||||||
'PHPUnit_Framework_Constraint_JsonMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php',
|
|
||||||
'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php',
|
|
||||||
'PHPUnit_Framework_Constraint_LessThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Not' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Not.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ObjectHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Or' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Or.php',
|
|
||||||
'PHPUnit_Framework_Constraint_PCREMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php',
|
|
||||||
'PHPUnit_Framework_Constraint_SameSize' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php',
|
|
||||||
'PHPUnit_Framework_Constraint_StringContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php',
|
|
||||||
'PHPUnit_Framework_Constraint_StringEndsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php',
|
|
||||||
'PHPUnit_Framework_Constraint_StringMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringMatches.php',
|
|
||||||
'PHPUnit_Framework_Constraint_StringStartsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php',
|
|
||||||
'PHPUnit_Framework_Constraint_TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php',
|
|
||||||
'PHPUnit_Framework_Constraint_TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Xor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Xor.php',
|
|
||||||
'PHPUnit_Framework_CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/phpunit/src/Framework/CoveredCodeNotExecutedException.php',
|
|
||||||
'PHPUnit_Framework_Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Error.php',
|
|
||||||
'PHPUnit_Framework_Error_Deprecated' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Deprecated.php',
|
|
||||||
'PHPUnit_Framework_Error_Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Notice.php',
|
|
||||||
'PHPUnit_Framework_Error_Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Warning.php',
|
|
||||||
'PHPUnit_Framework_Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception.php',
|
|
||||||
'PHPUnit_Framework_ExceptionWrapper' => $vendorDir . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php',
|
|
||||||
'PHPUnit_Framework_ExpectationFailedException' => $vendorDir . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php',
|
|
||||||
'PHPUnit_Framework_IncompleteTest' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTest.php',
|
|
||||||
'PHPUnit_Framework_IncompleteTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php',
|
|
||||||
'PHPUnit_Framework_IncompleteTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestError.php',
|
|
||||||
'PHPUnit_Framework_InvalidCoversTargetException' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php',
|
|
||||||
'PHPUnit_Framework_MissingCoversAnnotationException' => $vendorDir . '/phpunit/phpunit/src/Framework/MissingCoversAnnotationException.php',
|
|
||||||
'PHPUnit_Framework_MockObject_BadMethodCallException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_Identity' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_Match' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_Namespace' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Generator' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php',
|
|
||||||
'PHPUnit_Framework_MockObject_InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Invocation_Object' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Invocation_Static' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Invokable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_MethodName' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_Parameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php',
|
|
||||||
'PHPUnit_Framework_MockObject_MockBuilder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php',
|
|
||||||
'PHPUnit_Framework_MockObject_MockObject' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php',
|
|
||||||
'PHPUnit_Framework_MockObject_RuntimeException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_Return' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_ReturnReference' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnReference.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Verifiable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php',
|
|
||||||
'PHPUnit_Framework_OutputError' => $vendorDir . '/phpunit/phpunit/src/Framework/OutputError.php',
|
|
||||||
'PHPUnit_Framework_RiskyTest' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTest.php',
|
|
||||||
'PHPUnit_Framework_RiskyTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTestError.php',
|
|
||||||
'PHPUnit_Framework_SelfDescribing' => $vendorDir . '/phpunit/phpunit/src/Framework/SelfDescribing.php',
|
|
||||||
'PHPUnit_Framework_SkippedTest' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTest.php',
|
|
||||||
'PHPUnit_Framework_SkippedTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestCase.php',
|
|
||||||
'PHPUnit_Framework_SkippedTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestError.php',
|
|
||||||
'PHPUnit_Framework_SkippedTestSuiteError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php',
|
|
||||||
'PHPUnit_Framework_SyntheticError' => $vendorDir . '/phpunit/phpunit/src/Framework/SyntheticError.php',
|
|
||||||
'PHPUnit_Framework_Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Test.php',
|
|
||||||
'PHPUnit_Framework_TestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/TestCase.php',
|
|
||||||
'PHPUnit_Framework_TestFailure' => $vendorDir . '/phpunit/phpunit/src/Framework/TestFailure.php',
|
|
||||||
'PHPUnit_Framework_TestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListener.php',
|
|
||||||
'PHPUnit_Framework_TestResult' => $vendorDir . '/phpunit/phpunit/src/Framework/TestResult.php',
|
|
||||||
'PHPUnit_Framework_TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php',
|
|
||||||
'PHPUnit_Framework_TestSuite_DataProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php',
|
|
||||||
'PHPUnit_Framework_UnintentionallyCoveredCodeError' => $vendorDir . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php',
|
|
||||||
'PHPUnit_Framework_Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Warning.php',
|
|
||||||
'PHPUnit_Framework_WarningTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/WarningTestCase.php',
|
|
||||||
'PHPUnit_Runner_BaseTestRunner' => $vendorDir . '/phpunit/phpunit/src/Runner/BaseTestRunner.php',
|
|
||||||
'PHPUnit_Runner_Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception.php',
|
|
||||||
'PHPUnit_Runner_Filter_Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
|
|
||||||
'PHPUnit_Runner_Filter_GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group.php',
|
|
||||||
'PHPUnit_Runner_Filter_Group_Exclude' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php',
|
|
||||||
'PHPUnit_Runner_Filter_Group_Include' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group/Include.php',
|
|
||||||
'PHPUnit_Runner_Filter_Test' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Test.php',
|
|
||||||
'PHPUnit_Runner_StandardTestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php',
|
|
||||||
'PHPUnit_Runner_TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php',
|
|
||||||
'PHPUnit_Runner_Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php',
|
|
||||||
'PHPUnit_TextUI_Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command.php',
|
|
||||||
'PHPUnit_TextUI_ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/ResultPrinter.php',
|
|
||||||
'PHPUnit_TextUI_TestRunner' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestRunner.php',
|
|
||||||
'PHPUnit_Util_Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php',
|
|
||||||
'PHPUnit_Util_Configuration' => $vendorDir . '/phpunit/phpunit/src/Util/Configuration.php',
|
|
||||||
'PHPUnit_Util_ConfigurationGenerator' => $vendorDir . '/phpunit/phpunit/src/Util/ConfigurationGenerator.php',
|
|
||||||
'PHPUnit_Util_ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php',
|
|
||||||
'PHPUnit_Util_Fileloader' => $vendorDir . '/phpunit/phpunit/src/Util/Fileloader.php',
|
|
||||||
'PHPUnit_Util_Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php',
|
|
||||||
'PHPUnit_Util_Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php',
|
|
||||||
'PHPUnit_Util_Getopt' => $vendorDir . '/phpunit/phpunit/src/Util/Getopt.php',
|
|
||||||
'PHPUnit_Util_GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php',
|
|
||||||
'PHPUnit_Util_InvalidArgumentHelper' => $vendorDir . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php',
|
|
||||||
'PHPUnit_Util_Log_JSON' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JSON.php',
|
|
||||||
'PHPUnit_Util_Log_JUnit' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JUnit.php',
|
|
||||||
'PHPUnit_Util_Log_TAP' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TAP.php',
|
|
||||||
'PHPUnit_Util_Log_TeamCity' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TeamCity.php',
|
|
||||||
'PHPUnit_Util_PHP' => $vendorDir . '/phpunit/phpunit/src/Util/PHP.php',
|
|
||||||
'PHPUnit_Util_PHP_Default' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Default.php',
|
|
||||||
'PHPUnit_Util_PHP_Windows' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Windows.php',
|
|
||||||
'PHPUnit_Util_Printer' => $vendorDir . '/phpunit/phpunit/src/Util/Printer.php',
|
|
||||||
'PHPUnit_Util_Regex' => $vendorDir . '/phpunit/phpunit/src/Util/Regex.php',
|
|
||||||
'PHPUnit_Util_String' => $vendorDir . '/phpunit/phpunit/src/Util/String.php',
|
|
||||||
'PHPUnit_Util_Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php',
|
|
||||||
'PHPUnit_Util_TestDox_NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php',
|
|
||||||
'PHPUnit_Util_TestDox_ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php',
|
|
||||||
'PHPUnit_Util_TestDox_ResultPrinter_HTML' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php',
|
|
||||||
'PHPUnit_Util_TestDox_ResultPrinter_Text' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php',
|
|
||||||
'PHPUnit_Util_TestDox_ResultPrinter_XML' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/XML.php',
|
|
||||||
'PHPUnit_Util_TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Util/TestSuiteIterator.php',
|
|
||||||
'PHPUnit_Util_Type' => $vendorDir . '/phpunit/phpunit/src/Util/Type.php',
|
|
||||||
'PHPUnit_Util_XML' => $vendorDir . '/phpunit/phpunit/src/Util/XML.php',
|
|
||||||
'PHP_Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php',
|
|
||||||
'PHP_Token' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_TokenWithScope' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_TokenWithScopeAndVisibility' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ABSTRACT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_AMPERSAND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_AND_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ARRAY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ARRAY_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_AS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ASYNC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_AT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_AWAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_BACKTICK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_BAD_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_BOOLEAN_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_BOOLEAN_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_BOOL_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_BREAK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CALLABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CARET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CASE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CATCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLASS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLASS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLASS_NAME_CONSTANT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLONE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLOSE_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLOSE_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLOSE_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLOSE_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_COALESCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_COMMA' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_COMPILER_HALT_OFFSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CONCAT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CONST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CONSTANT_ENCAPSED_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CONTINUE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CURLY_OPEN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DEC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DEFAULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DIR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DIV' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DIV_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOC_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOLLAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOUBLE_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOUBLE_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOUBLE_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOUBLE_QUOTES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ELLIPSIS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ELSE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ELSEIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EMPTY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENCAPSED_AND_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENDDECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENDFOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENDFOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENDIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENDSWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENDWHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_END_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENUM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EQUALS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EVAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EXCLAMATION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EXIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EXTENDS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FINAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FINALLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FUNC_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_GLOBAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_GOTO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_HALT_COMPILER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IMPLEMENTS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INCLUDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INCLUDE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INLINE_HTML' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INSTANCEOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INSTEADOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INTERFACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ISSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IS_GREATER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IS_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IS_NOT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IS_NOT_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IS_SMALLER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_Includes' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_JOIN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LAMBDA_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LAMBDA_CP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LAMBDA_OP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LINE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LIST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LOGICAL_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LOGICAL_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LOGICAL_XOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_METHOD_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_MINUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_MINUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_MOD_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_MULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_MUL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_NAMESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_NEW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_NS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_NS_SEPARATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_NULLSAFE_OBJECT_OPERATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_NUM_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OBJECT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OBJECT_OPERATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ONUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OPEN_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OPEN_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OPEN_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OPEN_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OPEN_TAG_WITH_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PERCENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PIPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PLUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PLUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_POW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_POW_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PRINT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PRIVATE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PROTECTED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PUBLIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_QUESTION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_REQUIRE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_REQUIRE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_RETURN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SEMICOLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SHAPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SPACESHIP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_START_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_STATIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_STRING_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_STRING_VARNAME' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SUPER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_Stream' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream.php',
|
|
||||||
'PHP_Token_Stream_CachingFactory' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php',
|
|
||||||
'PHP_Token_THROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TILDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TRAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TRAIT_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TRY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TYPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TYPELIST_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TYPELIST_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_UNSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_UNSET_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_USE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_USE_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_VAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_VARIABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_WHERE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_WHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_ATTRIBUTE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_CATEGORY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_CATEGORY_LABEL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_CHILDREN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_LABEL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_REQUIRED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_TAG_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_TAG_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_TEXT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XOR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_YIELD' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_YIELD_FROM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Driver.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Driver\\HHVM' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/HHVM.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Driver\\PHPDBG' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PHPDBG.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Xdebug.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Exception' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Exception.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Filter' => $vendorDir . '/phpunit/php-code-coverage/src/Filter.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\MissingCoversAnnotationException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => $vendorDir . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Node\\Builder' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Builder.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Node\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Directory.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Node\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Node/File.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Iterator.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Clover' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Clover.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Crap4j.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Facade.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\PHP' => $vendorDir . '/phpunit/php-code-coverage/src/Report/PHP.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Text' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Text.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/File.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Method.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Node.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Project.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Report.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\RuntimeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/RuntimeException.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Util' => $vendorDir . '/phpunit/php-code-coverage/src/Util.php',
|
|
||||||
'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => $vendorDir . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
|
|
||||||
'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php',
|
|
||||||
'SebastianBergmann\\Comparator\\DOMNodeComparator' => $vendorDir . '/sebastian/comparator/src/DOMNodeComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\DateTimeComparator' => $vendorDir . '/sebastian/comparator/src/DateTimeComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\DoubleComparator' => $vendorDir . '/sebastian/comparator/src/DoubleComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\ExceptionComparator' => $vendorDir . '/sebastian/comparator/src/ExceptionComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\Factory' => $vendorDir . '/sebastian/comparator/src/Factory.php',
|
|
||||||
'SebastianBergmann\\Comparator\\MockObjectComparator' => $vendorDir . '/sebastian/comparator/src/MockObjectComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\NumericComparator' => $vendorDir . '/sebastian/comparator/src/NumericComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\ObjectComparator' => $vendorDir . '/sebastian/comparator/src/ObjectComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\ResourceComparator' => $vendorDir . '/sebastian/comparator/src/ResourceComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\ScalarComparator' => $vendorDir . '/sebastian/comparator/src/ScalarComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => $vendorDir . '/sebastian/comparator/src/SplObjectStorageComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\TypeComparator' => $vendorDir . '/sebastian/comparator/src/TypeComparator.php',
|
|
||||||
'SebastianBergmann\\Diff\\Chunk' => $vendorDir . '/sebastian/diff/src/Chunk.php',
|
|
||||||
'SebastianBergmann\\Diff\\Diff' => $vendorDir . '/sebastian/diff/src/Diff.php',
|
|
||||||
'SebastianBergmann\\Diff\\Differ' => $vendorDir . '/sebastian/diff/src/Differ.php',
|
|
||||||
'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => $vendorDir . '/sebastian/diff/src/LCS/LongestCommonSubsequence.php',
|
|
||||||
'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => $vendorDir . '/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php',
|
|
||||||
'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => $vendorDir . '/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php',
|
|
||||||
'SebastianBergmann\\Diff\\Line' => $vendorDir . '/sebastian/diff/src/Line.php',
|
|
||||||
'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php',
|
|
||||||
'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php',
|
|
||||||
'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php',
|
|
||||||
'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php',
|
|
||||||
'SebastianBergmann\\GlobalState\\Blacklist' => $vendorDir . '/sebastian/global-state/src/Blacklist.php',
|
|
||||||
'SebastianBergmann\\GlobalState\\CodeExporter' => $vendorDir . '/sebastian/global-state/src/CodeExporter.php',
|
|
||||||
'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/Exception.php',
|
|
||||||
'SebastianBergmann\\GlobalState\\Restorer' => $vendorDir . '/sebastian/global-state/src/Restorer.php',
|
|
||||||
'SebastianBergmann\\GlobalState\\RuntimeException' => $vendorDir . '/sebastian/global-state/src/RuntimeException.php',
|
|
||||||
'SebastianBergmann\\GlobalState\\Snapshot' => $vendorDir . '/sebastian/global-state/src/Snapshot.php',
|
|
||||||
'SebastianBergmann\\ObjectEnumerator\\Enumerator' => $vendorDir . '/sebastian/object-enumerator/src/Enumerator.php',
|
|
||||||
'SebastianBergmann\\ObjectEnumerator\\Exception' => $vendorDir . '/sebastian/object-enumerator/src/Exception.php',
|
|
||||||
'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => $vendorDir . '/sebastian/object-enumerator/src/InvalidArgumentException.php',
|
|
||||||
'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php',
|
|
||||||
'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php',
|
|
||||||
'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php',
|
|
||||||
'SebastianBergmann\\ResourceOperations\\ResourceOperations' => $vendorDir . '/sebastian/resource-operations/src/ResourceOperations.php',
|
|
||||||
'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php',
|
|
||||||
'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php',
|
|
||||||
);
|
|
||||||
25
pfosten/vendor/composer/autoload_files.php
vendored
25
pfosten/vendor/composer/autoload_files.php
vendored
|
|
@ -1,25 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
// autoload_files.php @generated by Composer
|
|
||||||
|
|
||||||
$vendorDir = dirname(dirname(__FILE__));
|
|
||||||
$baseDir = dirname($vendorDir);
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
|
|
||||||
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
|
|
||||||
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
|
|
||||||
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
|
|
||||||
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
|
||||||
'1d1b89d124cc9cb8219922c9d5569199' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest.php',
|
|
||||||
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
|
|
||||||
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php',
|
|
||||||
'2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
|
|
||||||
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
|
|
||||||
'538ca81a9a966a6716601ecf48f4eaef' => $vendorDir . '/opis/closure/functions.php',
|
|
||||||
'801c31d8ed748cfa537fa45402288c95' => $vendorDir . '/psy/psysh/src/functions.php',
|
|
||||||
'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php',
|
|
||||||
'f0906e6318348a765ffb6eb24e0d0938' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/helpers.php',
|
|
||||||
'58571171fd5812e6e447dce228f52f4d' => $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php',
|
|
||||||
'f18cc91337d49233e5754e93f3ed9ec3' => $vendorDir . '/laravelcollective/html/src/helpers.php',
|
|
||||||
);
|
|
||||||
11
pfosten/vendor/composer/autoload_namespaces.php
vendored
11
pfosten/vendor/composer/autoload_namespaces.php
vendored
|
|
@ -1,11 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
// autoload_namespaces.php @generated by Composer
|
|
||||||
|
|
||||||
$vendorDir = dirname(dirname(__FILE__));
|
|
||||||
$baseDir = dirname($vendorDir);
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'Parsedown' => array($vendorDir . '/erusev/parsedown'),
|
|
||||||
'Mockery' => array($vendorDir . '/mockery/mockery/library'),
|
|
||||||
);
|
|
||||||
63
pfosten/vendor/composer/autoload_psr4.php
vendored
63
pfosten/vendor/composer/autoload_psr4.php
vendored
|
|
@ -1,63 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
// autoload_psr4.php @generated by Composer
|
|
||||||
|
|
||||||
$vendorDir = dirname(dirname(__FILE__));
|
|
||||||
$baseDir = dirname($vendorDir);
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src'),
|
|
||||||
'XdgBaseDir\\' => array($vendorDir . '/dnoegel/php-xdg-base-dir/src'),
|
|
||||||
'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
|
|
||||||
'TijsVerkoyen\\CssToInlineStyles\\' => array($vendorDir . '/tijsverkoyen/css-to-inline-styles/src'),
|
|
||||||
'Tests\\' => array($baseDir . '/tests'),
|
|
||||||
'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'),
|
|
||||||
'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
|
|
||||||
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
|
|
||||||
'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'),
|
|
||||||
'Symfony\\Polyfill\\Iconv\\' => array($vendorDir . '/symfony/polyfill-iconv'),
|
|
||||||
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
|
|
||||||
'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'),
|
|
||||||
'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'),
|
|
||||||
'Symfony\\Contracts\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher-contracts'),
|
|
||||||
'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
|
|
||||||
'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'),
|
|
||||||
'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
|
|
||||||
'Symfony\\Component\\Routing\\' => array($vendorDir . '/symfony/routing'),
|
|
||||||
'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'),
|
|
||||||
'Symfony\\Component\\Mime\\' => array($vendorDir . '/symfony/mime'),
|
|
||||||
'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'),
|
|
||||||
'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'),
|
|
||||||
'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
|
|
||||||
'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
|
|
||||||
'Symfony\\Component\\ErrorHandler\\' => array($vendorDir . '/symfony/error-handler'),
|
|
||||||
'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
|
|
||||||
'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'),
|
|
||||||
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
|
|
||||||
'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'),
|
|
||||||
'Psy\\' => array($vendorDir . '/psy/psysh/src'),
|
|
||||||
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
|
|
||||||
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
|
||||||
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
|
|
||||||
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'),
|
|
||||||
'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'),
|
|
||||||
'PhpOption\\' => array($vendorDir . '/phpoption/phpoption/src/PhpOption'),
|
|
||||||
'Opis\\Closure\\' => array($vendorDir . '/opis/closure/src'),
|
|
||||||
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
|
|
||||||
'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
|
|
||||||
'Laravel\\Tinker\\' => array($vendorDir . '/laravel/tinker/src'),
|
|
||||||
'JakubOnderka\\PhpConsoleHighlighter\\' => array($vendorDir . '/jakub-onderka/php-console-highlighter/src'),
|
|
||||||
'JakubOnderka\\PhpConsoleColor\\' => array($vendorDir . '/jakub-onderka/php-console-color/src'),
|
|
||||||
'Illuminate\\' => array($vendorDir . '/laravel/framework/src/Illuminate'),
|
|
||||||
'Faker\\' => array($vendorDir . '/fzaninotto/faker/src/Faker'),
|
|
||||||
'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/EmailValidator'),
|
|
||||||
'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'),
|
|
||||||
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
|
|
||||||
'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'),
|
|
||||||
'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector'),
|
|
||||||
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
|
|
||||||
'Cron\\' => array($vendorDir . '/dragonmantank/cron-expression/src/Cron'),
|
|
||||||
'Collective\\Html\\' => array($vendorDir . '/laravelcollective/html/src'),
|
|
||||||
'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'),
|
|
||||||
'App\\' => array($baseDir . '/app'),
|
|
||||||
);
|
|
||||||
70
pfosten/vendor/composer/autoload_real.php
vendored
70
pfosten/vendor/composer/autoload_real.php
vendored
|
|
@ -1,70 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
// autoload_real.php @generated by Composer
|
|
||||||
|
|
||||||
class ComposerAutoloaderInita19fb0695e1b61b4feeb3cc3fbdd2feb
|
|
||||||
{
|
|
||||||
private static $loader;
|
|
||||||
|
|
||||||
public static function loadClassLoader($class)
|
|
||||||
{
|
|
||||||
if ('Composer\Autoload\ClassLoader' === $class) {
|
|
||||||
require __DIR__ . '/ClassLoader.php';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getLoader()
|
|
||||||
{
|
|
||||||
if (null !== self::$loader) {
|
|
||||||
return self::$loader;
|
|
||||||
}
|
|
||||||
|
|
||||||
spl_autoload_register(array('ComposerAutoloaderInita19fb0695e1b61b4feeb3cc3fbdd2feb', 'loadClassLoader'), true, true);
|
|
||||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
|
||||||
spl_autoload_unregister(array('ComposerAutoloaderInita19fb0695e1b61b4feeb3cc3fbdd2feb', 'loadClassLoader'));
|
|
||||||
|
|
||||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
|
||||||
if ($useStaticLoader) {
|
|
||||||
require_once __DIR__ . '/autoload_static.php';
|
|
||||||
|
|
||||||
call_user_func(\Composer\Autoload\ComposerStaticInita19fb0695e1b61b4feeb3cc3fbdd2feb::getInitializer($loader));
|
|
||||||
} else {
|
|
||||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
|
||||||
foreach ($map as $namespace => $path) {
|
|
||||||
$loader->set($namespace, $path);
|
|
||||||
}
|
|
||||||
|
|
||||||
$map = require __DIR__ . '/autoload_psr4.php';
|
|
||||||
foreach ($map as $namespace => $path) {
|
|
||||||
$loader->setPsr4($namespace, $path);
|
|
||||||
}
|
|
||||||
|
|
||||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
|
||||||
if ($classMap) {
|
|
||||||
$loader->addClassMap($classMap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$loader->register(true);
|
|
||||||
|
|
||||||
if ($useStaticLoader) {
|
|
||||||
$includeFiles = Composer\Autoload\ComposerStaticInita19fb0695e1b61b4feeb3cc3fbdd2feb::$files;
|
|
||||||
} else {
|
|
||||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
|
||||||
}
|
|
||||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
|
||||||
composerRequirea19fb0695e1b61b4feeb3cc3fbdd2feb($fileIdentifier, $file);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $loader;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function composerRequirea19fb0695e1b61b4feeb3cc3fbdd2feb($fileIdentifier, $file)
|
|
||||||
{
|
|
||||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
|
||||||
require $file;
|
|
||||||
|
|
||||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
938
pfosten/vendor/composer/autoload_static.php
vendored
938
pfosten/vendor/composer/autoload_static.php
vendored
|
|
@ -1,938 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
// autoload_static.php @generated by Composer
|
|
||||||
|
|
||||||
namespace Composer\Autoload;
|
|
||||||
|
|
||||||
class ComposerStaticInita19fb0695e1b61b4feeb3cc3fbdd2feb
|
|
||||||
{
|
|
||||||
public static $files = array (
|
|
||||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
|
||||||
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
|
|
||||||
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
|
|
||||||
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
|
|
||||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
|
||||||
'1d1b89d124cc9cb8219922c9d5569199' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest.php',
|
|
||||||
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
|
|
||||||
'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php',
|
|
||||||
'2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php',
|
|
||||||
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
|
|
||||||
'538ca81a9a966a6716601ecf48f4eaef' => __DIR__ . '/..' . '/opis/closure/functions.php',
|
|
||||||
'801c31d8ed748cfa537fa45402288c95' => __DIR__ . '/..' . '/psy/psysh/src/functions.php',
|
|
||||||
'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php',
|
|
||||||
'f0906e6318348a765ffb6eb24e0d0938' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/helpers.php',
|
|
||||||
'58571171fd5812e6e447dce228f52f4d' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/helpers.php',
|
|
||||||
'f18cc91337d49233e5754e93f3ed9ec3' => __DIR__ . '/..' . '/laravelcollective/html/src/helpers.php',
|
|
||||||
);
|
|
||||||
|
|
||||||
public static $prefixLengthsPsr4 = array (
|
|
||||||
'p' =>
|
|
||||||
array (
|
|
||||||
'phpDocumentor\\Reflection\\' => 25,
|
|
||||||
),
|
|
||||||
'X' =>
|
|
||||||
array (
|
|
||||||
'XdgBaseDir\\' => 11,
|
|
||||||
),
|
|
||||||
'W' =>
|
|
||||||
array (
|
|
||||||
'Webmozart\\Assert\\' => 17,
|
|
||||||
),
|
|
||||||
'T' =>
|
|
||||||
array (
|
|
||||||
'TijsVerkoyen\\CssToInlineStyles\\' => 31,
|
|
||||||
'Tests\\' => 6,
|
|
||||||
),
|
|
||||||
'S' =>
|
|
||||||
array (
|
|
||||||
'Symfony\\Polyfill\\Php73\\' => 23,
|
|
||||||
'Symfony\\Polyfill\\Php72\\' => 23,
|
|
||||||
'Symfony\\Polyfill\\Mbstring\\' => 26,
|
|
||||||
'Symfony\\Polyfill\\Intl\\Idn\\' => 26,
|
|
||||||
'Symfony\\Polyfill\\Iconv\\' => 23,
|
|
||||||
'Symfony\\Polyfill\\Ctype\\' => 23,
|
|
||||||
'Symfony\\Contracts\\Translation\\' => 30,
|
|
||||||
'Symfony\\Contracts\\Service\\' => 26,
|
|
||||||
'Symfony\\Contracts\\EventDispatcher\\' => 34,
|
|
||||||
'Symfony\\Component\\Yaml\\' => 23,
|
|
||||||
'Symfony\\Component\\VarDumper\\' => 28,
|
|
||||||
'Symfony\\Component\\Translation\\' => 30,
|
|
||||||
'Symfony\\Component\\Routing\\' => 26,
|
|
||||||
'Symfony\\Component\\Process\\' => 26,
|
|
||||||
'Symfony\\Component\\Mime\\' => 23,
|
|
||||||
'Symfony\\Component\\HttpKernel\\' => 29,
|
|
||||||
'Symfony\\Component\\HttpFoundation\\' => 33,
|
|
||||||
'Symfony\\Component\\Finder\\' => 25,
|
|
||||||
'Symfony\\Component\\EventDispatcher\\' => 34,
|
|
||||||
'Symfony\\Component\\ErrorHandler\\' => 31,
|
|
||||||
'Symfony\\Component\\Debug\\' => 24,
|
|
||||||
'Symfony\\Component\\CssSelector\\' => 30,
|
|
||||||
'Symfony\\Component\\Console\\' => 26,
|
|
||||||
),
|
|
||||||
'R' =>
|
|
||||||
array (
|
|
||||||
'Ramsey\\Uuid\\' => 12,
|
|
||||||
),
|
|
||||||
'P' =>
|
|
||||||
array (
|
|
||||||
'Psy\\' => 4,
|
|
||||||
'Psr\\SimpleCache\\' => 16,
|
|
||||||
'Psr\\Log\\' => 8,
|
|
||||||
'Psr\\Container\\' => 14,
|
|
||||||
'Prophecy\\' => 9,
|
|
||||||
'PhpParser\\' => 10,
|
|
||||||
'PhpOption\\' => 10,
|
|
||||||
),
|
|
||||||
'O' =>
|
|
||||||
array (
|
|
||||||
'Opis\\Closure\\' => 13,
|
|
||||||
),
|
|
||||||
'M' =>
|
|
||||||
array (
|
|
||||||
'Monolog\\' => 8,
|
|
||||||
),
|
|
||||||
'L' =>
|
|
||||||
array (
|
|
||||||
'League\\Flysystem\\' => 17,
|
|
||||||
'Laravel\\Tinker\\' => 15,
|
|
||||||
),
|
|
||||||
'J' =>
|
|
||||||
array (
|
|
||||||
'JakubOnderka\\PhpConsoleHighlighter\\' => 35,
|
|
||||||
'JakubOnderka\\PhpConsoleColor\\' => 29,
|
|
||||||
),
|
|
||||||
'I' =>
|
|
||||||
array (
|
|
||||||
'Illuminate\\' => 11,
|
|
||||||
),
|
|
||||||
'F' =>
|
|
||||||
array (
|
|
||||||
'Faker\\' => 6,
|
|
||||||
),
|
|
||||||
'E' =>
|
|
||||||
array (
|
|
||||||
'Egulias\\EmailValidator\\' => 23,
|
|
||||||
),
|
|
||||||
'D' =>
|
|
||||||
array (
|
|
||||||
'Dotenv\\' => 7,
|
|
||||||
'Doctrine\\Instantiator\\' => 22,
|
|
||||||
'Doctrine\\Common\\Lexer\\' => 22,
|
|
||||||
'Doctrine\\Common\\Inflector\\' => 26,
|
|
||||||
'DeepCopy\\' => 9,
|
|
||||||
),
|
|
||||||
'C' =>
|
|
||||||
array (
|
|
||||||
'Cron\\' => 5,
|
|
||||||
'Collective\\Html\\' => 16,
|
|
||||||
'Carbon\\' => 7,
|
|
||||||
),
|
|
||||||
'A' =>
|
|
||||||
array (
|
|
||||||
'App\\' => 4,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
|
||||||
'phpDocumentor\\Reflection\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/phpdocumentor/reflection-common/src',
|
|
||||||
1 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src',
|
|
||||||
2 => __DIR__ . '/..' . '/phpdocumentor/type-resolver/src',
|
|
||||||
),
|
|
||||||
'XdgBaseDir\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/dnoegel/php-xdg-base-dir/src',
|
|
||||||
),
|
|
||||||
'Webmozart\\Assert\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/webmozart/assert/src',
|
|
||||||
),
|
|
||||||
'TijsVerkoyen\\CssToInlineStyles\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src',
|
|
||||||
),
|
|
||||||
'Tests\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/../..' . '/tests',
|
|
||||||
),
|
|
||||||
'Symfony\\Polyfill\\Php73\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/polyfill-php73',
|
|
||||||
),
|
|
||||||
'Symfony\\Polyfill\\Php72\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
|
|
||||||
),
|
|
||||||
'Symfony\\Polyfill\\Mbstring\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
|
|
||||||
),
|
|
||||||
'Symfony\\Polyfill\\Intl\\Idn\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn',
|
|
||||||
),
|
|
||||||
'Symfony\\Polyfill\\Iconv\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/polyfill-iconv',
|
|
||||||
),
|
|
||||||
'Symfony\\Polyfill\\Ctype\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
|
|
||||||
),
|
|
||||||
'Symfony\\Contracts\\Translation\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/translation-contracts',
|
|
||||||
),
|
|
||||||
'Symfony\\Contracts\\Service\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/service-contracts',
|
|
||||||
),
|
|
||||||
'Symfony\\Contracts\\EventDispatcher\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\Yaml\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/yaml',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\VarDumper\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/var-dumper',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\Translation\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/translation',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\Routing\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/routing',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\Process\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/process',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\Mime\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/mime',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\HttpKernel\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/http-kernel',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\HttpFoundation\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/http-foundation',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\Finder\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/finder',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\EventDispatcher\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/event-dispatcher',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\ErrorHandler\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/error-handler',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\Debug\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/debug',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\CssSelector\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/css-selector',
|
|
||||||
),
|
|
||||||
'Symfony\\Component\\Console\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/symfony/console',
|
|
||||||
),
|
|
||||||
'Ramsey\\Uuid\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/ramsey/uuid/src',
|
|
||||||
),
|
|
||||||
'Psy\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/psy/psysh/src',
|
|
||||||
),
|
|
||||||
'Psr\\SimpleCache\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/psr/simple-cache/src',
|
|
||||||
),
|
|
||||||
'Psr\\Log\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
|
|
||||||
),
|
|
||||||
'Psr\\Container\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/psr/container/src',
|
|
||||||
),
|
|
||||||
'Prophecy\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy',
|
|
||||||
),
|
|
||||||
'PhpParser\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser',
|
|
||||||
),
|
|
||||||
'PhpOption\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/phpoption/phpoption/src/PhpOption',
|
|
||||||
),
|
|
||||||
'Opis\\Closure\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/opis/closure/src',
|
|
||||||
),
|
|
||||||
'Monolog\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog',
|
|
||||||
),
|
|
||||||
'League\\Flysystem\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/league/flysystem/src',
|
|
||||||
),
|
|
||||||
'Laravel\\Tinker\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/laravel/tinker/src',
|
|
||||||
),
|
|
||||||
'JakubOnderka\\PhpConsoleHighlighter\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/jakub-onderka/php-console-highlighter/src',
|
|
||||||
),
|
|
||||||
'JakubOnderka\\PhpConsoleColor\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/jakub-onderka/php-console-color/src',
|
|
||||||
),
|
|
||||||
'Illuminate\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/laravel/framework/src/Illuminate',
|
|
||||||
),
|
|
||||||
'Faker\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker',
|
|
||||||
),
|
|
||||||
'Egulias\\EmailValidator\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator',
|
|
||||||
),
|
|
||||||
'Dotenv\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/vlucas/phpdotenv/src',
|
|
||||||
),
|
|
||||||
'Doctrine\\Instantiator\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator',
|
|
||||||
),
|
|
||||||
'Doctrine\\Common\\Lexer\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer',
|
|
||||||
),
|
|
||||||
'Doctrine\\Common\\Inflector\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Common/Inflector',
|
|
||||||
),
|
|
||||||
'DeepCopy\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy',
|
|
||||||
),
|
|
||||||
'Cron\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/dragonmantank/cron-expression/src/Cron',
|
|
||||||
),
|
|
||||||
'Collective\\Html\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/laravelcollective/html/src',
|
|
||||||
),
|
|
||||||
'Carbon\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon',
|
|
||||||
),
|
|
||||||
'App\\' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/../..' . '/app',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
public static $prefixesPsr0 = array (
|
|
||||||
'P' =>
|
|
||||||
array (
|
|
||||||
'Parsedown' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/erusev/parsedown',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'M' =>
|
|
||||||
array (
|
|
||||||
'Mockery' =>
|
|
||||||
array (
|
|
||||||
0 => __DIR__ . '/..' . '/mockery/mockery/library',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
public static $classMap = array (
|
|
||||||
'AddMaxIdenticalJokertippsToSeasons' => __DIR__ . '/../..' . '/database/migrations/2020_01_08_120739_add_max_identical_jokertipps_to_seasons.php',
|
|
||||||
'AddMobileFieldToUsers' => __DIR__ . '/../..' . '/database/migrations/2020_01_14_131714_add_mobile_field_to_users.php',
|
|
||||||
'AddReminderfieldToUsers' => __DIR__ . '/../..' . '/database/migrations/2017_08_28_110358_add_reminderfield_to_users.php',
|
|
||||||
'CreateGamesTable' => __DIR__ . '/../..' . '/database/migrations/2017_06_19_112641_create_games_table.php',
|
|
||||||
'CreateLeaguesTable' => __DIR__ . '/../..' . '/database/migrations/2017_09_08_095721_create_leagues_table.php',
|
|
||||||
'CreateManualPayoutsTable' => __DIR__ . '/../..' . '/database/migrations/2018_01_15_140815_create_manual_payouts_table.php',
|
|
||||||
'CreateMatchesTable' => __DIR__ . '/../..' . '/database/migrations/2017_09_08_095740_create_matches_table.php',
|
|
||||||
'CreatePasswordResetsTable' => __DIR__ . '/../..' . '/database/migrations/2014_10_12_100000_create_password_resets_table.php',
|
|
||||||
'CreatePaymentsTable' => __DIR__ . '/../..' . '/database/migrations/2017_06_19_112638_create_payments_table.php',
|
|
||||||
'CreateQuotasTable' => __DIR__ . '/../..' . '/database/migrations/2017_08_16_164654_create_quotas_table.php',
|
|
||||||
'CreateRoundmailsTable' => __DIR__ . '/../..' . '/database/migrations/2017_08_22_111913_create_roundmails_table.php',
|
|
||||||
'CreateRoundsTable' => __DIR__ . '/../..' . '/database/migrations/2017_06_19_112646_create_rounds_table.php',
|
|
||||||
'CreateSeasonsTable' => __DIR__ . '/../..' . '/database/migrations/2017_06_19_112652_create_seasons_table.php',
|
|
||||||
'CreateSettingsTable' => __DIR__ . '/../..' . '/database/migrations/2017_06_19_112625_create_settings_table.php',
|
|
||||||
'CreateTippsTable' => __DIR__ . '/../..' . '/database/migrations/2017_06_19_112632_create_tipps_table.php',
|
|
||||||
'CreateUsersTable' => __DIR__ . '/../..' . '/database/migrations/2014_10_12_000000_create_users_table.php',
|
|
||||||
'DatabaseSeeder' => __DIR__ . '/../..' . '/database/seeds/DatabaseSeeder.php',
|
|
||||||
'File_Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php',
|
|
||||||
'File_Iterator_Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php',
|
|
||||||
'File_Iterator_Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArray' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArrayContaining' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArrayContainingInAnyOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArrayContainingInOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArrayContainingKey' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArrayContainingKeyValuePair' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php',
|
|
||||||
'Hamcrest\\Arrays\\IsArrayWithSize' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php',
|
|
||||||
'Hamcrest\\Arrays\\MatchingOnce' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/MatchingOnce.php',
|
|
||||||
'Hamcrest\\Arrays\\SeriesMatchingOnce' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php',
|
|
||||||
'Hamcrest\\AssertionError' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php',
|
|
||||||
'Hamcrest\\BaseDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseDescription.php',
|
|
||||||
'Hamcrest\\BaseMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php',
|
|
||||||
'Hamcrest\\Collection\\IsEmptyTraversable' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php',
|
|
||||||
'Hamcrest\\Collection\\IsTraversableWithSize' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php',
|
|
||||||
'Hamcrest\\Core\\AllOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AllOf.php',
|
|
||||||
'Hamcrest\\Core\\AnyOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php',
|
|
||||||
'Hamcrest\\Core\\CombinableMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php',
|
|
||||||
'Hamcrest\\Core\\DescribedAs' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php',
|
|
||||||
'Hamcrest\\Core\\Every' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php',
|
|
||||||
'Hamcrest\\Core\\HasToString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php',
|
|
||||||
'Hamcrest\\Core\\Is' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php',
|
|
||||||
'Hamcrest\\Core\\IsAnything' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php',
|
|
||||||
'Hamcrest\\Core\\IsCollectionContaining' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php',
|
|
||||||
'Hamcrest\\Core\\IsEqual' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php',
|
|
||||||
'Hamcrest\\Core\\IsIdentical' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php',
|
|
||||||
'Hamcrest\\Core\\IsInstanceOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php',
|
|
||||||
'Hamcrest\\Core\\IsNot' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php',
|
|
||||||
'Hamcrest\\Core\\IsNull' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php',
|
|
||||||
'Hamcrest\\Core\\IsSame' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php',
|
|
||||||
'Hamcrest\\Core\\IsTypeOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php',
|
|
||||||
'Hamcrest\\Core\\Set' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php',
|
|
||||||
'Hamcrest\\Core\\ShortcutCombination' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php',
|
|
||||||
'Hamcrest\\Description' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php',
|
|
||||||
'Hamcrest\\DiagnosingMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/DiagnosingMatcher.php',
|
|
||||||
'Hamcrest\\FeatureMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php',
|
|
||||||
'Hamcrest\\Internal\\SelfDescribingValue' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php',
|
|
||||||
'Hamcrest\\Matcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php',
|
|
||||||
'Hamcrest\\MatcherAssert' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php',
|
|
||||||
'Hamcrest\\Matchers' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php',
|
|
||||||
'Hamcrest\\NullDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php',
|
|
||||||
'Hamcrest\\Number\\IsCloseTo' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/IsCloseTo.php',
|
|
||||||
'Hamcrest\\Number\\OrderingComparison' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php',
|
|
||||||
'Hamcrest\\SelfDescribing' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php',
|
|
||||||
'Hamcrest\\StringDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/StringDescription.php',
|
|
||||||
'Hamcrest\\Text\\IsEmptyString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php',
|
|
||||||
'Hamcrest\\Text\\IsEqualIgnoringCase' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php',
|
|
||||||
'Hamcrest\\Text\\IsEqualIgnoringWhiteSpace' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php',
|
|
||||||
'Hamcrest\\Text\\MatchesPattern' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php',
|
|
||||||
'Hamcrest\\Text\\StringContains' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php',
|
|
||||||
'Hamcrest\\Text\\StringContainsIgnoringCase' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php',
|
|
||||||
'Hamcrest\\Text\\StringContainsInOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php',
|
|
||||||
'Hamcrest\\Text\\StringEndsWith' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php',
|
|
||||||
'Hamcrest\\Text\\StringStartsWith' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php',
|
|
||||||
'Hamcrest\\Text\\SubstringMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php',
|
|
||||||
'Hamcrest\\TypeSafeDiagnosingMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeDiagnosingMatcher.php',
|
|
||||||
'Hamcrest\\TypeSafeMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php',
|
|
||||||
'Hamcrest\\Type\\IsArray' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php',
|
|
||||||
'Hamcrest\\Type\\IsBoolean' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsBoolean.php',
|
|
||||||
'Hamcrest\\Type\\IsCallable' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsCallable.php',
|
|
||||||
'Hamcrest\\Type\\IsDouble' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsDouble.php',
|
|
||||||
'Hamcrest\\Type\\IsInteger' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsInteger.php',
|
|
||||||
'Hamcrest\\Type\\IsNumeric' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsNumeric.php',
|
|
||||||
'Hamcrest\\Type\\IsObject' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php',
|
|
||||||
'Hamcrest\\Type\\IsResource' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsResource.php',
|
|
||||||
'Hamcrest\\Type\\IsScalar' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsScalar.php',
|
|
||||||
'Hamcrest\\Type\\IsString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsString.php',
|
|
||||||
'Hamcrest\\Util' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php',
|
|
||||||
'Hamcrest\\Xml\\HasXPath' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php',
|
|
||||||
'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
|
|
||||||
'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Assert.php',
|
|
||||||
'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/AssertionFailedError.php',
|
|
||||||
'PHPUnit\\Framework\\BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/BaseTestListener.php',
|
|
||||||
'PHPUnit\\Framework\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/Test.php',
|
|
||||||
'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestCase.php',
|
|
||||||
'PHPUnit\\Framework\\TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestListener.php',
|
|
||||||
'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/ForwardCompatibility/TestSuite.php',
|
|
||||||
'PHPUnit_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php',
|
|
||||||
'PHPUnit_Extensions_GroupTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php',
|
|
||||||
'PHPUnit_Extensions_PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestCase.php',
|
|
||||||
'PHPUnit_Extensions_PhptTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestSuite.php',
|
|
||||||
'PHPUnit_Extensions_RepeatedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/RepeatedTest.php',
|
|
||||||
'PHPUnit_Extensions_TestDecorator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TestDecorator.php',
|
|
||||||
'PHPUnit_Extensions_TicketListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TicketListener.php',
|
|
||||||
'PHPUnit_Framework_Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php',
|
|
||||||
'PHPUnit_Framework_AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/AssertionFailedError.php',
|
|
||||||
'PHPUnit_Framework_BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/BaseTestListener.php',
|
|
||||||
'PHPUnit_Framework_CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/CodeCoverageException.php',
|
|
||||||
'PHPUnit_Framework_Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint.php',
|
|
||||||
'PHPUnit_Framework_Constraint_And' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/And.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ArraySubset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Attribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ClassHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Composite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Composite.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Count.php',
|
|
||||||
'PHPUnit_Framework_Constraint_DirectoryExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/DirectoryExists.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ExceptionMessage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php',
|
|
||||||
'PHPUnit_Framework_Constraint_FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php',
|
|
||||||
'PHPUnit_Framework_Constraint_GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsFinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFinite.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsInfinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsNan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNan.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsReadable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsReadable.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsType.php',
|
|
||||||
'PHPUnit_Framework_Constraint_IsWritable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsWritable.php',
|
|
||||||
'PHPUnit_Framework_Constraint_JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php',
|
|
||||||
'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php',
|
|
||||||
'PHPUnit_Framework_Constraint_LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Not' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Not.php',
|
|
||||||
'PHPUnit_Framework_Constraint_ObjectHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Or' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Or.php',
|
|
||||||
'PHPUnit_Framework_Constraint_PCREMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php',
|
|
||||||
'PHPUnit_Framework_Constraint_SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php',
|
|
||||||
'PHPUnit_Framework_Constraint_StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php',
|
|
||||||
'PHPUnit_Framework_Constraint_StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php',
|
|
||||||
'PHPUnit_Framework_Constraint_StringMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringMatches.php',
|
|
||||||
'PHPUnit_Framework_Constraint_StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php',
|
|
||||||
'PHPUnit_Framework_Constraint_TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php',
|
|
||||||
'PHPUnit_Framework_Constraint_TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php',
|
|
||||||
'PHPUnit_Framework_Constraint_Xor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Xor.php',
|
|
||||||
'PHPUnit_Framework_CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/CoveredCodeNotExecutedException.php',
|
|
||||||
'PHPUnit_Framework_Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error.php',
|
|
||||||
'PHPUnit_Framework_Error_Deprecated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Deprecated.php',
|
|
||||||
'PHPUnit_Framework_Error_Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Notice.php',
|
|
||||||
'PHPUnit_Framework_Error_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Warning.php',
|
|
||||||
'PHPUnit_Framework_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception.php',
|
|
||||||
'PHPUnit_Framework_ExceptionWrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php',
|
|
||||||
'PHPUnit_Framework_ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php',
|
|
||||||
'PHPUnit_Framework_IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTest.php',
|
|
||||||
'PHPUnit_Framework_IncompleteTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php',
|
|
||||||
'PHPUnit_Framework_IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestError.php',
|
|
||||||
'PHPUnit_Framework_InvalidCoversTargetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php',
|
|
||||||
'PHPUnit_Framework_MissingCoversAnnotationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MissingCoversAnnotationException.php',
|
|
||||||
'PHPUnit_Framework_MockObject_BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_Identity' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_Match' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_Namespace' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Builder_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Generator' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php',
|
|
||||||
'PHPUnit_Framework_MockObject_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Invocation_Object' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Invocation_Static' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Invokable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_MethodName' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_Parameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php',
|
|
||||||
'PHPUnit_Framework_MockObject_MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php',
|
|
||||||
'PHPUnit_Framework_MockObject_MockObject' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php',
|
|
||||||
'PHPUnit_Framework_MockObject_RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_Return' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_ReturnReference' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnReference.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php',
|
|
||||||
'PHPUnit_Framework_MockObject_Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php',
|
|
||||||
'PHPUnit_Framework_OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/OutputError.php',
|
|
||||||
'PHPUnit_Framework_RiskyTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTest.php',
|
|
||||||
'PHPUnit_Framework_RiskyTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTestError.php',
|
|
||||||
'PHPUnit_Framework_SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php',
|
|
||||||
'PHPUnit_Framework_SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTest.php',
|
|
||||||
'PHPUnit_Framework_SkippedTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestCase.php',
|
|
||||||
'PHPUnit_Framework_SkippedTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestError.php',
|
|
||||||
'PHPUnit_Framework_SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php',
|
|
||||||
'PHPUnit_Framework_SyntheticError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SyntheticError.php',
|
|
||||||
'PHPUnit_Framework_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php',
|
|
||||||
'PHPUnit_Framework_TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php',
|
|
||||||
'PHPUnit_Framework_TestFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestFailure.php',
|
|
||||||
'PHPUnit_Framework_TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListener.php',
|
|
||||||
'PHPUnit_Framework_TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestResult.php',
|
|
||||||
'PHPUnit_Framework_TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php',
|
|
||||||
'PHPUnit_Framework_TestSuite_DataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php',
|
|
||||||
'PHPUnit_Framework_UnintentionallyCoveredCodeError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php',
|
|
||||||
'PHPUnit_Framework_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Warning.php',
|
|
||||||
'PHPUnit_Framework_WarningTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/WarningTestCase.php',
|
|
||||||
'PHPUnit_Runner_BaseTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BaseTestRunner.php',
|
|
||||||
'PHPUnit_Runner_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception.php',
|
|
||||||
'PHPUnit_Runner_Filter_Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
|
|
||||||
'PHPUnit_Runner_Filter_GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group.php',
|
|
||||||
'PHPUnit_Runner_Filter_Group_Exclude' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php',
|
|
||||||
'PHPUnit_Runner_Filter_Group_Include' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Include.php',
|
|
||||||
'PHPUnit_Runner_Filter_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Test.php',
|
|
||||||
'PHPUnit_Runner_StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php',
|
|
||||||
'PHPUnit_Runner_TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php',
|
|
||||||
'PHPUnit_Runner_Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php',
|
|
||||||
'PHPUnit_TextUI_Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command.php',
|
|
||||||
'PHPUnit_TextUI_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ResultPrinter.php',
|
|
||||||
'PHPUnit_TextUI_TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php',
|
|
||||||
'PHPUnit_Util_Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php',
|
|
||||||
'PHPUnit_Util_Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Configuration.php',
|
|
||||||
'PHPUnit_Util_ConfigurationGenerator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ConfigurationGenerator.php',
|
|
||||||
'PHPUnit_Util_ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php',
|
|
||||||
'PHPUnit_Util_Fileloader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Fileloader.php',
|
|
||||||
'PHPUnit_Util_Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php',
|
|
||||||
'PHPUnit_Util_Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php',
|
|
||||||
'PHPUnit_Util_Getopt' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Getopt.php',
|
|
||||||
'PHPUnit_Util_GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php',
|
|
||||||
'PHPUnit_Util_InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php',
|
|
||||||
'PHPUnit_Util_Log_JSON' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JSON.php',
|
|
||||||
'PHPUnit_Util_Log_JUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JUnit.php',
|
|
||||||
'PHPUnit_Util_Log_TAP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TAP.php',
|
|
||||||
'PHPUnit_Util_Log_TeamCity' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TeamCity.php',
|
|
||||||
'PHPUnit_Util_PHP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP.php',
|
|
||||||
'PHPUnit_Util_PHP_Default' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Default.php',
|
|
||||||
'PHPUnit_Util_PHP_Windows' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Windows.php',
|
|
||||||
'PHPUnit_Util_Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php',
|
|
||||||
'PHPUnit_Util_Regex' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Regex.php',
|
|
||||||
'PHPUnit_Util_String' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/String.php',
|
|
||||||
'PHPUnit_Util_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php',
|
|
||||||
'PHPUnit_Util_TestDox_NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php',
|
|
||||||
'PHPUnit_Util_TestDox_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php',
|
|
||||||
'PHPUnit_Util_TestDox_ResultPrinter_HTML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php',
|
|
||||||
'PHPUnit_Util_TestDox_ResultPrinter_Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php',
|
|
||||||
'PHPUnit_Util_TestDox_ResultPrinter_XML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/XML.php',
|
|
||||||
'PHPUnit_Util_TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestSuiteIterator.php',
|
|
||||||
'PHPUnit_Util_Type' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Type.php',
|
|
||||||
'PHPUnit_Util_XML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XML.php',
|
|
||||||
'PHP_Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php',
|
|
||||||
'PHP_Token' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_TokenWithScope' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_TokenWithScopeAndVisibility' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ABSTRACT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_AMPERSAND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_AND_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ARRAY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ARRAY_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_AS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ASYNC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_AT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_AWAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_BACKTICK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_BAD_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_BOOLEAN_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_BOOLEAN_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_BOOL_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_BREAK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CALLABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CARET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CASE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CATCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLASS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLASS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLASS_NAME_CONSTANT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLONE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLOSE_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLOSE_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLOSE_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CLOSE_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_COALESCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_COMMA' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_COMPILER_HALT_OFFSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CONCAT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CONST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CONSTANT_ENCAPSED_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CONTINUE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_CURLY_OPEN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DEC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DEFAULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DIR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DIV' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DIV_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOC_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOLLAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOUBLE_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOUBLE_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOUBLE_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_DOUBLE_QUOTES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ELLIPSIS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ELSE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ELSEIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EMPTY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENCAPSED_AND_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENDDECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENDFOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENDFOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENDIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENDSWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENDWHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_END_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ENUM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EQUALS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EVAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EXCLAMATION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EXIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_EXTENDS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FINAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FINALLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_FUNC_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_GLOBAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_GOTO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_HALT_COMPILER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IMPLEMENTS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INCLUDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INCLUDE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INLINE_HTML' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INSTANCEOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INSTEADOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INTERFACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_INT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ISSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IS_GREATER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IS_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IS_NOT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IS_NOT_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_IS_SMALLER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_Includes' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_JOIN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LAMBDA_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LAMBDA_CP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LAMBDA_OP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LINE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LIST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LOGICAL_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LOGICAL_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LOGICAL_XOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_METHOD_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_MINUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_MINUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_MOD_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_MULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_MUL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_NAMESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_NEW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_NS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_NS_SEPARATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_NULLSAFE_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_NUM_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OBJECT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_ONUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OPEN_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OPEN_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OPEN_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OPEN_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OPEN_TAG_WITH_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PERCENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PIPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PLUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PLUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_POW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_POW_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PRINT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PRIVATE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PROTECTED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_PUBLIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_QUESTION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_REQUIRE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_REQUIRE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_RETURN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SEMICOLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SHAPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SPACESHIP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_START_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_STATIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_STRING_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_STRING_VARNAME' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SUPER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_SWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_Stream' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream.php',
|
|
||||||
'PHP_Token_Stream_CachingFactory' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php',
|
|
||||||
'PHP_Token_THROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TILDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TRAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TRAIT_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TRY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TYPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TYPELIST_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_TYPELIST_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_UNSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_UNSET_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_USE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_USE_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_VAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_VARIABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_WHERE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_WHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_ATTRIBUTE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_CATEGORY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_CATEGORY_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_CHILDREN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_REQUIRED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_TAG_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_TAG_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XHP_TEXT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_XOR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_YIELD' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'PHP_Token_YIELD_FROM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Driver.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Driver\\HHVM' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/HHVM.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Driver\\PHPDBG' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PHPDBG.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Xdebug.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Exception.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Filter.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\MissingCoversAnnotationException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/MissingCoversAnnotationException.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Node\\Builder' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Builder.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Node\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Directory.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Node\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/File.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Iterator.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Clover.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Crap4j.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Facade.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/PHP.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Text.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/File.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Method.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Node.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Project.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Report.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\RuntimeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/RuntimeException.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
|
|
||||||
'SebastianBergmann\\CodeCoverage\\Util' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util.php',
|
|
||||||
'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => __DIR__ . '/..' . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
|
|
||||||
'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php',
|
|
||||||
'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DoubleComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php',
|
|
||||||
'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php',
|
|
||||||
'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php',
|
|
||||||
'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php',
|
|
||||||
'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php',
|
|
||||||
'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php',
|
|
||||||
'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/LongestCommonSubsequence.php',
|
|
||||||
'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php',
|
|
||||||
'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php',
|
|
||||||
'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php',
|
|
||||||
'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php',
|
|
||||||
'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php',
|
|
||||||
'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php',
|
|
||||||
'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php',
|
|
||||||
'SebastianBergmann\\GlobalState\\Blacklist' => __DIR__ . '/..' . '/sebastian/global-state/src/Blacklist.php',
|
|
||||||
'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php',
|
|
||||||
'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/Exception.php',
|
|
||||||
'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php',
|
|
||||||
'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/RuntimeException.php',
|
|
||||||
'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php',
|
|
||||||
'SebastianBergmann\\ObjectEnumerator\\Enumerator' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Enumerator.php',
|
|
||||||
'SebastianBergmann\\ObjectEnumerator\\Exception' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Exception.php',
|
|
||||||
'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/InvalidArgumentException.php',
|
|
||||||
'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php',
|
|
||||||
'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php',
|
|
||||||
'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php',
|
|
||||||
'SebastianBergmann\\ResourceOperations\\ResourceOperations' => __DIR__ . '/..' . '/sebastian/resource-operations/src/ResourceOperations.php',
|
|
||||||
'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php',
|
|
||||||
'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php',
|
|
||||||
);
|
|
||||||
|
|
||||||
public static function getInitializer(ClassLoader $loader)
|
|
||||||
{
|
|
||||||
return \Closure::bind(function () use ($loader) {
|
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInita19fb0695e1b61b4feeb3cc3fbdd2feb::$prefixLengthsPsr4;
|
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInita19fb0695e1b61b4feeb3cc3fbdd2feb::$prefixDirsPsr4;
|
|
||||||
$loader->prefixesPsr0 = ComposerStaticInita19fb0695e1b61b4feeb3cc3fbdd2feb::$prefixesPsr0;
|
|
||||||
$loader->classMap = ComposerStaticInita19fb0695e1b61b4feeb3cc3fbdd2feb::$classMap;
|
|
||||||
|
|
||||||
}, null, ClassLoader::class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
4615
pfosten/vendor/composer/installed.json
vendored
4615
pfosten/vendor/composer/installed.json
vendored
File diff suppressed because it is too large
Load diff
19
pfosten/vendor/dnoegel/php-xdg-base-dir/LICENSE
vendored
19
pfosten/vendor/dnoegel/php-xdg-base-dir/LICENSE
vendored
|
|
@ -1,19 +0,0 @@
|
||||||
Copyright (c) 2014 Daniel Nögel
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
# XDG Base Directory
|
|
||||||
|
|
||||||
[](https://packagist.org/packages/dnoegel/php-xdg-base-dir)
|
|
||||||
[](https://packagist.org/packages/dnoegel/php-xdg-base-dir)
|
|
||||||
[](LICENSE.md)
|
|
||||||
[](https://travis-ci.org/dnoegel/php-xdg-base-dir)
|
|
||||||
|
|
||||||
Implementation of XDG Base Directory specification for php
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Via Composer
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
$ composer require dnoegel/php-xdg-base-dir
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
``` php
|
|
||||||
$xdg = new \XdgBaseDir\Xdg();
|
|
||||||
|
|
||||||
echo $xdg->getHomeDir();
|
|
||||||
echo $xdg->getHomeConfigDir();
|
|
||||||
echo $xdg->getHomeDataDir();
|
|
||||||
echo $xdg->getHomeCacheDir();
|
|
||||||
echo $xdg->getRuntimeDir();
|
|
||||||
|
|
||||||
print_r($xdg->getDataDirs()); // returns array
|
|
||||||
print_r($xdg->getConfigDirs()); // returns array
|
|
||||||
```
|
|
||||||
|
|
||||||
## Testing
|
|
||||||
|
|
||||||
``` bash
|
|
||||||
$ phpunit
|
|
||||||
```
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
The MIT License (MIT). Please see [License File](https://github.com/dnoegel/php-xdg-base-dir/blob/master/LICENSE) for more information.
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
"name": "dnoegel/php-xdg-base-dir",
|
|
||||||
"description": "implementation of xdg base directory specification for php",
|
|
||||||
"type": "library",
|
|
||||||
"license": "MIT",
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3.2"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35"
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"XdgBaseDir\\": "src/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
132
pfosten/vendor/dnoegel/php-xdg-base-dir/src/Xdg.php
vendored
132
pfosten/vendor/dnoegel/php-xdg-base-dir/src/Xdg.php
vendored
|
|
@ -1,132 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace XdgBaseDir;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Simple implementation of the XDG standard http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
|
||||||
*
|
|
||||||
* Based on the python implementation https://github.com/takluyver/pyxdg/blob/master/xdg/BaseDirectory.py
|
|
||||||
*/
|
|
||||||
class Xdg
|
|
||||||
{
|
|
||||||
const S_IFDIR = 040000; // directory
|
|
||||||
const S_IRWXO = 00007; // rwx other
|
|
||||||
const S_IRWXG = 00056; // rwx group
|
|
||||||
const RUNTIME_DIR_FALLBACK = 'php-xdg-runtime-dir-fallback-';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getHomeDir()
|
|
||||||
{
|
|
||||||
return getenv('HOME') ?: (getenv('HOMEDRIVE') . DIRECTORY_SEPARATOR . getenv('HOMEPATH'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getHomeConfigDir()
|
|
||||||
{
|
|
||||||
if ($path = getenv('XDG_CONFIG_HOME')) {
|
|
||||||
return $path;
|
|
||||||
}
|
|
||||||
|
|
||||||
$homeDir = $this->getHomeDir();
|
|
||||||
|
|
||||||
$path = DIRECTORY_SEPARATOR === $homeDir ? $homeDir.'.config' : $homeDir . DIRECTORY_SEPARATOR . '.config';
|
|
||||||
|
|
||||||
return $path;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getHomeDataDir()
|
|
||||||
{
|
|
||||||
$path = getenv('XDG_DATA_HOME') ?: $this->getHomeDir() . DIRECTORY_SEPARATOR . '.local' . DIRECTORY_SEPARATOR . 'share';
|
|
||||||
|
|
||||||
return $path;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getConfigDirs()
|
|
||||||
{
|
|
||||||
$configDirs = getenv('XDG_CONFIG_DIRS') ? explode(':', getenv('XDG_CONFIG_DIRS')) : array('/etc/xdg');
|
|
||||||
|
|
||||||
$paths = array_merge(array($this->getHomeConfigDir()), $configDirs);
|
|
||||||
|
|
||||||
return $paths;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getDataDirs()
|
|
||||||
{
|
|
||||||
$dataDirs = getenv('XDG_DATA_DIRS') ? explode(':', getenv('XDG_DATA_DIRS')) : array('/usr/local/share', '/usr/share');
|
|
||||||
|
|
||||||
$paths = array_merge(array($this->getHomeDataDir()), $dataDirs);
|
|
||||||
|
|
||||||
return $paths;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getHomeCacheDir()
|
|
||||||
{
|
|
||||||
$path = getenv('XDG_CACHE_HOME') ?: $this->getHomeDir() . DIRECTORY_SEPARATOR . '.cache';
|
|
||||||
|
|
||||||
return $path;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getRuntimeDir($strict=true)
|
|
||||||
{
|
|
||||||
if ($runtimeDir = getenv('XDG_RUNTIME_DIR')) {
|
|
||||||
return $runtimeDir;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($strict) {
|
|
||||||
throw new \RuntimeException('XDG_RUNTIME_DIR was not set');
|
|
||||||
}
|
|
||||||
|
|
||||||
$fallback = sys_get_temp_dir() . DIRECTORY_SEPARATOR . self::RUNTIME_DIR_FALLBACK . getenv('USER');
|
|
||||||
|
|
||||||
$create = false;
|
|
||||||
|
|
||||||
if (!is_dir($fallback)) {
|
|
||||||
mkdir($fallback, 0700, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
$st = lstat($fallback);
|
|
||||||
|
|
||||||
# The fallback must be a directory
|
|
||||||
if (!$st['mode'] & self::S_IFDIR) {
|
|
||||||
rmdir($fallback);
|
|
||||||
$create = true;
|
|
||||||
} elseif ($st['uid'] != $this->getUid() ||
|
|
||||||
$st['mode'] & (self::S_IRWXG | self::S_IRWXO)
|
|
||||||
) {
|
|
||||||
rmdir($fallback);
|
|
||||||
$create = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($create) {
|
|
||||||
mkdir($fallback, 0700, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $fallback;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getUid()
|
|
||||||
{
|
|
||||||
if (function_exists('posix_getuid')) {
|
|
||||||
return posix_getuid();
|
|
||||||
}
|
|
||||||
|
|
||||||
return getmyuid();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
19
pfosten/vendor/doctrine/inflector/LICENSE
vendored
19
pfosten/vendor/doctrine/inflector/LICENSE
vendored
|
|
@ -1,19 +0,0 @@
|
||||||
Copyright (c) 2006-2015 Doctrine Project
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
|
||||||
the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
6
pfosten/vendor/doctrine/inflector/README.md
vendored
6
pfosten/vendor/doctrine/inflector/README.md
vendored
|
|
@ -1,6 +0,0 @@
|
||||||
# Doctrine Inflector
|
|
||||||
|
|
||||||
Doctrine Inflector is a small library that can perform string manipulations
|
|
||||||
with regard to upper-/lowercase and singular/plural forms of words.
|
|
||||||
|
|
||||||
[](https://travis-ci.org/doctrine/inflector)
|
|
||||||
32
pfosten/vendor/doctrine/inflector/composer.json
vendored
32
pfosten/vendor/doctrine/inflector/composer.json
vendored
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
"name": "doctrine/inflector",
|
|
||||||
"type": "library",
|
|
||||||
"description": "Common String Manipulations with regard to casing and singular/plural rules.",
|
|
||||||
"keywords": ["string", "inflection", "singularize", "pluralize"],
|
|
||||||
"homepage": "http://www.doctrine-project.org",
|
|
||||||
"license": "MIT",
|
|
||||||
"authors": [
|
|
||||||
{"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"},
|
|
||||||
{"name": "Roman Borschel", "email": "roman@code-factory.org"},
|
|
||||||
{"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"},
|
|
||||||
{"name": "Jonathan Wage", "email": "jonwage@gmail.com"},
|
|
||||||
{"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"}
|
|
||||||
],
|
|
||||||
"require": {
|
|
||||||
"php": "^7.1"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^6.2"
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": { "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" }
|
|
||||||
},
|
|
||||||
"autoload-dev": {
|
|
||||||
"psr-4": { "Doctrine\\Tests\\Common\\Inflector\\": "tests/Doctrine/Tests/Common/Inflector" }
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.3.x-dev"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,492 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
||||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
||||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
||||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
* This software consists of voluntary contributions made by many individuals
|
|
||||||
* and is licensed under the MIT license. For more information, see
|
|
||||||
* <http://www.doctrine-project.org>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Doctrine\Common\Inflector;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Doctrine inflector has static methods for inflecting text.
|
|
||||||
*
|
|
||||||
* The methods in these classes are from several different sources collected
|
|
||||||
* across several different php projects and several different authors. The
|
|
||||||
* original author names and emails are not known.
|
|
||||||
*
|
|
||||||
* Pluralize & Singularize implementation are borrowed from CakePHP with some modifications.
|
|
||||||
*
|
|
||||||
* @link www.doctrine-project.org
|
|
||||||
* @since 1.0
|
|
||||||
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
|
|
||||||
* @author Jonathan H. Wage <jonwage@gmail.com>
|
|
||||||
*/
|
|
||||||
class Inflector
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Plural inflector rules.
|
|
||||||
*
|
|
||||||
* @var string[][]
|
|
||||||
*/
|
|
||||||
private static $plural = array(
|
|
||||||
'rules' => array(
|
|
||||||
'/(s)tatus$/i' => '\1\2tatuses',
|
|
||||||
'/(quiz)$/i' => '\1zes',
|
|
||||||
'/^(ox)$/i' => '\1\2en',
|
|
||||||
'/([m|l])ouse$/i' => '\1ice',
|
|
||||||
'/(matr|vert|ind)(ix|ex)$/i' => '\1ices',
|
|
||||||
'/(x|ch|ss|sh)$/i' => '\1es',
|
|
||||||
'/([^aeiouy]|qu)y$/i' => '\1ies',
|
|
||||||
'/(hive|gulf)$/i' => '\1s',
|
|
||||||
'/(?:([^f])fe|([lr])f)$/i' => '\1\2ves',
|
|
||||||
'/sis$/i' => 'ses',
|
|
||||||
'/([ti])um$/i' => '\1a',
|
|
||||||
'/(c)riterion$/i' => '\1riteria',
|
|
||||||
'/(p)erson$/i' => '\1eople',
|
|
||||||
'/(m)an$/i' => '\1en',
|
|
||||||
'/(c)hild$/i' => '\1hildren',
|
|
||||||
'/(f)oot$/i' => '\1eet',
|
|
||||||
'/(buffal|her|potat|tomat|volcan)o$/i' => '\1\2oes',
|
|
||||||
'/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|vir)us$/i' => '\1i',
|
|
||||||
'/us$/i' => 'uses',
|
|
||||||
'/(alias)$/i' => '\1es',
|
|
||||||
'/(analys|ax|cris|test|thes)is$/i' => '\1es',
|
|
||||||
'/s$/' => 's',
|
|
||||||
'/^$/' => '',
|
|
||||||
'/$/' => 's',
|
|
||||||
),
|
|
||||||
'uninflected' => array(
|
|
||||||
'.*[nrlm]ese',
|
|
||||||
'.*deer',
|
|
||||||
'.*fish',
|
|
||||||
'.*measles',
|
|
||||||
'.*ois',
|
|
||||||
'.*pox',
|
|
||||||
'.*sheep',
|
|
||||||
'people',
|
|
||||||
'cookie',
|
|
||||||
'police',
|
|
||||||
),
|
|
||||||
'irregular' => array(
|
|
||||||
'atlas' => 'atlases',
|
|
||||||
'axe' => 'axes',
|
|
||||||
'beef' => 'beefs',
|
|
||||||
'brother' => 'brothers',
|
|
||||||
'cafe' => 'cafes',
|
|
||||||
'canvas' => 'canvases',
|
|
||||||
'chateau' => 'chateaux',
|
|
||||||
'niveau' => 'niveaux',
|
|
||||||
'child' => 'children',
|
|
||||||
'cookie' => 'cookies',
|
|
||||||
'corpus' => 'corpuses',
|
|
||||||
'cow' => 'cows',
|
|
||||||
'criterion' => 'criteria',
|
|
||||||
'curriculum' => 'curricula',
|
|
||||||
'demo' => 'demos',
|
|
||||||
'domino' => 'dominoes',
|
|
||||||
'echo' => 'echoes',
|
|
||||||
'foot' => 'feet',
|
|
||||||
'fungus' => 'fungi',
|
|
||||||
'ganglion' => 'ganglions',
|
|
||||||
'gas' => 'gases',
|
|
||||||
'genie' => 'genies',
|
|
||||||
'genus' => 'genera',
|
|
||||||
'goose' => 'geese',
|
|
||||||
'graffito' => 'graffiti',
|
|
||||||
'hippopotamus' => 'hippopotami',
|
|
||||||
'hoof' => 'hoofs',
|
|
||||||
'human' => 'humans',
|
|
||||||
'iris' => 'irises',
|
|
||||||
'larva' => 'larvae',
|
|
||||||
'leaf' => 'leaves',
|
|
||||||
'loaf' => 'loaves',
|
|
||||||
'man' => 'men',
|
|
||||||
'medium' => 'media',
|
|
||||||
'memorandum' => 'memoranda',
|
|
||||||
'money' => 'monies',
|
|
||||||
'mongoose' => 'mongooses',
|
|
||||||
'motto' => 'mottoes',
|
|
||||||
'move' => 'moves',
|
|
||||||
'mythos' => 'mythoi',
|
|
||||||
'niche' => 'niches',
|
|
||||||
'nucleus' => 'nuclei',
|
|
||||||
'numen' => 'numina',
|
|
||||||
'occiput' => 'occiputs',
|
|
||||||
'octopus' => 'octopuses',
|
|
||||||
'opus' => 'opuses',
|
|
||||||
'ox' => 'oxen',
|
|
||||||
'passerby' => 'passersby',
|
|
||||||
'penis' => 'penises',
|
|
||||||
'person' => 'people',
|
|
||||||
'plateau' => 'plateaux',
|
|
||||||
'runner-up' => 'runners-up',
|
|
||||||
'sex' => 'sexes',
|
|
||||||
'soliloquy' => 'soliloquies',
|
|
||||||
'son-in-law' => 'sons-in-law',
|
|
||||||
'syllabus' => 'syllabi',
|
|
||||||
'testis' => 'testes',
|
|
||||||
'thief' => 'thieves',
|
|
||||||
'tooth' => 'teeth',
|
|
||||||
'tornado' => 'tornadoes',
|
|
||||||
'trilby' => 'trilbys',
|
|
||||||
'turf' => 'turfs',
|
|
||||||
'valve' => 'valves',
|
|
||||||
'volcano' => 'volcanoes',
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Singular inflector rules.
|
|
||||||
*
|
|
||||||
* @var string[][]
|
|
||||||
*/
|
|
||||||
private static $singular = array(
|
|
||||||
'rules' => array(
|
|
||||||
'/(s)tatuses$/i' => '\1\2tatus',
|
|
||||||
'/^(.*)(menu)s$/i' => '\1\2',
|
|
||||||
'/(quiz)zes$/i' => '\\1',
|
|
||||||
'/(matr)ices$/i' => '\1ix',
|
|
||||||
'/(vert|ind)ices$/i' => '\1ex',
|
|
||||||
'/^(ox)en/i' => '\1',
|
|
||||||
'/(alias)(es)*$/i' => '\1',
|
|
||||||
'/(buffal|her|potat|tomat|volcan)oes$/i' => '\1o',
|
|
||||||
'/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|viri?)i$/i' => '\1us',
|
|
||||||
'/([ftw]ax)es/i' => '\1',
|
|
||||||
'/(analys|ax|cris|test|thes)es$/i' => '\1is',
|
|
||||||
'/(shoe|slave)s$/i' => '\1',
|
|
||||||
'/(o)es$/i' => '\1',
|
|
||||||
'/ouses$/' => 'ouse',
|
|
||||||
'/([^a])uses$/' => '\1us',
|
|
||||||
'/([m|l])ice$/i' => '\1ouse',
|
|
||||||
'/(x|ch|ss|sh)es$/i' => '\1',
|
|
||||||
'/(m)ovies$/i' => '\1\2ovie',
|
|
||||||
'/(s)eries$/i' => '\1\2eries',
|
|
||||||
'/([^aeiouy]|qu)ies$/i' => '\1y',
|
|
||||||
'/([lr])ves$/i' => '\1f',
|
|
||||||
'/(tive)s$/i' => '\1',
|
|
||||||
'/(hive)s$/i' => '\1',
|
|
||||||
'/(drive)s$/i' => '\1',
|
|
||||||
'/(dive)s$/i' => '\1',
|
|
||||||
'/(olive)s$/i' => '\1',
|
|
||||||
'/([^fo])ves$/i' => '\1fe',
|
|
||||||
'/(^analy)ses$/i' => '\1sis',
|
|
||||||
'/(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis',
|
|
||||||
'/(c)riteria$/i' => '\1riterion',
|
|
||||||
'/([ti])a$/i' => '\1um',
|
|
||||||
'/(p)eople$/i' => '\1\2erson',
|
|
||||||
'/(m)en$/i' => '\1an',
|
|
||||||
'/(c)hildren$/i' => '\1\2hild',
|
|
||||||
'/(f)eet$/i' => '\1oot',
|
|
||||||
'/(n)ews$/i' => '\1\2ews',
|
|
||||||
'/eaus$/' => 'eau',
|
|
||||||
'/^(.*us)$/' => '\\1',
|
|
||||||
'/s$/i' => '',
|
|
||||||
),
|
|
||||||
'uninflected' => array(
|
|
||||||
'.*[nrlm]ese',
|
|
||||||
'.*deer',
|
|
||||||
'.*fish',
|
|
||||||
'.*measles',
|
|
||||||
'.*ois',
|
|
||||||
'.*pox',
|
|
||||||
'.*sheep',
|
|
||||||
'.*ss',
|
|
||||||
'data',
|
|
||||||
'police',
|
|
||||||
'pants',
|
|
||||||
'clothes',
|
|
||||||
),
|
|
||||||
'irregular' => array(
|
|
||||||
'abuses' => 'abuse',
|
|
||||||
'avalanches' => 'avalanche',
|
|
||||||
'caches' => 'cache',
|
|
||||||
'criteria' => 'criterion',
|
|
||||||
'curves' => 'curve',
|
|
||||||
'emphases' => 'emphasis',
|
|
||||||
'foes' => 'foe',
|
|
||||||
'geese' => 'goose',
|
|
||||||
'graves' => 'grave',
|
|
||||||
'hoaxes' => 'hoax',
|
|
||||||
'media' => 'medium',
|
|
||||||
'neuroses' => 'neurosis',
|
|
||||||
'waves' => 'wave',
|
|
||||||
'oases' => 'oasis',
|
|
||||||
'valves' => 'valve',
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Words that should not be inflected.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private static $uninflected = array(
|
|
||||||
'.*?media', 'Amoyese', 'audio', 'bison', 'Borghese', 'bream', 'breeches',
|
|
||||||
'britches', 'buffalo', 'cantus', 'carp', 'chassis', 'clippers', 'cod', 'coitus', 'compensation', 'Congoese',
|
|
||||||
'contretemps', 'coreopsis', 'corps', 'data', 'debris', 'deer', 'diabetes', 'djinn', 'education', 'eland',
|
|
||||||
'elk', 'emoji', 'equipment', 'evidence', 'Faroese', 'feedback', 'fish', 'flounder', 'Foochowese',
|
|
||||||
'Furniture', 'furniture', 'gallows', 'Genevese', 'Genoese', 'Gilbertese', 'gold',
|
|
||||||
'headquarters', 'herpes', 'hijinks', 'Hottentotese', 'information', 'innings', 'jackanapes', 'jedi',
|
|
||||||
'Kiplingese', 'knowledge', 'Kongoese', 'love', 'Lucchese', 'Luggage', 'mackerel', 'Maltese', 'metadata',
|
|
||||||
'mews', 'moose', 'mumps', 'Nankingese', 'news', 'nexus', 'Niasese', 'nutrition', 'offspring',
|
|
||||||
'Pekingese', 'Piedmontese', 'pincers', 'Pistoiese', 'plankton', 'pliers', 'pokemon', 'police', 'Portuguese',
|
|
||||||
'proceedings', 'rabies', 'rain', 'rhinoceros', 'rice', 'salmon', 'Sarawakese', 'scissors', 'sea[- ]bass',
|
|
||||||
'series', 'Shavese', 'shears', 'sheep', 'siemens', 'species', 'staff', 'swine', 'traffic',
|
|
||||||
'trousers', 'trout', 'tuna', 'us', 'Vermontese', 'Wenchowese', 'wheat', 'whiting', 'wildebeest', 'Yengeese'
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method cache array.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private static $cache = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The initial state of Inflector so reset() works.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private static $initialState = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'.
|
|
||||||
*/
|
|
||||||
public static function tableize(string $word) : string
|
|
||||||
{
|
|
||||||
return strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', $word));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts a word into the format for a Doctrine class name. Converts 'table_name' to 'TableName'.
|
|
||||||
*/
|
|
||||||
public static function classify(string $word) : string
|
|
||||||
{
|
|
||||||
return str_replace([' ', '_', '-'], '', ucwords($word, ' _-'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Camelizes a word. This uses the classify() method and turns the first character to lowercase.
|
|
||||||
*/
|
|
||||||
public static function camelize(string $word) : string
|
|
||||||
{
|
|
||||||
return lcfirst(self::classify($word));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Uppercases words with configurable delimeters between words.
|
|
||||||
*
|
|
||||||
* Takes a string and capitalizes all of the words, like PHP's built-in
|
|
||||||
* ucwords function. This extends that behavior, however, by allowing the
|
|
||||||
* word delimeters to be configured, rather than only separating on
|
|
||||||
* whitespace.
|
|
||||||
*
|
|
||||||
* Here is an example:
|
|
||||||
* <code>
|
|
||||||
* <?php
|
|
||||||
* $string = 'top-o-the-morning to all_of_you!';
|
|
||||||
* echo \Doctrine\Common\Inflector\Inflector::ucwords($string);
|
|
||||||
* // Top-O-The-Morning To All_of_you!
|
|
||||||
*
|
|
||||||
* echo \Doctrine\Common\Inflector\Inflector::ucwords($string, '-_ ');
|
|
||||||
* // Top-O-The-Morning To All_Of_You!
|
|
||||||
* ?>
|
|
||||||
* </code>
|
|
||||||
*
|
|
||||||
* @param string $string The string to operate on.
|
|
||||||
* @param string $delimiters A list of word separators.
|
|
||||||
*
|
|
||||||
* @return string The string with all delimeter-separated words capitalized.
|
|
||||||
*/
|
|
||||||
public static function ucwords(string $string, string $delimiters = " \n\t\r\0\x0B-") : string
|
|
||||||
{
|
|
||||||
return ucwords($string, $delimiters);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clears Inflectors inflected value caches, and resets the inflection
|
|
||||||
* rules to the initial values.
|
|
||||||
*/
|
|
||||||
public static function reset() : void
|
|
||||||
{
|
|
||||||
if (empty(self::$initialState)) {
|
|
||||||
self::$initialState = get_class_vars('Inflector');
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (self::$initialState as $key => $val) {
|
|
||||||
if ($key !== 'initialState') {
|
|
||||||
self::${$key} = $val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds custom inflection $rules, of either 'plural' or 'singular' $type.
|
|
||||||
*
|
|
||||||
* ### Usage:
|
|
||||||
*
|
|
||||||
* {{{
|
|
||||||
* Inflector::rules('plural', array('/^(inflect)or$/i' => '\1ables'));
|
|
||||||
* Inflector::rules('plural', array(
|
|
||||||
* 'rules' => array('/^(inflect)ors$/i' => '\1ables'),
|
|
||||||
* 'uninflected' => array('dontinflectme'),
|
|
||||||
* 'irregular' => array('red' => 'redlings')
|
|
||||||
* ));
|
|
||||||
* }}}
|
|
||||||
*
|
|
||||||
* @param string $type The type of inflection, either 'plural' or 'singular'
|
|
||||||
* @param array|iterable $rules An array of rules to be added.
|
|
||||||
* @param boolean $reset If true, will unset default inflections for all
|
|
||||||
* new rules that are being defined in $rules.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function rules(string $type, iterable $rules, bool $reset = false) : void
|
|
||||||
{
|
|
||||||
foreach ($rules as $rule => $pattern) {
|
|
||||||
if ( ! is_array($pattern)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($reset) {
|
|
||||||
self::${$type}[$rule] = $pattern;
|
|
||||||
} else {
|
|
||||||
self::${$type}[$rule] = ($rule === 'uninflected')
|
|
||||||
? array_merge($pattern, self::${$type}[$rule])
|
|
||||||
: $pattern + self::${$type}[$rule];
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($rules[$rule], self::${$type}['cache' . ucfirst($rule)]);
|
|
||||||
|
|
||||||
if (isset(self::${$type}['merged'][$rule])) {
|
|
||||||
unset(self::${$type}['merged'][$rule]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($type === 'plural') {
|
|
||||||
self::$cache['pluralize'] = self::$cache['tableize'] = array();
|
|
||||||
} elseif ($type === 'singular') {
|
|
||||||
self::$cache['singularize'] = array();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self::${$type}['rules'] = $rules + self::${$type}['rules'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a word in plural form.
|
|
||||||
*
|
|
||||||
* @param string $word The word in singular form.
|
|
||||||
*
|
|
||||||
* @return string The word in plural form.
|
|
||||||
*/
|
|
||||||
public static function pluralize(string $word) : string
|
|
||||||
{
|
|
||||||
if (isset(self::$cache['pluralize'][$word])) {
|
|
||||||
return self::$cache['pluralize'][$word];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset(self::$plural['merged']['irregular'])) {
|
|
||||||
self::$plural['merged']['irregular'] = self::$plural['irregular'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset(self::$plural['merged']['uninflected'])) {
|
|
||||||
self::$plural['merged']['uninflected'] = array_merge(self::$plural['uninflected'], self::$uninflected);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset(self::$plural['cacheUninflected']) || !isset(self::$plural['cacheIrregular'])) {
|
|
||||||
self::$plural['cacheUninflected'] = '(?:' . implode('|', self::$plural['merged']['uninflected']) . ')';
|
|
||||||
self::$plural['cacheIrregular'] = '(?:' . implode('|', array_keys(self::$plural['merged']['irregular'])) . ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (preg_match('/(.*)\\b(' . self::$plural['cacheIrregular'] . ')$/i', $word, $regs)) {
|
|
||||||
self::$cache['pluralize'][$word] = $regs[1] . $word[0] . substr(self::$plural['merged']['irregular'][strtolower($regs[2])], 1);
|
|
||||||
|
|
||||||
return self::$cache['pluralize'][$word];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (preg_match('/^(' . self::$plural['cacheUninflected'] . ')$/i', $word, $regs)) {
|
|
||||||
self::$cache['pluralize'][$word] = $word;
|
|
||||||
|
|
||||||
return $word;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (self::$plural['rules'] as $rule => $replacement) {
|
|
||||||
if (preg_match($rule, $word)) {
|
|
||||||
self::$cache['pluralize'][$word] = preg_replace($rule, $replacement, $word);
|
|
||||||
|
|
||||||
return self::$cache['pluralize'][$word];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a word in singular form.
|
|
||||||
*
|
|
||||||
* @param string $word The word in plural form.
|
|
||||||
*
|
|
||||||
* @return string The word in singular form.
|
|
||||||
*/
|
|
||||||
public static function singularize(string $word) : string
|
|
||||||
{
|
|
||||||
if (isset(self::$cache['singularize'][$word])) {
|
|
||||||
return self::$cache['singularize'][$word];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset(self::$singular['merged']['uninflected'])) {
|
|
||||||
self::$singular['merged']['uninflected'] = array_merge(
|
|
||||||
self::$singular['uninflected'],
|
|
||||||
self::$uninflected
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset(self::$singular['merged']['irregular'])) {
|
|
||||||
self::$singular['merged']['irregular'] = array_merge(
|
|
||||||
self::$singular['irregular'],
|
|
||||||
array_flip(self::$plural['irregular'])
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset(self::$singular['cacheUninflected']) || !isset(self::$singular['cacheIrregular'])) {
|
|
||||||
self::$singular['cacheUninflected'] = '(?:' . implode('|', self::$singular['merged']['uninflected']) . ')';
|
|
||||||
self::$singular['cacheIrregular'] = '(?:' . implode('|', array_keys(self::$singular['merged']['irregular'])) . ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (preg_match('/(.*)\\b(' . self::$singular['cacheIrregular'] . ')$/i', $word, $regs)) {
|
|
||||||
self::$cache['singularize'][$word] = $regs[1] . $word[0] . substr(self::$singular['merged']['irregular'][strtolower($regs[2])], 1);
|
|
||||||
|
|
||||||
return self::$cache['singularize'][$word];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (preg_match('/^(' . self::$singular['cacheUninflected'] . ')$/i', $word, $regs)) {
|
|
||||||
self::$cache['singularize'][$word] = $word;
|
|
||||||
|
|
||||||
return $word;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (self::$singular['rules'] as $rule => $replacement) {
|
|
||||||
if (preg_match($rule, $word)) {
|
|
||||||
self::$cache['singularize'][$word] = preg_replace($rule, $replacement, $word);
|
|
||||||
|
|
||||||
return self::$cache['singularize'][$word];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self::$cache['singularize'][$word] = $word;
|
|
||||||
|
|
||||||
return $word;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
# Contributing
|
|
||||||
|
|
||||||
* Follow the [Doctrine Coding Standard](https://github.com/doctrine/coding-standard)
|
|
||||||
* The project will follow strict [object calisthenics](http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php)
|
|
||||||
* Any contribution must provide tests for additional introduced conditions
|
|
||||||
* Any un-confirmed issue needs a failing test case before being accepted
|
|
||||||
* Pull requests must be sent from a new hotfix/feature branch, not from `master`.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
To install the project and run the tests, you need to clone it first:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ git clone git://github.com/doctrine/instantiator.git
|
|
||||||
```
|
|
||||||
|
|
||||||
You will then need to run a composer installation:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ cd Instantiator
|
|
||||||
$ curl -s https://getcomposer.org/installer | php
|
|
||||||
$ php composer.phar update
|
|
||||||
```
|
|
||||||
|
|
||||||
## Testing
|
|
||||||
|
|
||||||
The PHPUnit version to be used is the one installed as a dev- dependency via composer:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ ./vendor/bin/phpunit
|
|
||||||
```
|
|
||||||
|
|
||||||
Accepted coverage for new contributions is 80%. Any contribution not satisfying this requirement
|
|
||||||
won't be merged.
|
|
||||||
|
|
||||||
19
pfosten/vendor/doctrine/instantiator/LICENSE
vendored
19
pfosten/vendor/doctrine/instantiator/LICENSE
vendored
|
|
@ -1,19 +0,0 @@
|
||||||
Copyright (c) 2014 Doctrine Project
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
|
||||||
the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
39
pfosten/vendor/doctrine/instantiator/README.md
vendored
39
pfosten/vendor/doctrine/instantiator/README.md
vendored
|
|
@ -1,39 +0,0 @@
|
||||||
# Instantiator
|
|
||||||
|
|
||||||
This library provides a way of avoiding usage of constructors when instantiating PHP classes.
|
|
||||||
|
|
||||||
[](https://travis-ci.org/doctrine/instantiator)
|
|
||||||
[](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master)
|
|
||||||
[](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master)
|
|
||||||
[](https://www.versioneye.com/package/php--doctrine--instantiator)
|
|
||||||
|
|
||||||
[](https://packagist.org/packages/doctrine/instantiator)
|
|
||||||
[](https://packagist.org/packages/doctrine/instantiator)
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
The suggested installation method is via [composer](https://getcomposer.org/):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
php composer.phar require "doctrine/instantiator:~1.0.3"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
The instantiator is able to create new instances of any class without using the constructor or any API of the class
|
|
||||||
itself:
|
|
||||||
|
|
||||||
```php
|
|
||||||
$instantiator = new \Doctrine\Instantiator\Instantiator();
|
|
||||||
|
|
||||||
$instance = $instantiator->instantiate(\My\ClassName\Here::class);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out!
|
|
||||||
|
|
||||||
## Credits
|
|
||||||
|
|
||||||
This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which
|
|
||||||
has been donated to the doctrine organization, and which is now deprecated in favour of this package.
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
{
|
|
||||||
"name": "doctrine/instantiator",
|
|
||||||
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
|
|
||||||
"type": "library",
|
|
||||||
"license": "MIT",
|
|
||||||
"homepage": "https://www.doctrine-project.org/projects/instantiator.html",
|
|
||||||
"keywords": [
|
|
||||||
"instantiate",
|
|
||||||
"constructor"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Marco Pivetta",
|
|
||||||
"email": "ocramius@gmail.com",
|
|
||||||
"homepage": "http://ocramius.github.com/"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"require": {
|
|
||||||
"php": "^7.1"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"ext-phar": "*",
|
|
||||||
"ext-pdo": "*",
|
|
||||||
"doctrine/coding-standard": "^6.0",
|
|
||||||
"phpbench/phpbench": "^0.13",
|
|
||||||
"phpstan/phpstan-phpunit": "^0.11",
|
|
||||||
"phpstan/phpstan-shim": "^0.11",
|
|
||||||
"phpunit/phpunit": "^7.0"
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload-dev": {
|
|
||||||
"psr-0": {
|
|
||||||
"DoctrineTest\\InstantiatorPerformance\\": "tests",
|
|
||||||
"DoctrineTest\\InstantiatorTest\\": "tests",
|
|
||||||
"DoctrineTest\\InstantiatorTestAsset\\": "tests"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.2.x-dev"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Doctrine\Instantiator\Exception;
|
|
||||||
|
|
||||||
use Throwable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Base exception marker interface for the instantiator component
|
|
||||||
*/
|
|
||||||
interface ExceptionInterface extends Throwable
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Doctrine\Instantiator\Exception;
|
|
||||||
|
|
||||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
|
||||||
use ReflectionClass;
|
|
||||||
use const PHP_VERSION_ID;
|
|
||||||
use function interface_exists;
|
|
||||||
use function sprintf;
|
|
||||||
use function trait_exists;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Exception for invalid arguments provided to the instantiator
|
|
||||||
*/
|
|
||||||
class InvalidArgumentException extends BaseInvalidArgumentException implements ExceptionInterface
|
|
||||||
{
|
|
||||||
public static function fromNonExistingClass(string $className) : self
|
|
||||||
{
|
|
||||||
if (interface_exists($className)) {
|
|
||||||
return new self(sprintf('The provided type "%s" is an interface, and can not be instantiated', $className));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PHP_VERSION_ID >= 50400 && trait_exists($className)) {
|
|
||||||
return new self(sprintf('The provided type "%s" is a trait, and can not be instantiated', $className));
|
|
||||||
}
|
|
||||||
|
|
||||||
return new self(sprintf('The provided class "%s" does not exist', $className));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function fromAbstractClass(ReflectionClass $reflectionClass) : self
|
|
||||||
{
|
|
||||||
return new self(sprintf(
|
|
||||||
'The provided class "%s" is abstract, and can not be instantiated',
|
|
||||||
$reflectionClass->getName()
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Doctrine\Instantiator\Exception;
|
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use ReflectionClass;
|
|
||||||
use UnexpectedValueException as BaseUnexpectedValueException;
|
|
||||||
use function sprintf;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Exception for given parameters causing invalid/unexpected state on instantiation
|
|
||||||
*/
|
|
||||||
class UnexpectedValueException extends BaseUnexpectedValueException implements ExceptionInterface
|
|
||||||
{
|
|
||||||
public static function fromSerializationTriggeredException(
|
|
||||||
ReflectionClass $reflectionClass,
|
|
||||||
Exception $exception
|
|
||||||
) : self {
|
|
||||||
return new self(
|
|
||||||
sprintf(
|
|
||||||
'An exception was raised while trying to instantiate an instance of "%s" via un-serialization',
|
|
||||||
$reflectionClass->getName()
|
|
||||||
),
|
|
||||||
0,
|
|
||||||
$exception
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function fromUncleanUnSerialization(
|
|
||||||
ReflectionClass $reflectionClass,
|
|
||||||
string $errorString,
|
|
||||||
int $errorCode,
|
|
||||||
string $errorFile,
|
|
||||||
int $errorLine
|
|
||||||
) : self {
|
|
||||||
return new self(
|
|
||||||
sprintf(
|
|
||||||
'Could not produce an instance of "%s" via un-serialization, since an error was triggered '
|
|
||||||
. 'in file "%s" at line "%d"',
|
|
||||||
$reflectionClass->getName(),
|
|
||||||
$errorFile,
|
|
||||||
$errorLine
|
|
||||||
),
|
|
||||||
0,
|
|
||||||
new Exception($errorString, $errorCode)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,203 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Doctrine\Instantiator;
|
|
||||||
|
|
||||||
use ArrayIterator;
|
|
||||||
use Doctrine\Instantiator\Exception\InvalidArgumentException;
|
|
||||||
use Doctrine\Instantiator\Exception\UnexpectedValueException;
|
|
||||||
use Exception;
|
|
||||||
use ReflectionClass;
|
|
||||||
use ReflectionException;
|
|
||||||
use Serializable;
|
|
||||||
use function class_exists;
|
|
||||||
use function is_subclass_of;
|
|
||||||
use function restore_error_handler;
|
|
||||||
use function set_error_handler;
|
|
||||||
use function sprintf;
|
|
||||||
use function strlen;
|
|
||||||
use function unserialize;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
final class Instantiator implements InstantiatorInterface
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Markers used internally by PHP to define whether {@see \unserialize} should invoke
|
|
||||||
* the method {@see \Serializable::unserialize()} when dealing with classes implementing
|
|
||||||
* the {@see \Serializable} interface.
|
|
||||||
*/
|
|
||||||
public const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C';
|
|
||||||
public const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Used to instantiate specific classes, indexed by class name.
|
|
||||||
*
|
|
||||||
* @var callable[]
|
|
||||||
*/
|
|
||||||
private static $cachedInstantiators = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Array of objects that can directly be cloned, indexed by class name.
|
|
||||||
*
|
|
||||||
* @var object[]
|
|
||||||
*/
|
|
||||||
private static $cachedCloneables = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
public function instantiate($className)
|
|
||||||
{
|
|
||||||
if (isset(self::$cachedCloneables[$className])) {
|
|
||||||
return clone self::$cachedCloneables[$className];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset(self::$cachedInstantiators[$className])) {
|
|
||||||
$factory = self::$cachedInstantiators[$className];
|
|
||||||
|
|
||||||
return $factory();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->buildAndCacheFromFactory($className);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Builds the requested object and caches it in static properties for performance
|
|
||||||
*
|
|
||||||
* @return object
|
|
||||||
*/
|
|
||||||
private function buildAndCacheFromFactory(string $className)
|
|
||||||
{
|
|
||||||
$factory = self::$cachedInstantiators[$className] = $this->buildFactory($className);
|
|
||||||
$instance = $factory();
|
|
||||||
|
|
||||||
if ($this->isSafeToClone(new ReflectionClass($instance))) {
|
|
||||||
self::$cachedCloneables[$className] = clone $instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Builds a callable capable of instantiating the given $className without
|
|
||||||
* invoking its constructor.
|
|
||||||
*
|
|
||||||
* @throws InvalidArgumentException
|
|
||||||
* @throws UnexpectedValueException
|
|
||||||
* @throws ReflectionException
|
|
||||||
*/
|
|
||||||
private function buildFactory(string $className) : callable
|
|
||||||
{
|
|
||||||
$reflectionClass = $this->getReflectionClass($className);
|
|
||||||
|
|
||||||
if ($this->isInstantiableViaReflection($reflectionClass)) {
|
|
||||||
return [$reflectionClass, 'newInstanceWithoutConstructor'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$serializedString = sprintf(
|
|
||||||
'%s:%d:"%s":0:{}',
|
|
||||||
is_subclass_of($className, Serializable::class) ? self::SERIALIZATION_FORMAT_USE_UNSERIALIZER : self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER,
|
|
||||||
strlen($className),
|
|
||||||
$className
|
|
||||||
);
|
|
||||||
|
|
||||||
$this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString);
|
|
||||||
|
|
||||||
return static function () use ($serializedString) {
|
|
||||||
return unserialize($serializedString);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws InvalidArgumentException
|
|
||||||
* @throws ReflectionException
|
|
||||||
*/
|
|
||||||
private function getReflectionClass(string $className) : ReflectionClass
|
|
||||||
{
|
|
||||||
if (! class_exists($className)) {
|
|
||||||
throw InvalidArgumentException::fromNonExistingClass($className);
|
|
||||||
}
|
|
||||||
|
|
||||||
$reflection = new ReflectionClass($className);
|
|
||||||
|
|
||||||
if ($reflection->isAbstract()) {
|
|
||||||
throw InvalidArgumentException::fromAbstractClass($reflection);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $reflection;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws UnexpectedValueException
|
|
||||||
*/
|
|
||||||
private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, string $serializedString) : void
|
|
||||||
{
|
|
||||||
set_error_handler(static function (int $code, string $message, string $file, int $line) use ($reflectionClass, &$error) : bool {
|
|
||||||
$error = UnexpectedValueException::fromUncleanUnSerialization(
|
|
||||||
$reflectionClass,
|
|
||||||
$message,
|
|
||||||
$code,
|
|
||||||
$file,
|
|
||||||
$line
|
|
||||||
);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
try {
|
|
||||||
$this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString);
|
|
||||||
} finally {
|
|
||||||
restore_error_handler();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($error) {
|
|
||||||
throw $error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws UnexpectedValueException
|
|
||||||
*/
|
|
||||||
private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, string $serializedString) : void
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
unserialize($serializedString);
|
|
||||||
} catch (Exception $exception) {
|
|
||||||
throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private function isInstantiableViaReflection(ReflectionClass $reflectionClass) : bool
|
|
||||||
{
|
|
||||||
return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Verifies whether the given class is to be considered internal
|
|
||||||
*/
|
|
||||||
private function hasInternalAncestors(ReflectionClass $reflectionClass) : bool
|
|
||||||
{
|
|
||||||
do {
|
|
||||||
if ($reflectionClass->isInternal()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$reflectionClass = $reflectionClass->getParentClass();
|
|
||||||
} while ($reflectionClass);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if a class is cloneable
|
|
||||||
*
|
|
||||||
* Classes implementing `__clone` cannot be safely cloned, as that may cause side-effects.
|
|
||||||
*/
|
|
||||||
private function isSafeToClone(ReflectionClass $reflection) : bool
|
|
||||||
{
|
|
||||||
return $reflection->isCloneable()
|
|
||||||
&& ! $reflection->hasMethod('__clone')
|
|
||||||
&& ! $reflection->isSubclassOf(ArrayIterator::class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Doctrine\Instantiator;
|
|
||||||
|
|
||||||
use Doctrine\Instantiator\Exception\ExceptionInterface;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Instantiator provides utility methods to build objects without invoking their constructors
|
|
||||||
*/
|
|
||||||
interface InstantiatorInterface
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param string $className
|
|
||||||
*
|
|
||||||
* @return object
|
|
||||||
*
|
|
||||||
* @throws ExceptionInterface
|
|
||||||
*/
|
|
||||||
public function instantiate($className);
|
|
||||||
}
|
|
||||||
20
pfosten/vendor/erusev/parsedown/LICENSE.txt
vendored
20
pfosten/vendor/erusev/parsedown/LICENSE.txt
vendored
|
|
@ -1,20 +0,0 @@
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2013-2018 Emanuil Rusev, erusev.com
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
|
||||||
the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
||||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
||||||
subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
||||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
||||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
||||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
1712
pfosten/vendor/erusev/parsedown/Parsedown.php
vendored
1712
pfosten/vendor/erusev/parsedown/Parsedown.php
vendored
File diff suppressed because it is too large
Load diff
86
pfosten/vendor/erusev/parsedown/README.md
vendored
86
pfosten/vendor/erusev/parsedown/README.md
vendored
|
|
@ -1,86 +0,0 @@
|
||||||
> I also make [Caret](https://caret.io?ref=parsedown) - a Markdown editor for Mac and PC.
|
|
||||||
|
|
||||||
## Parsedown
|
|
||||||
|
|
||||||
[](https://travis-ci.org/erusev/parsedown)
|
|
||||||
<!--[](https://packagist.org/packages/erusev/parsedown)-->
|
|
||||||
|
|
||||||
Better Markdown Parser in PHP
|
|
||||||
|
|
||||||
[Demo](http://parsedown.org/demo) |
|
|
||||||
[Benchmarks](http://parsedown.org/speed) |
|
|
||||||
[Tests](http://parsedown.org/tests/) |
|
|
||||||
[Documentation](https://github.com/erusev/parsedown/wiki/)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* One File
|
|
||||||
* No Dependencies
|
|
||||||
* Super Fast
|
|
||||||
* Extensible
|
|
||||||
* [GitHub flavored](https://help.github.com/articles/github-flavored-markdown)
|
|
||||||
* Tested in 5.3 to 7.1 and in HHVM
|
|
||||||
* [Markdown Extra extension](https://github.com/erusev/parsedown-extra)
|
|
||||||
|
|
||||||
### Installation
|
|
||||||
|
|
||||||
Include `Parsedown.php` or install [the composer package](https://packagist.org/packages/erusev/parsedown).
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
``` php
|
|
||||||
$Parsedown = new Parsedown();
|
|
||||||
|
|
||||||
echo $Parsedown->text('Hello _Parsedown_!'); # prints: <p>Hello <em>Parsedown</em>!</p>
|
|
||||||
```
|
|
||||||
|
|
||||||
More examples in [the wiki](https://github.com/erusev/parsedown/wiki/) and in [this video tutorial](http://youtu.be/wYZBY8DEikI).
|
|
||||||
|
|
||||||
### Security
|
|
||||||
|
|
||||||
Parsedown is capable of escaping user-input within the HTML that it generates. Additionally Parsedown will apply sanitisation to additional scripting vectors (such as scripting link destinations) that are introduced by the markdown syntax itself.
|
|
||||||
|
|
||||||
To tell Parsedown that it is processing untrusted user-input, use the following:
|
|
||||||
```php
|
|
||||||
$parsedown = new Parsedown;
|
|
||||||
$parsedown->setSafeMode(true);
|
|
||||||
```
|
|
||||||
|
|
||||||
If instead, you wish to allow HTML within untrusted user-input, but still want output to be free from XSS it is recommended that you make use of a HTML sanitiser that allows HTML tags to be whitelisted, like [HTML Purifier](http://htmlpurifier.org/).
|
|
||||||
|
|
||||||
In both cases you should strongly consider employing defence-in-depth measures, like [deploying a Content-Security-Policy](https://scotthelme.co.uk/content-security-policy-an-introduction/) (a browser security feature) so that your page is likely to be safe even if an attacker finds a vulnerability in one of the first lines of defence above.
|
|
||||||
|
|
||||||
#### Security of Parsedown Extensions
|
|
||||||
|
|
||||||
Safe mode does not necessarily yield safe results when using extensions to Parsedown. Extensions should be evaluated on their own to determine their specific safety against XSS.
|
|
||||||
|
|
||||||
### Escaping HTML
|
|
||||||
> ⚠️ **WARNING:** This method isn't safe from XSS!
|
|
||||||
|
|
||||||
If you wish to escape HTML **in trusted input**, you can use the following:
|
|
||||||
```php
|
|
||||||
$parsedown = new Parsedown;
|
|
||||||
$parsedown->setMarkupEscaped(true);
|
|
||||||
```
|
|
||||||
|
|
||||||
Beware that this still allows users to insert unsafe scripting vectors, such as links like `[xss](javascript:alert%281%29)`.
|
|
||||||
|
|
||||||
### Questions
|
|
||||||
|
|
||||||
**How does Parsedown work?**
|
|
||||||
|
|
||||||
It tries to read Markdown like a human. First, it looks at the lines. It’s interested in how the lines start. This helps it recognise blocks. It knows, for example, that if a line starts with a `-` then perhaps it belongs to a list. Once it recognises the blocks, it continues to the content. As it reads, it watches out for special characters. This helps it recognise inline elements (or inlines).
|
|
||||||
|
|
||||||
We call this approach "line based". We believe that Parsedown is the first Markdown parser to use it. Since the release of Parsedown, other developers have used the same approach to develop other Markdown parsers in PHP and in other languages.
|
|
||||||
|
|
||||||
**Is it compliant with CommonMark?**
|
|
||||||
|
|
||||||
It passes most of the CommonMark tests. Most of the tests that don't pass deal with cases that are quite uncommon. Still, as CommonMark matures, compliance should improve.
|
|
||||||
|
|
||||||
**Who uses it?**
|
|
||||||
|
|
||||||
[Laravel Framework](https://laravel.com/), [Bolt CMS](http://bolt.cm/), [Grav CMS](http://getgrav.org/), [Herbie CMS](http://www.getherbie.org/), [Kirby CMS](http://getkirby.com/), [October CMS](http://octobercms.com/), [Pico CMS](http://picocms.org), [Statamic CMS](http://www.statamic.com/), [phpDocumentor](http://www.phpdoc.org/), [RaspberryPi.org](http://www.raspberrypi.org/), [Symfony demo](https://github.com/symfony/symfony-demo) and [more](https://packagist.org/packages/erusev/parsedown/dependents).
|
|
||||||
|
|
||||||
**How can I help?**
|
|
||||||
|
|
||||||
Use it, star it, share it and if you feel generous, [donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=528P3NZQMP8N2).
|
|
||||||
33
pfosten/vendor/erusev/parsedown/composer.json
vendored
33
pfosten/vendor/erusev/parsedown/composer.json
vendored
|
|
@ -1,33 +0,0 @@
|
||||||
{
|
|
||||||
"name": "erusev/parsedown",
|
|
||||||
"description": "Parser for Markdown.",
|
|
||||||
"keywords": ["markdown", "parser"],
|
|
||||||
"homepage": "http://parsedown.org",
|
|
||||||
"type": "library",
|
|
||||||
"license": "MIT",
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Emanuil Rusev",
|
|
||||||
"email": "hello@erusev.com",
|
|
||||||
"homepage": "http://erusev.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3.0",
|
|
||||||
"ext-mbstring": "*"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^4.8.35"
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-0": {"Parsedown": ""}
|
|
||||||
},
|
|
||||||
"autoload-dev": {
|
|
||||||
"psr-0": {
|
|
||||||
"TestParsedown": "test/",
|
|
||||||
"ParsedownTest": "test/",
|
|
||||||
"CommonMarkTest": "test/",
|
|
||||||
"CommonMarkTestWeak": "test/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
744
pfosten/vendor/fzaninotto/faker/CHANGELOG.md
vendored
744
pfosten/vendor/fzaninotto/faker/CHANGELOG.md
vendored
|
|
@ -1,744 +0,0 @@
|
||||||
# CHANGELOG
|
|
||||||
|
|
||||||
## 2019-12-03, v1.9.1
|
|
||||||
|
|
||||||
- Add link to PHPStan extension to readme [\#1834](https://github.com/fzaninotto/Faker/pull/1834) ([finwe](https://github.com/finwe))
|
|
||||||
- Enhancement: Collect code coverage [\#1824](https://github.com/fzaninotto/Faker/pull/1824) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Enhancement: Use all columns when running tests [\#1823](https://github.com/fzaninotto/Faker/pull/1823) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Enhancement: Configure verbose output via phpunit.xml.dist [\#1822](https://github.com/fzaninotto/Faker/pull/1822) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Curly braces for arrays is deprecated in PHP 7.4 [\#1843](https://github.com/fzaninotto/Faker/pull/1843) ([wimg](https://github.com/wimg))
|
|
||||||
- Fix: Reduce visibility of setUp\(\) and tearDown\(\) [\#1821](https://github.com/fzaninotto/Faker/pull/1821) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Fix: Mark test classes as final [\#1820](https://github.com/fzaninotto/Faker/pull/1820) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Fix: Remove unnecessary class-level DocBlocks [\#1819](https://github.com/fzaninotto/Faker/pull/1819) ([localheinz](https://github.com/localheinz))
|
|
||||||
|
|
||||||
## 2019-11-10, v1.9.0
|
|
||||||
|
|
||||||
This will the last minor release in the `1.x` cycle.
|
|
||||||
|
|
||||||
- Add all Iran's provinces land lines numbers [\#1806](https://github.com/fzaninotto/Faker/pull/1806) ([kingofnull](https://github.com/kingofnull))
|
|
||||||
- replace latin "B" to cyrillic "B" for uk\_UA locale [\#1800](https://github.com/fzaninotto/Faker/pull/1800) ([FI-LIFE](https://github.com/FI-LIFE))
|
|
||||||
- Add elgentos/masquerade to third-party library list [\#1798](https://github.com/fzaninotto/Faker/pull/1798) ([erikhansen](https://github.com/erikhansen))
|
|
||||||
- Add link to Gravatar provider repository [\#1796](https://github.com/fzaninotto/Faker/pull/1796) ([ottaviano](https://github.com/ottaviano))
|
|
||||||
- Add mobileNumber\(\) method for nb\_NO [\#1788](https://github.com/fzaninotto/Faker/pull/1788) ([carestad](https://github.com/carestad))
|
|
||||||
- Enhancement: Slightly clean up Company provider [\#1783](https://github.com/fzaninotto/Faker/pull/1783) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Added some more information for autoloading in the readme [\#1780](https://github.com/fzaninotto/Faker/pull/1780) ([pimjansen](https://github.com/pimjansen))
|
|
||||||
- Enhancement: Add issue template for bug report [\#1779](https://github.com/fzaninotto/Faker/pull/1779) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Add hslColor to ColorProvider [\#1776](https://github.com/fzaninotto/Faker/pull/1776) ([icanhazstring](https://github.com/icanhazstring))
|
|
||||||
- Enhancement: Consistently use composer package name for link content [\#1770](https://github.com/fzaninotto/Faker/pull/1770) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Add Correct Thai words for streets,soi etc names and add Thai First a… [\#1769](https://github.com/fzaninotto/Faker/pull/1769) ([pierrejoye](https://github.com/pierrejoye))
|
|
||||||
- Enhancement: Assert that postcode generated by Austrian Address provider matches format [\#1766](https://github.com/fzaninotto/Faker/pull/1766) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Enhancement: Update squizlabs/php\_codesniffer [\#1763](https://github.com/fzaninotto/Faker/pull/1763) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Enhancement: Assert that imageUrl can be used with gray flag [\#1762](https://github.com/fzaninotto/Faker/pull/1762) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Enhancement: Introduce build and help targets [\#1761](https://github.com/fzaninotto/Faker/pull/1761) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Enhancement: Disable Xdebug as early as possible [\#1758](https://github.com/fzaninotto/Faker/pull/1758) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Enhancement: Clean up .gitattributes [\#1756](https://github.com/fzaninotto/Faker/pull/1756) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Enhancement: Reference phpunit.xsd as installed with composer [\#1755](https://github.com/fzaninotto/Faker/pull/1755) ([localheinz](https://github.com/localheinz))
|
|
||||||
- add id\_ID Color [\#1754](https://github.com/fzaninotto/Faker/pull/1754) ([cacing69](https://github.com/cacing69))
|
|
||||||
- PHP 7.4 compatibility [\#1748](https://github.com/fzaninotto/Faker/pull/1748) ([pimjansen](https://github.com/pimjansen))
|
|
||||||
- Add lastName gender specific on ru\_RU locale [\#1747](https://github.com/fzaninotto/Faker/pull/1747) ([aanfarhan](https://github.com/aanfarhan))
|
|
||||||
- Update README - Add a new faker. [\#1731](https://github.com/fzaninotto/Faker/pull/1731) ([drupol](https://github.com/drupol))
|
|
||||||
- Add faker-eddy-malou third-party library [\#1717](https://github.com/fzaninotto/Faker/pull/1717) ([Metrakit](https://github.com/Metrakit))
|
|
||||||
- \[de\_DE\] Company\JobTitle: list of common german job titles [\#1716](https://github.com/fzaninotto/Faker/pull/1716) ([amacado](https://github.com/amacado))
|
|
||||||
- Added 'red' to $safeColorNames [\#1701](https://github.com/fzaninotto/Faker/pull/1701) ([xfudox](https://github.com/xfudox))
|
|
||||||
- \[pt\_PT/Address\] Add abbreviature to 'travessa' and 'largo' [\#1606](https://github.com/fzaninotto/Faker/pull/1606) ([simaolemos](https://github.com/simaolemos))
|
|
||||||
- Fix method name for en\_NZ provider in readme [\#1595](https://github.com/fzaninotto/Faker/pull/1595) ([gdhnz](https://github.com/gdhnz))
|
|
||||||
- Refactoring of the TextTest class [\#1590](https://github.com/fzaninotto/Faker/pull/1590) ([stevegrunwell](https://github.com/stevegrunwell))
|
|
||||||
- add gender variants for last name \[lt\_LT\] [\#1586](https://github.com/fzaninotto/Faker/pull/1586) ([ikerasLT](https://github.com/ikerasLT))
|
|
||||||
- add .id TLD [\#1566](https://github.com/fzaninotto/Faker/pull/1566) ([ad3n](https://github.com/ad3n))
|
|
||||||
- Add Color provider to es\_ES locale [\#1559](https://github.com/fzaninotto/Faker/pull/1559) ([juananruiz](https://github.com/juananruiz))
|
|
||||||
- Enhancement: Keep packages sorted in composer.json [\#1551](https://github.com/fzaninotto/Faker/pull/1551) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Portuguese providers for Companies and Internet [\#1537](https://github.com/fzaninotto/Faker/pull/1537) ([promatik](https://github.com/promatik))
|
|
||||||
- Improve Dutch company names [\#1529](https://github.com/fzaninotto/Faker/pull/1529) ([koole](https://github.com/koole))
|
|
||||||
- Document randomDigitNot base formatter. [\#1514](https://github.com/fzaninotto/Faker/pull/1514) ([shawnlindstrom](https://github.com/shawnlindstrom))
|
|
||||||
- Estonian names [\#1461](https://github.com/fzaninotto/Faker/pull/1461) ([much-rebel](https://github.com/much-rebel))
|
|
||||||
- add birthplace support for ID nik generator [\#1451](https://github.com/fzaninotto/Faker/pull/1451) ([mikk150](https://github.com/mikk150))
|
|
||||||
- List of banks in Brazil added [\#1427](https://github.com/fzaninotto/Faker/pull/1427) ([diegohenicka](https://github.com/diegohenicka))
|
|
||||||
- Remove last names from the male first names array \(et\_EE\) [\#1799](https://github.com/fzaninotto/Faker/pull/1799) ([Mihkel100](https://github.com/Mihkel100))
|
|
||||||
- Update out-of-date currency codes [\#1795](https://github.com/fzaninotto/Faker/pull/1795) ([Brindster](https://github.com/Brindster))
|
|
||||||
- Floor is not always returning an int [\#1790](https://github.com/fzaninotto/Faker/pull/1790) ([pimjansen](https://github.com/pimjansen))
|
|
||||||
- typo [\#1789](https://github.com/fzaninotto/Faker/pull/1789) ([enumag](https://github.com/enumag))
|
|
||||||
- Added batch inserts for doctrine orm populate [\#1781](https://github.com/fzaninotto/Faker/pull/1781) ([pimjansen](https://github.com/pimjansen))
|
|
||||||
- FIx: Avoid deprecation warning in newer CakePHP version [\#1777](https://github.com/fzaninotto/Faker/pull/1777) ([icanhazstring](https://github.com/icanhazstring))
|
|
||||||
- Fix: Consistently link to GitHub repositories [\#1774](https://github.com/fzaninotto/Faker/pull/1774) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Fix: Name of package [\#1772](https://github.com/fzaninotto/Faker/pull/1772) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Remove BV and HM country codes. [\#1767](https://github.com/fzaninotto/Faker/pull/1767) ([oliverpool](https://github.com/oliverpool))
|
|
||||||
- Fix: Remove sudo configuration [\#1760](https://github.com/fzaninotto/Faker/pull/1760) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Fix: Allow nightly builds to fail [\#1759](https://github.com/fzaninotto/Faker/pull/1759) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Fix: No need to update composer itself [\#1757](https://github.com/fzaninotto/Faker/pull/1757) ([localheinz](https://github.com/localheinz))
|
|
||||||
- duplicate first name and last name removal [\#1729](https://github.com/fzaninotto/Faker/pull/1729) ([sagautam5](https://github.com/sagautam5))
|
|
||||||
- Fix-Isreal--Israel [\#1724](https://github.com/fzaninotto/Faker/pull/1724) ([GitEvil](https://github.com/GitEvil))
|
|
||||||
- fix\(issue-1721\): add phpdoc method and properties annotations for php… [\#1722](https://github.com/fzaninotto/Faker/pull/1722) ([lugus](https://github.com/lugus))
|
|
||||||
- Typo in function PHPDoc [\#1711](https://github.com/fzaninotto/Faker/pull/1711) ([Dzhuneyt](https://github.com/Dzhuneyt))
|
|
||||||
- Fix: Add allowed type DateTime to param annotation [\#1697](https://github.com/fzaninotto/Faker/pull/1697) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Calling a non static method as static not allowed. [\#1696](https://github.com/fzaninotto/Faker/pull/1696) ([wilco-1985](https://github.com/wilco-1985))
|
|
||||||
- Bug Fix en\_SG mobile number generation [\#1658](https://github.com/fzaninotto/Faker/pull/1658) ([ziming](https://github.com/ziming))
|
|
||||||
- Update ja\_JP Address Provider [\#1649](https://github.com/fzaninotto/Faker/pull/1649) ([atmngw](https://github.com/atmngw))
|
|
||||||
- Fixed realText on ja\_JP locale broken, /u missing [\#1634](https://github.com/fzaninotto/Faker/pull/1634) ([mihit](https://github.com/mihit))
|
|
||||||
- Removed comma and space from $firstNameMale for en\_IN [\#1608](https://github.com/fzaninotto/Faker/pull/1608) ([phpspider](https://github.com/phpspider))
|
|
||||||
- Prevent Transliterator class autoloading [\#1575](https://github.com/fzaninotto/Faker/pull/1575) ([MontealegreLuis](https://github.com/MontealegreLuis))
|
|
||||||
- building numbers in Germany never start with a zero or are zero [\#1530](https://github.com/fzaninotto/Faker/pull/1530) ([fostam](https://github.com/fostam))
|
|
||||||
- Fixing sk\_SK men last names set [\#1459](https://github.com/fzaninotto/Faker/pull/1459) ([pavoltanuska](https://github.com/pavoltanuska))
|
|
||||||
- Taiwan ID. The initial letter must be a capital letter. p-\>P [\#1434](https://github.com/fzaninotto/Faker/pull/1434) ([slawa-dev](https://github.com/slawa-dev))
|
|
||||||
- Revert "Added 'red' to $safeColorNames" [\#1778](https://github.com/fzaninotto/Faker/pull/1778) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
- Added realText capability for fr\_CA [\#1686](https://github.com/fzaninotto/Faker/pull/1686) ([bobanum](https://github.com/bobanum))
|
|
||||||
- Add loremflickr.com Provider to the thrid parties [\#1683](https://github.com/fzaninotto/Faker/pull/1683) ([xvladxtremal](https://github.com/xvladxtremal))
|
|
||||||
- Add Undeclared Faker Instance to PhoneNumber Test in en\_NG [\#1682](https://github.com/fzaninotto/Faker/pull/1682) ([thearsalan](https://github.com/thearsalan))
|
|
||||||
- PSR-2 updates to readme [\#1679](https://github.com/fzaninotto/Faker/pull/1679) ([b3none](https://github.com/b3none))
|
|
||||||
- PHPDoc for `passthrough` function on Generator [\#1678](https://github.com/fzaninotto/Faker/pull/1678) ([tabakhase](https://github.com/tabakhase))
|
|
||||||
- Make en\_CA Phone Provider Extend the en\_US One [\#1676](https://github.com/fzaninotto/Faker/pull/1676) ([darrylhein](https://github.com/darrylhein))
|
|
||||||
- Add Valid National Code Generator to fa\_IR Person [\#1675](https://github.com/fzaninotto/Faker/pull/1675) ([thearsalan](https://github.com/thearsalan))
|
|
||||||
- Updated readme.md: added a missing backslash [\#1673](https://github.com/fzaninotto/Faker/pull/1673) ([aubryfr](https://github.com/aubryfr))
|
|
||||||
- Add 'Faker\Provider\en\_US\Company::catchPhrase' to ru\_RU locale [\#1668](https://github.com/fzaninotto/Faker/pull/1668) ([axklim](https://github.com/axklim))
|
|
||||||
- Update deprecated \PHPUnit\_Framework\_TestCase with PHPUnit\Framework\TestCase [\#1664](https://github.com/fzaninotto/Faker/pull/1664) ([thewhit](https://github.com/thewhit))
|
|
||||||
- Support populating Doctrine's immutable date types [\#1639](https://github.com/fzaninotto/Faker/pull/1639) ([voronkovich](https://github.com/voronkovich))
|
|
||||||
- add titleMale and titleFemale method to all Person classes [\#1635](https://github.com/fzaninotto/Faker/pull/1635) ([RiverDanceGit](https://github.com/RiverDanceGit))
|
|
||||||
- Minor typo fix [\#1631](https://github.com/fzaninotto/Faker/pull/1631) ([nhedger](https://github.com/nhedger))
|
|
||||||
- Add link to er1z/fakemock [\#1622](https://github.com/fzaninotto/Faker/pull/1622) ([er1z](https://github.com/er1z))
|
|
||||||
- Add Dutch \(nl\_NL\) job titles [\#1618](https://github.com/fzaninotto/Faker/pull/1618) ([SjorsO](https://github.com/SjorsO))
|
|
||||||
- Exclude files and folder from release archive [\#1617](https://github.com/fzaninotto/Faker/pull/1617) ([ankurk91](https://github.com/ankurk91))
|
|
||||||
- Update doc block [\#1615](https://github.com/fzaninotto/Faker/pull/1615) ([ankurk91](https://github.com/ankurk91))
|
|
||||||
- Suggest PSR-4 compliant autoloader in comment [\#1614](https://github.com/fzaninotto/Faker/pull/1614) ([samnela](https://github.com/samnela))
|
|
||||||
- Fix dateTimeBetween\(\) Argument on Generator phpdoc [\#1583](https://github.com/fzaninotto/Faker/pull/1583) ([hisomura](https://github.com/hisomura))
|
|
||||||
- Fix Dutch typo [\#1580](https://github.com/fzaninotto/Faker/pull/1580) ([gizburdt](https://github.com/gizburdt))
|
|
||||||
- Old city names changed to new ones [\#1578](https://github.com/fzaninotto/Faker/pull/1578) ([goszowski](https://github.com/goszowski))
|
|
||||||
- Correct documentation [\#1571](https://github.com/fzaninotto/Faker/pull/1571) ([rquadling](https://github.com/rquadling))
|
|
||||||
- Make $suffix protected not private in nl\_NL\Person provider [\#1561](https://github.com/fzaninotto/Faker/pull/1561) ([SpadXIII](https://github.com/SpadXIII))
|
|
||||||
- Add PicsumPhotos Provider to the thrid parties [\#1560](https://github.com/fzaninotto/Faker/pull/1560) ([bluemmb](https://github.com/bluemmb))
|
|
||||||
- fix austrian postal codes starting with invalid 0 [\#1545](https://github.com/fzaninotto/Faker/pull/1545) ([mpge](https://github.com/mpge))
|
|
||||||
- Restore a random seed when the Generator is destroyed [\#1534](https://github.com/fzaninotto/Faker/pull/1534) ([lyrixx](https://github.com/lyrixx))
|
|
||||||
- Add a swiss social security number \(AVS13\) generator [\#1533](https://github.com/fzaninotto/Faker/pull/1533) ([nhedger](https://github.com/nhedger))
|
|
||||||
- Small tweaks [\#1526](https://github.com/fzaninotto/Faker/pull/1526) ([carusogabriel](https://github.com/carusogabriel))
|
|
||||||
- fix ukraine first name person, delete space [\#1525](https://github.com/fzaninotto/Faker/pull/1525) ([Yasuslik](https://github.com/Yasuslik))
|
|
||||||
- Removed unknown postcode [\#1440](https://github.com/fzaninotto/Faker/pull/1440) ([ayanozturk](https://github.com/ayanozturk))
|
|
||||||
- Add more PhoneNumber options for es\_ES [\#1219](https://github.com/fzaninotto/Faker/pull/1219) ([driade](https://github.com/driade))
|
|
||||||
- Fix duplication in uk\_UA male first names [\#1214](https://github.com/fzaninotto/Faker/pull/1214) ([fre5h](https://github.com/fre5h))
|
|
||||||
- Added missing grayscale option/flag to Image provider [\#928](https://github.com/fzaninotto/Faker/pull/928) ([sebastianvilla](https://github.com/sebastianvilla))
|
|
||||||
|
|
||||||
## 2018-07-12, v1.8.0
|
|
||||||
|
|
||||||
- Typo in readme [\#1521](https://github.com/fzaninotto/Faker/pull/1521) ([jmhobbs](https://github.com/jmhobbs))
|
|
||||||
- Replaced Hilll with Hill [\#1516](https://github.com/fzaninotto/Faker/pull/1516) ([MarkVaughn](https://github.com/MarkVaughn))
|
|
||||||
- \[it\_IT\] Improve vat ID generated using official rules [\#1508](https://github.com/fzaninotto/Faker/pull/1508) ([mavimo](https://github.com/mavimo))
|
|
||||||
- \[hu\_HU\] Address: Fix unnecessary new line in string [\#1507](https://github.com/fzaninotto/Faker/pull/1507) ([ntomka](https://github.com/ntomka))
|
|
||||||
- add phone numer format [\#1506](https://github.com/fzaninotto/Faker/pull/1506) ([Enosh-Yu](https://github.com/Enosh-Yu))
|
|
||||||
- Fix typo in fr\_CA Provider [\#1505](https://github.com/fzaninotto/Faker/pull/1505) ([ultreson](https://github.com/ultreson))
|
|
||||||
- Add fake-car provider link [\#1497](https://github.com/fzaninotto/Faker/pull/1497) ([pelmered](https://github.com/pelmered))
|
|
||||||
- create `passthrough` function [\#1493](https://github.com/fzaninotto/Faker/pull/1493) ([browner12](https://github.com/browner12))
|
|
||||||
- update Polish bank list [\#1482](https://github.com/fzaninotto/Faker/pull/1482) ([IonBazan](https://github.com/IonBazan))
|
|
||||||
- Update the parameters to check if the setter is callable [\#1470](https://github.com/fzaninotto/Faker/pull/1470) ([rossmitchell](https://github.com/rossmitchell))
|
|
||||||
- Push the max date far into the future so the test can pass [\#1469](https://github.com/fzaninotto/Faker/pull/1469) ([rossmitchell](https://github.com/rossmitchell))
|
|
||||||
- Update Address.php [\#1465](https://github.com/fzaninotto/Faker/pull/1465) ([Saibamen](https://github.com/Saibamen))
|
|
||||||
- Turkish identity number for tr\_TR [\#1462](https://github.com/fzaninotto/Faker/pull/1462) ([aykutaras](https://github.com/aykutaras))
|
|
||||||
- Fixing rare iin with 13-digits. [\#1450](https://github.com/fzaninotto/Faker/pull/1450) ([vadimonus](https://github.com/vadimonus))
|
|
||||||
- Fix Polish PESEL faker [\#1449](https://github.com/fzaninotto/Faker/pull/1449) ([Dartui](https://github.com/Dartui))
|
|
||||||
- Adds valid 08 number formats for fr\_FR [\#1439](https://github.com/fzaninotto/Faker/pull/1439) ([ppelgrims](https://github.com/ppelgrims))
|
|
||||||
- Add YouTube provider link [\#1422](https://github.com/fzaninotto/Faker/pull/1422) ([aalaap](https://github.com/aalaap))
|
|
||||||
- Update PHPDoc of the DateTime provider. [\#1419](https://github.com/fzaninotto/Faker/pull/1419) ([tomzx](https://github.com/tomzx))
|
|
||||||
- Normalize name of variable [\#1412](https://github.com/fzaninotto/Faker/pull/1412) ([eaglewu](https://github.com/eaglewu))
|
|
||||||
- Added "blockchain" to en-us company provider catchPhrase method [\#1411](https://github.com/fzaninotto/Faker/pull/1411) ([samoldenburg](https://github.com/samoldenburg))
|
|
||||||
- Fix for Spot2 ORM EntityPopulator [\#1408](https://github.com/fzaninotto/Faker/pull/1408) ([michal-borek](https://github.com/michal-borek))
|
|
||||||
- TH color name [\#1404](https://github.com/fzaninotto/Faker/pull/1404) ([Naruedom](https://github.com/Naruedom))
|
|
||||||
- added Malaysia \[ms\_MY\] locale [\#1403](https://github.com/fzaninotto/Faker/pull/1403) ([kenfai](https://github.com/kenfai))
|
|
||||||
- Implementation of the function that generates Brazilian area codes fixed. [\#1401](https://github.com/fzaninotto/Faker/pull/1401) ([jackmiras](https://github.com/jackmiras))
|
|
||||||
- VISA retired the 13 digit PAN moved to new cardParams [\#1400](https://github.com/fzaninotto/Faker/pull/1400) ([hppycoder](https://github.com/hppycoder))
|
|
||||||
- Remove unused variable inside closure [\#1395](https://github.com/fzaninotto/Faker/pull/1395) ([carusogabriel](https://github.com/carusogabriel))
|
|
||||||
- .nz domain updates [\#1393](https://github.com/fzaninotto/Faker/pull/1393) ([xurizaemon](https://github.com/xurizaemon))
|
|
||||||
- Add licenceCode method in the to es\_ES person provider [\#1392](https://github.com/fzaninotto/Faker/pull/1392) ([ffiguereo](https://github.com/ffiguereo))
|
|
||||||
- allow `randomElements` to accept a Traversable object [\#1389](https://github.com/fzaninotto/Faker/pull/1389) ([browner12](https://github.com/browner12))
|
|
||||||
- Doc: rg remove formatting [\#1387](https://github.com/fzaninotto/Faker/pull/1387) ([emtudo](https://github.com/emtudo))
|
|
||||||
- Add numbers with start 4 [\#1386](https://github.com/fzaninotto/Faker/pull/1386) ([emtudo](https://github.com/emtudo))
|
|
||||||
- update th\_TH mobile number format [\#1385](https://github.com/fzaninotto/Faker/pull/1385) ([earthpyy](https://github.com/earthpyy))
|
|
||||||
- Translate country names for lv\_LV provider. [\#1383](https://github.com/fzaninotto/Faker/pull/1383) ([ronaldsgailis](https://github.com/ronaldsgailis))
|
|
||||||
- Clean elses [\#1382](https://github.com/fzaninotto/Faker/pull/1382) ([carusogabriel](https://github.com/carusogabriel))
|
|
||||||
- French vat formatter [\#1381](https://github.com/fzaninotto/Faker/pull/1381) ([ppelgrims](https://github.com/ppelgrims))
|
|
||||||
- Replaces rtrim with preg\_replace [\#1380](https://github.com/fzaninotto/Faker/pull/1380) ([ppelgrims](https://github.com/ppelgrims))
|
|
||||||
- Refactoring tests [\#1375](https://github.com/fzaninotto/Faker/pull/1375) ([carusogabriel](https://github.com/carusogabriel))
|
|
||||||
- Added link in readme to provider FakerRestaurant [\#1374](https://github.com/fzaninotto/Faker/pull/1374) ([jzonta](https://github.com/jzonta))
|
|
||||||
- Remove obsolete currency codes [\#1373](https://github.com/fzaninotto/Faker/pull/1373) ([tpraxl](https://github.com/tpraxl))
|
|
||||||
- \[ru\_RU\] Updated countries and added source link [\#1372](https://github.com/fzaninotto/Faker/pull/1372) ([ilyahoilik](https://github.com/ilyahoilik))
|
|
||||||
- Test against PHP 7.2 [\#1371](https://github.com/fzaninotto/Faker/pull/1371) ([carusogabriel](https://github.com/carusogabriel))
|
|
||||||
- Feature: nl\_BE text provider [\#1370](https://github.com/fzaninotto/Faker/pull/1370) ([rauwebieten](https://github.com/rauwebieten))
|
|
||||||
- default value for Payment::iban\(\) country code [\#1369](https://github.com/fzaninotto/Faker/pull/1369) ([madmanmax](https://github.com/madmanmax))
|
|
||||||
- skip test failing on bigendian [\#1365](https://github.com/fzaninotto/Faker/pull/1365) ([remicollet](https://github.com/remicollet))
|
|
||||||
- Update Person.php [\#1364](https://github.com/fzaninotto/Faker/pull/1364) ([majamusan](https://github.com/majamusan))
|
|
||||||
- Prevent errors on private methods [\#1363](https://github.com/fzaninotto/Faker/pull/1363) ([petecoop](https://github.com/petecoop))
|
|
||||||
- adds rijksregisternummer [\#1361](https://github.com/fzaninotto/Faker/pull/1361) ([ppelgrims](https://github.com/ppelgrims))
|
|
||||||
- Add secondary address to fr\_FR provider [\#1356](https://github.com/fzaninotto/Faker/pull/1356) ([nicodmf](https://github.com/nicodmf))
|
|
||||||
- Add company provider for tr\_TR [\#1355](https://github.com/fzaninotto/Faker/pull/1355) ([yuks](https://github.com/yuks))
|
|
||||||
- nb\_NO provider updates [\#1350](https://github.com/fzaninotto/Faker/pull/1350) ([alexqhj](https://github.com/alexqhj))
|
|
||||||
- only test available date range on 32-bit [\#1348](https://github.com/fzaninotto/Faker/pull/1348) ([remicollet](https://github.com/remicollet))
|
|
||||||
- Bump PHPUnit version for namespace compatibility [\#1345](https://github.com/fzaninotto/Faker/pull/1345) ([carusogabriel](https://github.com/carusogabriel))
|
|
||||||
- Use PSR-1 for PHPUnit TestCase [\#1344](https://github.com/fzaninotto/Faker/pull/1344) ([carusogabriel](https://github.com/carusogabriel))
|
|
||||||
- Fix FR\_fr 07 prefix mobile number generation [\#1343](https://github.com/fzaninotto/Faker/pull/1343) ([svanpoeck](https://github.com/svanpoeck))
|
|
||||||
- Update Text.php [\#1339](https://github.com/fzaninotto/Faker/pull/1339) ([gulaandrij](https://github.com/gulaandrij))
|
|
||||||
- Add two new company type in the Swiss Provider [\#1336](https://github.com/fzaninotto/Faker/pull/1336) ([pvullioud](https://github.com/pvullioud))
|
|
||||||
- Change symbol 'minus' with code 226 to 'minus' with code 45 [\#1333](https://github.com/fzaninotto/Faker/pull/1333) ([Negasus](https://github.com/Negasus))
|
|
||||||
- \[sl\_SI\] Created provider for Company [\#1331](https://github.com/fzaninotto/Faker/pull/1331) ([alesvaupotic](https://github.com/alesvaupotic))
|
|
||||||
- Update city name [\#1328](https://github.com/fzaninotto/Faker/pull/1328) ([s9801077](https://github.com/s9801077))
|
|
||||||
- Fix \#1305 realText in some cases breaks last character [\#1326](https://github.com/fzaninotto/Faker/pull/1326) ([iamraccoon](https://github.com/iamraccoon))
|
|
||||||
- Real Dutch postal codes [\#1323](https://github.com/fzaninotto/Faker/pull/1323) ([ametad](https://github.com/ametad))
|
|
||||||
- Added male and female titles for the en\_ZA locale [\#1321](https://github.com/fzaninotto/Faker/pull/1321) ([ViGouRCanberra](https://github.com/ViGouRCanberra))
|
|
||||||
- Add German Email Providers [\#1320](https://github.com/fzaninotto/Faker/pull/1320) ([Stoffo](https://github.com/Stoffo))
|
|
||||||
- Fix "Resource temporarily unavailable" [\#1319](https://github.com/fzaninotto/Faker/pull/1319) ([eberkund](https://github.com/eberkund))
|
|
||||||
- Introduced the ability to specify a default timezone... [\#1316](https://github.com/fzaninotto/Faker/pull/1316) ([telkins](https://github.com/telkins))
|
|
||||||
- South African licence codes [\#1315](https://github.com/fzaninotto/Faker/pull/1315) ([royalmitten](https://github.com/royalmitten))
|
|
||||||
- Fix with incorrect name city. [\#1309](https://github.com/fzaninotto/Faker/pull/1309) ([zzenmate](https://github.com/zzenmate))
|
|
||||||
- Fixed type-o in readme under section about Language specific formatters [\#1302](https://github.com/fzaninotto/Faker/pull/1302) ([espenkn](https://github.com/espenkn))
|
|
||||||
- Update Person.php [\#1298](https://github.com/fzaninotto/Faker/pull/1298) ([yappkahowe](https://github.com/yappkahowe))
|
|
||||||
- Allow children classes to access self::$suffix [\#1296](https://github.com/fzaninotto/Faker/pull/1296) ([greg0ire](https://github.com/greg0ire))
|
|
||||||
- Fix with namespace payment provider for uk\_UA [\#1293](https://github.com/fzaninotto/Faker/pull/1293) ([zzenmate](https://github.com/zzenmate))
|
|
||||||
- Update zh\_TW text provider [\#1292](https://github.com/fzaninotto/Faker/pull/1292) ([s9801077](https://github.com/s9801077))
|
|
||||||
- Fix CURL status code in ImageTest.php [\#1290](https://github.com/fzaninotto/Faker/pull/1290) ([Sanfra1407](https://github.com/Sanfra1407))
|
|
||||||
- Tax Id for companies and new formats for es\_VE [\#1287](https://github.com/fzaninotto/Faker/pull/1287) ([DIOHz0r](https://github.com/DIOHz0r))
|
|
||||||
- Added idNumber for nl\_NL [\#1283](https://github.com/fzaninotto/Faker/pull/1283) ([artorozenga](https://github.com/artorozenga))
|
|
||||||
- Feature/en us company ein [\#1273](https://github.com/fzaninotto/Faker/pull/1273) ([zachflower](https://github.com/zachflower))
|
|
||||||
|
|
||||||
## 2017-08-15, v1.7.0
|
|
||||||
|
|
||||||
- Added more Ukrainian banks [\#1271](https://github.com/fzaninotto/Faker/pull/1271) ([iamraccoon](https://github.com/iamraccoon))
|
|
||||||
- Hotfix/failing unit tests [\#1269](https://github.com/fzaninotto/Faker/pull/1269) ([zachflower](https://github.com/zachflower))
|
|
||||||
- Lock Travis-CI environment to Ubuntu Precise [\#1268](https://github.com/fzaninotto/Faker/pull/1268) ([zachflower](https://github.com/zachflower))
|
|
||||||
- Added Ukrainian job title [\#1267](https://github.com/fzaninotto/Faker/pull/1267) ([iamraccoon](https://github.com/iamraccoon))
|
|
||||||
- Add compliant en\_US SSN generator [\#1266](https://github.com/fzaninotto/Faker/pull/1266) ([zachflower](https://github.com/zachflower))
|
|
||||||
- Added more Ukrainian streets and removed irrelevant names. Added more Ukrainian mobile formats [\#1265](https://github.com/fzaninotto/Faker/pull/1265) ([iamraccoon](https://github.com/iamraccoon))
|
|
||||||
- Add Internet Format for ja\_JP. [\#1260](https://github.com/fzaninotto/Faker/pull/1260) ([itigoppo](https://github.com/itigoppo))
|
|
||||||
- rectify ISO 4217 codes [\#1258](https://github.com/fzaninotto/Faker/pull/1258) ([eidng8](https://github.com/eidng8))
|
|
||||||
- Corrected of grammar of Ukrainian middlenames and test added [\#1257](https://github.com/fzaninotto/Faker/pull/1257) ([vladbuk](https://github.com/vladbuk))
|
|
||||||
- Update ISO 4217 active codes [\#1251](https://github.com/fzaninotto/Faker/pull/1251) ([eidng8](https://github.com/eidng8))
|
|
||||||
- Update Composer File [\#1248](https://github.com/fzaninotto/Faker/pull/1248) ([vinkla](https://github.com/vinkla))
|
|
||||||
- Set capitals to false [\#1243](https://github.com/fzaninotto/Faker/pull/1243) ([Stichoza](https://github.com/Stichoza))
|
|
||||||
- Use static instead of self [\#1242](https://github.com/fzaninotto/Faker/pull/1242) ([Stichoza](https://github.com/Stichoza))
|
|
||||||
- Add VAT french format [\#1241](https://github.com/fzaninotto/Faker/pull/1241) ([baptistedonaux](https://github.com/baptistedonaux))
|
|
||||||
- Add swedish job titles [\#1234](https://github.com/fzaninotto/Faker/pull/1234) ([vinkla](https://github.com/vinkla))
|
|
||||||
- Name Simo shouldn't have comma in it [\#1230](https://github.com/fzaninotto/Faker/pull/1230) ([simoheinonen](https://github.com/simoheinonen))
|
|
||||||
- Fix: Add method annotation for ValidGenerator [\#1223](https://github.com/fzaninotto/Faker/pull/1223) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Add real text for es\_ES [\#1220](https://github.com/fzaninotto/Faker/pull/1220) ([driade](https://github.com/driade))
|
|
||||||
- Fix spelling errors [\#1218](https://github.com/fzaninotto/Faker/pull/1218) ([driade](https://github.com/driade))
|
|
||||||
- Fix spelling errors [\#1217](https://github.com/fzaninotto/Faker/pull/1217) ([driade](https://github.com/driade))
|
|
||||||
- Fixes typo [\#1212](https://github.com/fzaninotto/Faker/pull/1212) ([skullboner](https://github.com/skullboner))
|
|
||||||
- Add Person::middleName for ru\_RU provider [\#1209](https://github.com/fzaninotto/Faker/pull/1209) ([JustBlackBird](https://github.com/JustBlackBird))
|
|
||||||
- Fix creditCardDetails type hint [\#1208](https://github.com/fzaninotto/Faker/pull/1208) ([jejung](https://github.com/jejung))
|
|
||||||
- Expand dictionaries for ru\_RU locale [\#1206](https://github.com/fzaninotto/Faker/pull/1206) ([pwsdotru](https://github.com/pwsdotru))
|
|
||||||
- Fix ng\_NG to en\_NG [\#1205](https://github.com/fzaninotto/Faker/pull/1205) ([raphaeldealmeida](https://github.com/raphaeldealmeida))
|
|
||||||
- Add INN and KPP support for ru\_RU locale [\#1204](https://github.com/fzaninotto/Faker/pull/1204) ([pwsdotru](https://github.com/pwsdotru))
|
|
||||||
- Remove break line on pt\_PT Address format [\#1203](https://github.com/fzaninotto/Faker/pull/1203) ([raphaeldealmeida](https://github.com/raphaeldealmeida))
|
|
||||||
- Fix syntax of phpdoc boolean property [\#1198](https://github.com/fzaninotto/Faker/pull/1198) ([pavelkovar](https://github.com/pavelkovar))
|
|
||||||
- add en\_HK provider [\#1196](https://github.com/fzaninotto/Faker/pull/1196) ([miklcct](https://github.com/miklcct))
|
|
||||||
- use secure https [\#1186](https://github.com/fzaninotto/Faker/pull/1186) ([jpuck](https://github.com/jpuck))
|
|
||||||
- Add PhoneNumberFormat for ja\_JP. [\#1185](https://github.com/fzaninotto/Faker/pull/1185) ([itigoppo](https://github.com/itigoppo))
|
|
||||||
- Fix: Add class-level method annotations for DateTime provider [\#1183](https://github.com/fzaninotto/Faker/pull/1183) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Add ar\_SA Color Provider [\#1182](https://github.com/fzaninotto/Faker/pull/1182) ([alhoqbani](https://github.com/alhoqbani))
|
|
||||||
- Added uk\_UA Payment provider with bank name generator [\#1181](https://github.com/fzaninotto/Faker/pull/1181) ([spaghettimaster](https://github.com/spaghettimaster))
|
|
||||||
- Typos [\#1177](https://github.com/fzaninotto/Faker/pull/1177) ([ankitpokhrel](https://github.com/ankitpokhrel))
|
|
||||||
- Fix XML document example [\#1176](https://github.com/fzaninotto/Faker/pull/1176) ([ankitpokhrel](https://github.com/ankitpokhrel))
|
|
||||||
- Added Emoji to Miscellaneous [\#1175](https://github.com/fzaninotto/Faker/pull/1175) ([thomasfdm](https://github.com/thomasfdm))
|
|
||||||
- Typos and doc block fixes [\#1170](https://github.com/fzaninotto/Faker/pull/1170) ([ankitpokhrel](https://github.com/ankitpokhrel))
|
|
||||||
- Rewrote deprecated `each\(\)` usage [\#1168](https://github.com/fzaninotto/Faker/pull/1168) ([hboomsma](https://github.com/hboomsma))
|
|
||||||
- Refactor text method to remove duplication [\#1163](https://github.com/fzaninotto/Faker/pull/1163) ([ankitpokhrel](https://github.com/ankitpokhrel))
|
|
||||||
- Generate valid individual identification numbers kk\_KZ [\#1161](https://github.com/fzaninotto/Faker/pull/1161) ([YerlenZhubangaliyev](https://github.com/YerlenZhubangaliyev))
|
|
||||||
- Added Address and Company \[fa\_IR\] [\#1160](https://github.com/fzaninotto/Faker/pull/1160) ([thisissorna](https://github.com/thisissorna))
|
|
||||||
- Add Peruvian DNI generator [\#1158](https://github.com/fzaninotto/Faker/pull/1158) ([jgwong](https://github.com/jgwong))
|
|
||||||
- Removed double semicolon [\#1154](https://github.com/fzaninotto/Faker/pull/1154) ([pjona](https://github.com/pjona))
|
|
||||||
- Add prefixes for nl\_NL [\#1151](https://github.com/fzaninotto/Faker/pull/1151) ([hyperized](https://github.com/hyperized))
|
|
||||||
- Separated male and female names for sr\_RS locale. [\#1144](https://github.com/fzaninotto/Faker/pull/1144) ([bogdanpet](https://github.com/bogdanpet))
|
|
||||||
- Add personal ID, VAT for zh\_TW [\#1135](https://github.com/fzaninotto/Faker/pull/1135) ([Dagolin](https://github.com/Dagolin))
|
|
||||||
- Updating ninth digit on whole country [\#1132](https://github.com/fzaninotto/Faker/pull/1132) ([gpressutto5](https://github.com/gpressutto5))
|
|
||||||
- Indian states added to en\_IN locale [\#1131](https://github.com/fzaninotto/Faker/pull/1131) ([jiveshsg](https://github.com/jiveshsg))
|
|
||||||
- Add Text provider for ro\_MD [\#1129](https://github.com/fzaninotto/Faker/pull/1129) ([wecerny](https://github.com/wecerny))
|
|
||||||
- Add strict to randomNumber example [\#1124](https://github.com/fzaninotto/Faker/pull/1124) ([leepownall](https://github.com/leepownall))
|
|
||||||
- Say Eloquent is supported [\#1123](https://github.com/fzaninotto/Faker/pull/1123) ([guidocella](https://github.com/guidocella))
|
|
||||||
- Link Eloquent Populator [\#1120](https://github.com/fzaninotto/Faker/pull/1120) ([guidocella](https://github.com/guidocella))
|
|
||||||
- Removed dead code from Luhn.php [\#1118](https://github.com/fzaninotto/Faker/pull/1118) ([Newman101](https://github.com/Newman101))
|
|
||||||
- Improve Internet::transliterate performance [\#1112](https://github.com/fzaninotto/Faker/pull/1112) ([dunglas](https://github.com/dunglas))
|
|
||||||
- fix typo [\#1109](https://github.com/fzaninotto/Faker/pull/1109) ([johannesnagl](https://github.com/johannesnagl))
|
|
||||||
- \[cs\_CZ\] Fixed Czech phone numbers [\#1108](https://github.com/fzaninotto/Faker/pull/1108) ([tomasbedrich](https://github.com/tomasbedrich))
|
|
||||||
- Update MasterCard BIN Range [\#1103](https://github.com/fzaninotto/Faker/pull/1103) ([andysnell](https://github.com/andysnell))
|
|
||||||
- Add biggest german cities [\#1102](https://github.com/fzaninotto/Faker/pull/1102) ([Konafets](https://github.com/Konafets))
|
|
||||||
- Change postal code format for ko\_KR [\#1094](https://github.com/fzaninotto/Faker/pull/1094) ([coozplz](https://github.com/coozplz))
|
|
||||||
- Introduced the ability to specify the timezone for dateTimeThis\*\(\) methods [\#1090](https://github.com/fzaninotto/Faker/pull/1090) ([telkins](https://github.com/telkins))
|
|
||||||
- Fixed Issue \#1086 [\#1088](https://github.com/fzaninotto/Faker/pull/1088) ([Newman101](https://github.com/Newman101))
|
|
||||||
- \[ja\_JP\]kana of Japanese name by gender. [\#1087](https://github.com/fzaninotto/Faker/pull/1087) ([itigoppo](https://github.com/itigoppo))
|
|
||||||
- Fix unused code [\#1083](https://github.com/fzaninotto/Faker/pull/1083) ([borgogelli](https://github.com/borgogelli))
|
|
||||||
- Amended permissions for en\_GB AddressTest.php [\#1071](https://github.com/fzaninotto/Faker/pull/1071) ([Newman101](https://github.com/Newman101))
|
|
||||||
- Ensure unique IDs in randomHtml [\#1068](https://github.com/fzaninotto/Faker/pull/1068) ([vlakoff](https://github.com/vlakoff))
|
|
||||||
- Updated \[de\_DE\] city names [\#1067](https://github.com/fzaninotto/Faker/pull/1067) ([plxx](https://github.com/plxx))
|
|
||||||
- Update method signature in Generator phpdoc [\#1066](https://github.com/fzaninotto/Faker/pull/1066) ([vlakoff](https://github.com/vlakoff))
|
|
||||||
- Add Thai providers [\#1065](https://github.com/fzaninotto/Faker/pull/1065) ([tuwannu](https://github.com/tuwannu))
|
|
||||||
- \(Minor\) Fixed the default locale stated in the readme [\#1064](https://github.com/fzaninotto/Faker/pull/1064) ([taylankasap](https://github.com/taylankasap))
|
|
||||||
- \[nl\_NL\] Make person provider behave more realistically [\#1061](https://github.com/fzaninotto/Faker/pull/1061) ([curry684](https://github.com/curry684))
|
|
||||||
- Add allowDuplicates option to randomElements\(\) [\#1060](https://github.com/fzaninotto/Faker/pull/1060) ([vlakoff](https://github.com/vlakoff))
|
|
||||||
- Docblocks: Add some missing @method tags [\#1059](https://github.com/fzaninotto/Faker/pull/1059) ([Kurre](https://github.com/Kurre))
|
|
||||||
- \[fi\_FI\] Improve phone number generator [\#1054](https://github.com/fzaninotto/Faker/pull/1054) ([Kurre](https://github.com/Kurre))
|
|
||||||
- Add personalIdentityNumber\(\) to fi\_FI/Person.php [\#1053](https://github.com/fzaninotto/Faker/pull/1053) ([oittaa](https://github.com/oittaa))
|
|
||||||
- Issue \#1041 [\#1052](https://github.com/fzaninotto/Faker/pull/1052) ([daleattree](https://github.com/daleattree))
|
|
||||||
- Update Text.php [\#1051](https://github.com/fzaninotto/Faker/pull/1051) ([gulaandrij](https://github.com/gulaandrij))
|
|
||||||
- Fix French phone numbers with 07 prefix [\#1046](https://github.com/fzaninotto/Faker/pull/1046) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
- \[Generator.php\] mt\_rand\(\) changed in PHP 7.1 [\#1045](https://github.com/fzaninotto/Faker/pull/1045) ([oittaa](https://github.com/oittaa))
|
|
||||||
- Add 'FI' to Payment Provider [\#1044](https://github.com/fzaninotto/Faker/pull/1044) ([oittaa](https://github.com/oittaa))
|
|
||||||
- Added id number generator to Person Provider for the en\_ZA locale [\#1039](https://github.com/fzaninotto/Faker/pull/1039) ([smithandre](https://github.com/smithandre))
|
|
||||||
- \[Feature\] Add nigerian provider [\#1030](https://github.com/fzaninotto/Faker/pull/1030) ([elchroy](https://github.com/elchroy))
|
|
||||||
- \[pl\_PL\] Handle state. [\#1029](https://github.com/fzaninotto/Faker/pull/1029) ([piotrooo](https://github.com/piotrooo))
|
|
||||||
- Fixed polish text - change '--' into '-'. [\#1027](https://github.com/fzaninotto/Faker/pull/1027) ([piotrooo](https://github.com/piotrooo))
|
|
||||||
- Update Text.php [\#1025](https://github.com/fzaninotto/Faker/pull/1025) ([gulaandrij](https://github.com/gulaandrij))
|
|
||||||
- Adding Nationalized Citizens to DNI in Person.php [\#1021](https://github.com/fzaninotto/Faker/pull/1021) ([celisflen-bers](https://github.com/celisflen-bers))
|
|
||||||
- Add nik to indonesia [\#1019](https://github.com/fzaninotto/Faker/pull/1019) ([Nuffic](https://github.com/Nuffic))
|
|
||||||
- fix mb\_substr missing parameter error when generating japanese string with realText method [\#1018](https://github.com/fzaninotto/Faker/pull/1018) ([horan-geeker](https://github.com/horan-geeker))
|
|
||||||
- IBAN Formatters for New Locales [\#1015](https://github.com/fzaninotto/Faker/pull/1015) ([okj579](https://github.com/okj579))
|
|
||||||
- German Bank Names [\#1014](https://github.com/fzaninotto/Faker/pull/1014) ([okj579](https://github.com/okj579))
|
|
||||||
- Adding countries for pl\_PL provider [\#1009](https://github.com/fzaninotto/Faker/pull/1009) ([mertcanesen](https://github.com/mertcanesen))
|
|
||||||
- Adding Pattern Lab plugin to list of 3rd party libraries [\#1008](https://github.com/fzaninotto/Faker/pull/1008) ([EvanLovely](https://github.com/EvanLovely))
|
|
||||||
- Korea top 100 lastName [\#1006](https://github.com/fzaninotto/Faker/pull/1006) ([tael](https://github.com/tael))
|
|
||||||
- Use real Belgian postcodes instead of random number [\#1004](https://github.com/fzaninotto/Faker/pull/1004) ([toonevdb](https://github.com/toonevdb))
|
|
||||||
- Add bankAccountNumber implementations [\#1000](https://github.com/fzaninotto/Faker/pull/1000) ([akramfares](https://github.com/akramfares))
|
|
||||||
- Generates a random NIR number \(fr\_FR\) [\#997](https://github.com/fzaninotto/Faker/pull/997) ([Ultim4T0m](https://github.com/Ultim4T0m))
|
|
||||||
- \#989 Fix country typo [\#996](https://github.com/fzaninotto/Faker/pull/996) ([adriantombu](https://github.com/adriantombu))
|
|
||||||
- adding back CNP [\#988](https://github.com/fzaninotto/Faker/pull/988) ([the-noob](https://github.com/the-noob))
|
|
||||||
- Fix phpunit tests fail on 64-bit systems \#982 [\#983](https://github.com/fzaninotto/Faker/pull/983) ([Powerhead13](https://github.com/Powerhead13))
|
|
||||||
- Remove trailing dot in username if any [\#975](https://github.com/fzaninotto/Faker/pull/975) ([vlakoff](https://github.com/vlakoff))
|
|
||||||
- HTML Lorem [\#971](https://github.com/fzaninotto/Faker/pull/971) ([rudkjobing](https://github.com/rudkjobing))
|
|
||||||
- Fix a mixup between male and female last names in Icelandic. [\#970](https://github.com/fzaninotto/Faker/pull/970) ([arthur-olafsson](https://github.com/arthur-olafsson))
|
|
||||||
- Remove duplicate [\#969](https://github.com/fzaninotto/Faker/pull/969) ([mijgame](https://github.com/mijgame))
|
|
||||||
- fix \[zh\_CN\]PhoneNumber illegal operator prefix [\#966](https://github.com/fzaninotto/Faker/pull/966) ([zhwei](https://github.com/zhwei))
|
|
||||||
- es\_ES: Generate VAT Number [\#964](https://github.com/fzaninotto/Faker/pull/964) ([miguelgf](https://github.com/miguelgf))
|
|
||||||
- Update Image.php [\#963](https://github.com/fzaninotto/Faker/pull/963) ([gulaandrij](https://github.com/gulaandrij))
|
|
||||||
- Remove cnp formatter from RO\_ro locale \(fails tests\) [\#962](https://github.com/fzaninotto/Faker/pull/962) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
- Adding valid en\_GB postcodes [\#961](https://github.com/fzaninotto/Faker/pull/961) ([the-noob](https://github.com/the-noob))
|
|
||||||
- Adding Text for ro\_RO [\#959](https://github.com/fzaninotto/Faker/pull/959) ([the-noob](https://github.com/the-noob))
|
|
||||||
- Minor: Fixed trailing space in DateTime provider [\#956](https://github.com/fzaninotto/Faker/pull/956) ([tifabien](https://github.com/tifabien))
|
|
||||||
- Remove 'Stripper' from en\_US job titles [\#954](https://github.com/fzaninotto/Faker/pull/954) ([amcsi](https://github.com/amcsi))
|
|
||||||
- fix 32bits issue [\#953](https://github.com/fzaninotto/Faker/pull/953) ([remicollet](https://github.com/remicollet))
|
|
||||||
- Fix EAN8 checkSum generator [\#951](https://github.com/fzaninotto/Faker/pull/951) ([MatthieuMota](https://github.com/MatthieuMota))
|
|
||||||
- Fixed description and the use of early undocumented parameters. [\#949](https://github.com/fzaninotto/Faker/pull/949) ([andrey-helldar](https://github.com/andrey-helldar))
|
|
||||||
- Pushing new mobile prefixes in philippines [\#944](https://github.com/fzaninotto/Faker/pull/944) ([napoleon101392](https://github.com/napoleon101392))
|
|
||||||
- Update Company.php [\#943](https://github.com/fzaninotto/Faker/pull/943) ([thiagotalma](https://github.com/thiagotalma))
|
|
||||||
- Fix to Issue \#935 - German Locale [\#936](https://github.com/fzaninotto/Faker/pull/936) ([Newman101](https://github.com/Newman101))
|
|
||||||
- el\_CY Locale [\#930](https://github.com/fzaninotto/Faker/pull/930) ([softius](https://github.com/softius))
|
|
||||||
- Add phpdoc method dateTimeInInterval in Generator.php [\#926](https://github.com/fzaninotto/Faker/pull/926) ([KeithYeh](https://github.com/KeithYeh))
|
|
||||||
- Harmonize fr\_\*\Company [\#918](https://github.com/fzaninotto/Faker/pull/918) ([Max13](https://github.com/Max13))
|
|
||||||
- Fix: fix invalid parameter of mb\_substr\(\) [\#917](https://github.com/fzaninotto/Faker/pull/917) ([tkawaji](https://github.com/tkawaji))
|
|
||||||
- kk\_KZ Company/person identification numbers unit tests [\#916](https://github.com/fzaninotto/Faker/pull/916) ([YerlenZhubangaliyev](https://github.com/YerlenZhubangaliyev))
|
|
||||||
- ka\_GE: overall improvements to ka\_GE locale [\#913](https://github.com/fzaninotto/Faker/pull/913) ([hertzg](https://github.com/hertzg))
|
|
||||||
- Fix: Do not pick a random float less than minimum [\#909](https://github.com/fzaninotto/Faker/pull/909) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Fix: Prefer dependencies installed from dist [\#908](https://github.com/fzaninotto/Faker/pull/908) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Add a building number with letter to German speaking locales. [\#903](https://github.com/fzaninotto/Faker/pull/903) ([markuspoerschke](https://github.com/markuspoerschke))
|
|
||||||
- \[RFR\] Remove parts of the hu\_HU address formatters [\#902](https://github.com/fzaninotto/Faker/pull/902) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
- use Luhn to calculate ar\_SA id numbers. [\#875](https://github.com/fzaninotto/Faker/pull/875) ([FooBarQuaxx](https://github.com/FooBarQuaxx))
|
|
||||||
- Fix Doctrine ODM Support [\#489](https://github.com/fzaninotto/Faker/pull/489) ([cbourgois](https://github.com/cbourgois))
|
|
||||||
|
|
||||||
|
|
||||||
## 2016-04-29, v1.6.0
|
|
||||||
|
|
||||||
- Remove parts of the Hungarian (hu\_HU) address formatters [\#902](https://github.com/fzaninotto/Faker/pull/902) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
- Renamed norwegian (nb\_NO) locale [\#901](https://github.com/fzaninotto/Faker/pull/901) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
- Improveed German (de\_DE) titles [\#897](https://github.com/fzaninotto/Faker/pull/897) ([christianbartels](https://github.com/christianbartels))
|
|
||||||
- Added VAT formatter to nl\_BE and fr\_BE providers [\#896](https://github.com/fzaninotto/Faker/pull/896) ([anvanza](https://github.com/anvanza))
|
|
||||||
- Fixed provider namespace for Lithuanian (lt\_LT) [\#894](https://github.com/fzaninotto/Faker/pull/894) ([sanis](https://github.com/sanis))
|
|
||||||
- Removed unnecessary (and incompatible) license from Russian and Ukrainian (uk\_UA & ru\_RU) Text providers [\#892](https://github.com/fzaninotto/Faker/pull/892) ([Newman101](https://github.com/Newman101))
|
|
||||||
- Improved `languageCode` formatted to include all ISO-639-1 standard codes [\#889](https://github.com/fzaninotto/Faker/pull/889) ([andrewnicols](https://github.com/andrewnicols))
|
|
||||||
- Improved Hungarian provider [\#883](https://github.com/fzaninotto/Faker/pull/883) ([balping](https://github.com/balping))
|
|
||||||
- Fixed typo in Austrian Person provider [\#880](https://github.com/fzaninotto/Faker/pull/880) ([xelan](https://github.com/xelan))
|
|
||||||
- Added Chines (zh\_CN) `catchPhrase` formatter [\#878](https://github.com/fzaninotto/Faker/pull/878) ([z-song](https://github.com/z-song))
|
|
||||||
- Added mention of Brazilian (pt\_BR) providers in readme [\#877](https://github.com/fzaninotto/Faker/pull/877) ([iget-master](https://github.com/iget-master))
|
|
||||||
- Updated composer `require` section to allow PHP 7 in safer way [\#874](https://github.com/fzaninotto/Faker/pull/874) ([TomasVotruba](https://github.com/TomasVotruba))
|
|
||||||
- Added Greek (el\_GR) `mobilePhoneNumber` and `tollFreeNumber` formatters [\#869](https://github.com/fzaninotto/Faker/pull/869) ([sebdesign](https://github.com/sebdesign))
|
|
||||||
- Added Lorempixel check for `ImageTest.php` to avoid test fails when the service is offline [\#866](https://github.com/fzaninotto/Faker/pull/866) ([Newman101](https://github.com/Newman101))
|
|
||||||
- Added Chinese (zh\_CN) Providers [\#864](https://github.com/fzaninotto/Faker/pull/864) ([z-song](https://github.com/z-song))
|
|
||||||
- Added unit tests for Canadian (en\_CA) provider [\#862](https://github.com/fzaninotto/Faker/pull/862) ([Newman101](https://github.com/Newman101))
|
|
||||||
- Added Dutch BTW \(vat\) Number [\#861](https://github.com/fzaninotto/Faker/pull/861) ([LauLaman](https://github.com/LauLaman))
|
|
||||||
- Improved Australian (en\_AU) provider [\#858](https://github.com/fzaninotto/Faker/pull/858) ([Newman101](https://github.com/Newman101))
|
|
||||||
- Added Propel2 ORM support [\#852](https://github.com/fzaninotto/Faker/pull/852) ([iTechDhaval](https://github.com/iTechDhaval))
|
|
||||||
- Added en\_IN unit test for `Address.php` [\#849](https://github.com/fzaninotto/Faker/pull/849) ([Newman101](https://github.com/Newman101))
|
|
||||||
- Updated docs to clarify that `randomElements` does not repeat input elements [\#848](https://github.com/fzaninotto/Faker/pull/848) ([sustmi](https://github.com/sustmi))
|
|
||||||
- Optimized Taiwanese (zh\_TW) `realText` provider [\#844](https://github.com/fzaninotto/Faker/pull/844) ([Newman101](https://github.com/Newman101))
|
|
||||||
- Added more Iranian (fa\_IR) TLDs [\#843](https://github.com/fzaninotto/Faker/pull/843) ([VagrantStory](https://github.com/VagrantStory))
|
|
||||||
- Added Hebrew (he\_IL) `country` formatter [\#841](https://github.com/fzaninotto/Faker/pull/841) ([yonirom](https://github.com/yonirom))
|
|
||||||
- Documented `boolean` formatter [\#840](https://github.com/fzaninotto/Faker/pull/840) ([danieliancu](https://github.com/danieliancu))
|
|
||||||
- Fixed modifiers anchor readme [\#838](https://github.com/fzaninotto/Faker/pull/838) ([danieliancu](https://github.com/danieliancu))
|
|
||||||
- Added Dutch (nl\_NL) real text provider [\#837](https://github.com/fzaninotto/Faker/pull/837) ([endroid](https://github.com/endroid))
|
|
||||||
- Added `valid` modifier [\#836](https://github.com/fzaninotto/Faker/pull/836) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
- Added Iranian (fa\_IR) `PhoneNumber` provider [\#833](https://github.com/fzaninotto/Faker/pull/833) ([ghost](https://github.com/ghost))
|
|
||||||
- Add Brazilian (pt\_BR) `region` and `regionAbbr` formatters [\#828](https://github.com/fzaninotto/Faker/pull/828) ([francinaldo](https://github.com/francinaldo))
|
|
||||||
- Improved Austrian (de\_AT) names, states, and realtext [\#826](https://github.com/fzaninotto/Faker/pull/826) ([Findus23](https://github.com/Findus23))
|
|
||||||
- Improved German (de\_DE) names [\#825](https://github.com/fzaninotto/Faker/pull/825) ([Findus23](https://github.com/Findus23))
|
|
||||||
- Improved Latvian (lv\_LV) first names [\#823](https://github.com/fzaninotto/Faker/pull/823) ([veisis](https://github.com/veisis))
|
|
||||||
- Improved Latvian (lv\_LV) `phoneNumber` formatter [\#822](https://github.com/fzaninotto/Faker/pull/822) ([veisis](https://github.com/veisis))
|
|
||||||
- Updated phpDoc link to IBAN format reference in `Payment` provider [\#821](https://github.com/fzaninotto/Faker/pull/821) ([god107](https://github.com/god107))
|
|
||||||
- Updated Sport ORM populator to populate values for numeric fields [\#820](https://github.com/fzaninotto/Faker/pull/820) ([urisavka](https://github.com/urisavka))
|
|
||||||
- Updated Chinese (zh\_CN) operators' phone number prefix. [\#819](https://github.com/fzaninotto/Faker/pull/819) ([vistart](https://github.com/vistart))
|
|
||||||
- Optimized Spot ORM `EntityPopulator` [\#817](https://github.com/fzaninotto/Faker/pull/817) ([Newman101](https://github.com/Newman101))
|
|
||||||
- Added Korean (ko\_KR) `realText` formatter [\#815](https://github.com/fzaninotto/Faker/pull/815) ([jdssem](https://github.com/jdssem))
|
|
||||||
- Updated `imageUrl` formatter phpDoc [\#814](https://github.com/fzaninotto/Faker/pull/814) ([jonwurtzler](https://github.com/jonwurtzler))
|
|
||||||
- Optimized Taiwanese (zh\_TW) text provider [\#809](https://github.com/fzaninotto/Faker/pull/809) ([BePsvPT](https://github.com/BePsvPT))
|
|
||||||
- Added strict comparison to Czech (cs\_CS) `birthNumber` formatter [\#807](https://github.com/fzaninotto/Faker/pull/807) ([Newman101](https://github.com/Newman101))
|
|
||||||
- Added Greek (el\_GR) `realText` formatter [\#805](https://github.com/fzaninotto/Faker/pull/805) ([hootlex](https://github.com/hootlex))
|
|
||||||
- Added Simplified Chinese \(zh\_CN\) `state` and `stateAbbr` formatters [\#804](https://github.com/fzaninotto/Faker/pull/804) ([zhanghuanchong](https://github.com/zhanghuanchong))
|
|
||||||
- Update `Image` provider to allow generation of grayscale images [\#801](https://github.com/fzaninotto/Faker/pull/801) ([neutralrockets](https://github.com/neutralrockets))
|
|
||||||
- Fixed Taiwanese (zh_TW) incorrect `mb_substr()` arguments [\#799](https://github.com/fzaninotto/Faker/pull/799) ([BePsvPT](https://github.com/BePsvPT))
|
|
||||||
- Added Spot ORM populator [\#796](https://github.com/fzaninotto/Faker/pull/796) ([urisavka](https://github.com/urisavka))
|
|
||||||
- Added Italian (it\_IT) `vatId` and `taxId` formatters [\#790](https://github.com/fzaninotto/Faker/pull/790) ([brainrepo](https://github.com/brainrepo))
|
|
||||||
- Added some fixes to Armenian (hy\_AM) locale [\#788](https://github.com/fzaninotto/Faker/pull/788) ([mhamlet](https://github.com/mhamlet))
|
|
||||||
- Removed duplicate entries in `toAscii()` transliteration table, used in `Internet` provider [\#787](https://github.com/fzaninotto/Faker/pull/787) ([vlakoff](https://github.com/vlakoff))
|
|
||||||
- Added Indian (en\_IN) providers [\#785](https://github.com/fzaninotto/Faker/pull/785) ([kartiksomani](https://github.com/kartiksomani))
|
|
||||||
- Removed duplicate country names in various locales, removed non-random country arrays [\#784](https://github.com/fzaninotto/Faker/pull/784) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
- Improved Swiss (de\_CH) phone numbers [\#782](https://github.com/fzaninotto/Faker/pull/782) ([z38](https://github.com/z38))
|
|
||||||
- Added Swiss (de\_CH) names [\#781](https://github.com/fzaninotto/Faker/pull/781) ([z38](https://github.com/z38))
|
|
||||||
- Make capitalization of first word optional in Text Provider [\#778](https://github.com/fzaninotto/Faker/pull/778) ([LagunaJavier](https://github.com/LagunaJavier))
|
|
||||||
- Added Georgian (ka\_GE) providers [\#777](https://github.com/fzaninotto/Faker/pull/777) ([akalongman](https://github.com/akalongman))
|
|
||||||
- Fix CakePHP populator [\#776](https://github.com/fzaninotto/Faker/pull/776) ([daniel-mueller](https://github.com/daniel-mueller))
|
|
||||||
- Added unit tests for `Address` provider in many locales [\#775](https://github.com/fzaninotto/Faker/pull/775) [\#773](https://github.com/fzaninotto/Faker/pull/773) [\#772](https://github.com/fzaninotto/Faker/pull/772) [\#767](https://github.com/fzaninotto/Faker/pull/767) [\#765](https://github.com/fzaninotto/Faker/pull/765) [\#764](https://github.com/fzaninotto/Faker/pull/764) [\#758](https://github.com/fzaninotto/Faker/pull/758) [\#756](https://github.com/fzaninotto/Faker/pull/756) [\#747](https://github.com/fzaninotto/Faker/pull/747) [\#741](https://github.com/fzaninotto/Faker/pull/741) ([Newman101](https://github.com/Newman101))
|
|
||||||
- Added `dbi` formatter to Spanish (es\_ES) Person provider [\#763](https://github.com/fzaninotto/Faker/pull/763) ([mikk150](https://github.com/mikk150))
|
|
||||||
- Added South Africa (en\_ZA) locale [\#761](https://github.com/fzaninotto/Faker/pull/761) ([smithandre](https://github.com/smithandre)) [\#760](https://github.com/fzaninotto/Faker/pull/760) ([smithandre](https://github.com/smithandre)) [\#759](https://github.com/fzaninotto/Faker/pull/759) ([smithandre](https://github.com/smithandre))
|
|
||||||
- Added E.164 phone number generator [\#753](https://github.com/fzaninotto/Faker/pull/753) ([daleattree](https://github.com/daleattree))
|
|
||||||
- Fixed serialization issue in `unique` modifier [\#749](https://github.com/fzaninotto/Faker/pull/749) ([EmanueleMinotto](https://github.com/EmanueleMinotto))
|
|
||||||
- Added Switzerland (de\_CH, fr\_CH, it\_CH) providers [\#739](https://github.com/fzaninotto/Faker/pull/739) ([r3h6](https://github.com/r3h6))
|
|
||||||
- Added PHPDocs, removed unused variable [\#738](https://github.com/fzaninotto/Faker/pull/738) ([daniel-mueller](https://github.com/daniel-mueller))
|
|
||||||
- Fixed building numbers to have non-zero first bumber [\#737](https://github.com/fzaninotto/Faker/pull/737) ([jmauerhan](https://github.com/jmauerhan))
|
|
||||||
- Updated ninth digit for Brazilian cell phone numbers [\#734](https://github.com/fzaninotto/Faker/pull/734) ([igorsantos07](https://github.com/igorsantos07))
|
|
||||||
- Simplified Factory code [\#732](https://github.com/fzaninotto/Faker/pull/732) ([vlakoff](https://github.com/vlakoff))
|
|
||||||
- Added mention of [images-generator](https://github.com/bruceheller/images-generator) in readme [\#731](https://github.com/fzaninotto/Faker/pull/731) ([bruceheller](https://github.com/bruceheller))
|
|
||||||
- Optimize Internet::toAscii\(\) by using a static cache and translitteration [\#730](https://github.com/fzaninotto/Faker/pull/730) [\#729](https://github.com/fzaninotto/Faker/pull/729)
|
|
||||||
[\#725](https://github.com/fzaninotto/Faker/pull/725) [\#724](https://github.com/fzaninotto/Faker/pull/724) ([vlakoff](https://github.com/vlakoff))
|
|
||||||
- Added more English (en\_GB) Phone Number formats [\#721](https://github.com/fzaninotto/Faker/pull/721) ([nickwebcouk](https://github.com/nickwebcouk))
|
|
||||||
- Cleaned up `use` statements across the code [\#719](https://github.com/fzaninotto/Faker/pull/719) ([pomaxa](https://github.com/pomaxa))
|
|
||||||
- Fixed CackePHP populator [\#718](https://github.com/fzaninotto/Faker/pull/718) ([sdustinh](https://github.com/sdustinh))
|
|
||||||
- Cleaned up various phpmd notices [\#715](https://github.com/fzaninotto/Faker/pull/715) ([pomaxa](https://github.com/pomaxa))
|
|
||||||
- Added `Color` provider to Latvian (lv_LV) locale [\#714](https://github.com/fzaninotto/Faker/pull/714) ([pomaxa](https://github.com/pomaxa))
|
|
||||||
- Fixed bad randomization in Doctrine populator [\#713](https://github.com/fzaninotto/Faker/pull/713) ([pomaxa](https://github.com/pomaxa))
|
|
||||||
- Added Mongolian (mn\_MN) providers [\#709](https://github.com/fzaninotto/Faker/pull/709) ([selmonal](https://github.com/selmonal))
|
|
||||||
- Improved Australian (en\_AU) `postcode` formatter [\#703](https://github.com/fzaninotto/Faker/pull/703) ([xfxf](https://github.com/xfxf))
|
|
||||||
- Added support for asterisks in `bothify` and `optimize` [\#701](https://github.com/fzaninotto/Faker/pull/701) ([nineinchnick](https://github.com/nineinchnick))
|
|
||||||
- Fixed important distinction between ORM and database framework in README’s reference to an external Faker provider for POMM that I have never even tested. Anyway, POMM is highly recommended if you are a Postgres fan, or if you want to please Grégoire and help him finish his lifelong project of listening to music on a hi-fi audio equipment he built from his own hands [\#696](https://github.com/fzaninotto/Faker/pull/696) ([chanmix51](https://github.com/chanmix51))
|
|
||||||
- Fixed example `text()` output in README [\#694](https://github.com/fzaninotto/Faker/pull/694) ([vlakoff](https://github.com/vlakoff))
|
|
||||||
- Added mention of CakePHP 2.x Seeder Plugin to readme [\#691](https://github.com/fzaninotto/Faker/pull/691) ([ravage84](https://github.com/ravage84))
|
|
||||||
- Fixed invalid email bug for Korean (ko\_KR) [\#690](https://github.com/fzaninotto/Faker/pull/690) ([pearlc](https://github.com/pearlc))
|
|
||||||
- Removed an invalid Dutch (nl\_NL) lastname that breaks email generator [\#689](https://github.com/fzaninotto/Faker/pull/689) ([SpaceK33z](https://github.com/SpaceK33z))
|
|
||||||
- Updated `numberBetween()` to be order agnostic [\#683](https://github.com/fzaninotto/Faker/pull/683) ([xfxf](https://github.com/xfxf))
|
|
||||||
- Added several English (en\_US) bank-related formatters [\#682](https://github.com/fzaninotto/Faker/pull/682) ([okj579](https://github.com/okj579))
|
|
||||||
- Fixed `ipv4` formatter to avoid generating special purpose addresses [\#681](https://github.com/fzaninotto/Faker/pull/681) ([ravage84](https://github.com/ravage84))
|
|
||||||
- Moved `intl` extension to `require-dev` in `composer.json` file [\#680](https://github.com/fzaninotto/Faker/pull/680) ([jaschweder](https://github.com/jaschweder))
|
|
||||||
- Added more Turkish (tr\_TR) phones number formats [\#678](https://github.com/fzaninotto/Faker/pull/678) ([Quanthir](https://github.com/Quanthir))
|
|
||||||
- Fixed primary Key warning in CakePHP ORM populator [\#677](https://github.com/fzaninotto/Faker/pull/677) ([davidyell](https://github.com/davidyell))
|
|
||||||
- Added time zone support for provider methods returning DateTime instance [\#675](https://github.com/fzaninotto/Faker/pull/675) ([bishopb](https://github.com/bishopb))
|
|
||||||
- Removed trailing spaces from some Argentinian (es\_AR) female first names [\#674](https://github.com/fzaninotto/Faker/pull/674) ([ivanmirson](https://github.com/ivanmirson))
|
|
||||||
- Added Lithuanian (lt\_LT) locale [\#673](https://github.com/fzaninotto/Faker/pull/673) ([ekateiva](https://github.com/ekateiva))
|
|
||||||
- Added mention of Alice to readme [\#665](https://github.com/fzaninotto/Faker/pull/665) ([Seldaek](https://github.com/Seldaek))
|
|
||||||
- Fixed namespace in tests [\#663](https://github.com/fzaninotto/Faker/pull/663) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Fixed trailing spaces in `Color` provider [\#662](https://github.com/fzaninotto/Faker/pull/662) ([apsylone](https://github.com/apsylone))
|
|
||||||
- Removed duplicate country names in Russian (ru\_RU) `Address` provider [\#659](https://github.com/fzaninotto/Faker/pull/659) ([nurolopher](https://github.com/nurolopher))
|
|
||||||
- Added `rgba` formatter to `Color` provider [\#653](https://github.com/fzaninotto/Faker/pull/653) ([apsylone](https://github.com/apsylone))
|
|
||||||
- Fixed bad randomization in CakePHP populator [\#648](https://github.com/fzaninotto/Faker/pull/648) ([jadb](https://github.com/jadb))
|
|
||||||
- Updated phpunit configuration to better use colors [\#643](https://github.com/fzaninotto/Faker/pull/643) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Updated `makefile` to install dev dependencies by default [\#642](https://github.com/fzaninotto/Faker/pull/642) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Updated Travis configuration to cache dependencies between builds [\#641](https://github.com/fzaninotto/Faker/pull/641) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Added SVG badge to readme for displaying Travis build status [\#640](https://github.com/fzaninotto/Faker/pull/640) ([localheinz](https://github.com/localheinz))
|
|
||||||
- Added Croatian (hr\_HR) locale [\#638](https://github.com/fzaninotto/Faker/pull/638) ([toniperic](https://github.com/toniperic))
|
|
||||||
- Updated `dateTimeBetween` PHPDoc [\#635](https://github.com/fzaninotto/Faker/pull/635) ([theofidry](https://github.com/theofidry))
|
|
||||||
- Add mention of Symfony2 bundles in readme [\#634](https://github.com/fzaninotto/Faker/pull/634) ([theofidry](https://github.com/theofidry))
|
|
||||||
- Added Hebrew (he\_IL) locale [\#633](https://github.com/fzaninotto/Faker/pull/633) ([yonirom](https://github.com/yonirom))
|
|
||||||
- Updated `seed` to accept non-integer seeds [\#632](https://github.com/fzaninotto/Faker/pull/632) ([theofidry](https://github.com/theofidry))
|
|
||||||
- Added DocBlock to `Factory::create()` [\#631](https://github.com/fzaninotto/Faker/pull/631) ([tonynelson19](https://github.com/tonynelson19))
|
|
||||||
- Added `jobTitle` generator [\#630](https://github.com/fzaninotto/Faker/pull/630) ([gregoryduckworth](https://github.com/gregoryduckworth))
|
|
||||||
- Updated Chinese (zh\_CN) `Person` provider to generate more correct names [\#628](https://github.com/fzaninotto/Faker/pull/628) ([phoenixgao](https://github.com/phoenixgao))
|
|
||||||
- Updated Brazilian (pt\_BR) `cellphone` formatter to make it more flexible [\#623](https://github.com/fzaninotto/Faker/pull/623) ([igorsantos07](https://github.com/igorsantos07))
|
|
||||||
- Add Arabic for Saudi Arabia (ar\_SA) locale [\#618](https://github.com/fzaninotto/Faker/pull/618) ([ibrasho](https://github.com/ibrasho))
|
|
||||||
- Updated en\_US phone numbers [\#615](https://github.com/fzaninotto/Faker/pull/615) ([okj579](https://github.com/okj579))
|
|
||||||
- Fixed typos in variable names and exceptions [\#614](https://github.com/fzaninotto/Faker/pull/614) ([pborreli](https://github.com/pborreli))
|
|
||||||
- Added a table of contents to the readme file. [\#613](https://github.com/fzaninotto/Faker/pull/613) ([camilopayan](https://github.com/camilopayan))
|
|
||||||
- Added Brazilian (es_BR) credit card formatters [\#608](https://github.com/fzaninotto/Faker/pull/608) ([igorsantos07](https://github.com/igorsantos07))
|
|
||||||
- Updated `iban` formatter to be cross-locale [\#607](https://github.com/fzaninotto/Faker/pull/607) ([okj579](https://github.com/okj579))
|
|
||||||
- Improved ORM name guesser logic [\#606](https://github.com/fzaninotto/Faker/pull/606) ([watermanio](https://github.com/watermanio))
|
|
||||||
- Fixed doc typo [\#605](https://github.com/fzaninotto/Faker/pull/605) ([igorsantos07](https://github.com/igorsantos07))
|
|
||||||
- Removed executable bits [\#593](https://github.com/fzaninotto/Faker/pull/593) ([siwinski](https://github.com/siwinski))
|
|
||||||
- Fixed `iban` generator [\#590](https://github.com/fzaninotto/Faker/pull/590) ([okj579](https://github.com/okj579))
|
|
||||||
- Added Philippines (en\_PH) `mobileNumber` formatter [\#589](https://github.com/fzaninotto/Faker/pull/589) ([lozadaOmr](https://github.com/lozadaOmr))
|
|
||||||
- Added support for min / max params in `latitude` and `longitude` formatters [\#570](https://github.com/fzaninotto/Faker/pull/570) ([actuallymab](https://github.com/actuallymab))
|
|
||||||
- Added Czech (cs_CZ) `birthNumber` formatter [\#535](https://github.com/fzaninotto/Faker/pull/535) ([tomasbedrich](https://github.com/tomasbedrich))
|
|
||||||
- Added `dateTimeInInterval` formatter [\#526](https://github.com/fzaninotto/Faker/pull/526) ([nicodmf](https://github.com/nicodmf))
|
|
||||||
- Updated `optional` and `boolean` apis to be more consistent [\#513](https://github.com/fzaninotto/Faker/pull/513) ([EmanueleMinotto](https://github.com/EmanueleMinotto))
|
|
||||||
- Added Greek (el\_GR) `Address` provider [\#504](https://github.com/fzaninotto/Faker/pull/504) ([drakakisgeo](https://github.com/drakakisgeo))
|
|
||||||
|
|
||||||
## 2015-05-29, v1.5.0
|
|
||||||
|
|
||||||
* Added ability to print custom text on the images fetched by the Image provider [\#583](https://github.com/fzaninotto/Faker/pull/583) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
* Fixed typos in Peruvian (es\_PE) Person provider [\#581](https://github.com/fzaninotto/Faker/pull/581) [\#580](https://github.com/fzaninotto/Faker/pull/580) ([ysramirez](https://github.com/ysramirez))
|
|
||||||
* Added instructions for installing with composer to readme.md [\#572](https://github.com/fzaninotto/Faker/pull/572) ([totophe](https://github.com/totophe))
|
|
||||||
* Added Kazakh (kk\_KZ) locale [\#569](https://github.com/fzaninotto/Faker/pull/569) ([YerlenZhubangaliyev](https://github.com/YerlenZhubangaliyev))
|
|
||||||
* Added Korean (ko\_KR) locale [\#566](https://github.com/fzaninotto/Faker/pull/566) ([pearlc](https://github.com/pearlc))
|
|
||||||
* Fixed file provider to ignore unreadable and special files [\#565](https://github.com/fzaninotto/Faker/pull/565) ([svrnm](https://github.com/svrnm))
|
|
||||||
* Fixed Dutch (nl\_NL) Address and Person providers [\#560](https://github.com/fzaninotto/Faker/pull/560) ([killerog](https://github.com/killerog))
|
|
||||||
* Fixed Dutch (nl\_NL) Person provider [\#559](https://github.com/fzaninotto/Faker/pull/559) ([pauledenburg](https://github.com/pauledenburg))
|
|
||||||
* Added Russian (ru\_RU) Bank names provider [\#553](https://github.com/fzaninotto/Faker/pull/553) ([wizardjedi](https://github.com/wizardjedi))
|
|
||||||
* Added mobile phone function in French (fr\_FR) provider [\#552](https://github.com/fzaninotto/Faker/pull/552) ([kletellier](https://github.com/kletellier))
|
|
||||||
* Added phpdoc for new magic methods in Generator to help IntelliSense completion [\#550](https://github.com/fzaninotto/Faker/pull/550) ([stof](https://github.com/stof))
|
|
||||||
* Fixed File provider bug 'The first argument to copy() function cannot be a directory' [\#547](https://github.com/fzaninotto/Faker/pull/547) ([svrnm](https://github.com/svrnm))
|
|
||||||
* Added new Brazilian (pt\_BR) Providers [\#545](https://github.com/fzaninotto/Faker/pull/545) ([igorsantos07](https://github.com/igorsantos07))
|
|
||||||
* Fixed ability to seed the generator [\#543](https://github.com/fzaninotto/Faker/pull/543) ([schmengler](https://github.com/schmengler))
|
|
||||||
* Added streetAddress formatter to Russian (ru\_RU) provider [\#542](https://github.com/fzaninotto/Faker/pull/542) ([ZAYEC77](https://github.com/ZAYEC77))
|
|
||||||
* Fixed Internet provider warning "Could not create transliterator"* [\#541](https://github.com/fzaninotto/Faker/pull/541) ([fonsecas72](https://github.com/fonsecas72))
|
|
||||||
* Fixed Spanish for Argentina (es\_AR) Address provider [\#540](https://github.com/fzaninotto/Faker/pull/540) ([ivanmirson](https://github.com/ivanmirson))
|
|
||||||
* Fixed region names in French for Belgium (fr\_BE) address provider [\#536](https://github.com/fzaninotto/Faker/pull/536) ([miclf](https://github.com/miclf))
|
|
||||||
* Fixed broken Doctrine2 link in README [\#534](https://github.com/fzaninotto/Faker/pull/534) ([JonathanKryza](https://github.com/JonathanKryza))
|
|
||||||
* Added link to faker-context Behat extension in readme [\#532](https://github.com/fzaninotto/Faker/pull/532) ([denheck](https://github.com/denheck))
|
|
||||||
* Added PHP 7.0 nightly to Travis build targets [\#525](https://github.com/fzaninotto/Faker/pull/525) ([TomasVotruba](https://github.com/TomasVotruba))
|
|
||||||
* Added Dutch (nl\_NL) color names [\#523](https://github.com/fzaninotto/Faker/pull/523) ([belendel](https://github.com/belendel))
|
|
||||||
* Fixed Chinese (zh\_CN) Address provider (remove Taipei) [\#522](https://github.com/fzaninotto/Faker/pull/522) ([asika32764](https://github.com/asika32764))
|
|
||||||
* Fixed phonenumber formats in Dutch (nl\_NL) PhoneNumber provider [\#521](https://github.com/fzaninotto/Faker/pull/521) ([SpaceK33z](https://github.com/SpaceK33z))
|
|
||||||
* Fixed Russian (ru\_RU) Address provider [\#518](https://github.com/fzaninotto/Faker/pull/518) ([glagola](https://github.com/glagola))
|
|
||||||
* Added Italian (it\_IT) Text provider [\#517](https://github.com/fzaninotto/Faker/pull/517) ([endelwar](https://github.com/endelwar))
|
|
||||||
* Added Norwegian (no\_NO) locale [\#515](https://github.com/fzaninotto/Faker/pull/515) ([phaza](https://github.com/phaza))
|
|
||||||
* Added VAT number to Bulgarian (bg\_BG) Payment provider [\#512](https://github.com/fzaninotto/Faker/pull/512) ([ronanguilloux](https://github.com/ronanguilloux))
|
|
||||||
* Fixed UserAgent provider outdated user agents [\#511](https://github.com/fzaninotto/Faker/pull/511) ([ajbdev](https://github.com/ajbdev))
|
|
||||||
* Fixed `image()` formatter to make it work with temp dir of any (decent) OS [\#507](https://github.com/fzaninotto/Faker/pull/507) ([ronanguilloux](https://github.com/ronanguilloux))
|
|
||||||
* Added Persian (fa\_IR) locale [\#500](https://github.com/fzaninotto/Faker/pull/500) ([zoli](https://github.com/zoli))
|
|
||||||
* Added Currency Code formatter [\#497](https://github.com/fzaninotto/Faker/pull/497) ([stelgenhof](https://github.com/stelgenhof))
|
|
||||||
* Added VAT number to Belgium (be_BE) Payment provider [\#495](https://github.com/fzaninotto/Faker/pull/495) ([ronanguilloux](https://github.com/ronanguilloux))
|
|
||||||
* Fixed `imageUrl` formatter bug where it would always return the same image [\#494](https://github.com/fzaninotto/Faker/pull/494) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
* Added more Indonesian (id\_ID) providers [\#493](https://github.com/fzaninotto/Faker/pull/493) ([deerawan](https://github.com/deerawan))
|
|
||||||
* Added Indonesian (id\_ID) locale [\#492](https://github.com/fzaninotto/Faker/pull/492) ([stoutZero](https://github.com/stoutZero))
|
|
||||||
* Fixed unique generator performance [\#491](https://github.com/fzaninotto/Faker/pull/491) ([ikwattro](https://github.com/ikwattro))
|
|
||||||
* Added transliterator to `email` and `username` [\#490](https://github.com/fzaninotto/Faker/pull/490) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
* Added Hungarian (hu\_HU) Text provider [\#486](https://github.com/fzaninotto/Faker/pull/486) ([lintaba](https://github.com/lintaba))
|
|
||||||
* Fixed CakePHP Entity Popolator (some cases where no entities prev. inserted) [\#483](https://github.com/fzaninotto/Faker/pull/483) ([jadb](https://github.com/jadb))
|
|
||||||
* Added Color and DateTime Turkish (tr\_TR) Providers [\#481](https://github.com/fzaninotto/Faker/pull/481) ([behramcelen](https://github.com/behramcelen))
|
|
||||||
* Added Latvian (lv\_LV) `personalIdentityNumber` formatter [\#472](https://github.com/fzaninotto/Faker/pull/472) ([MatissJanis](https://github.com/MatissJanis))
|
|
||||||
* Added VAT number to Austrian (at_AT) Payment provider [\#470](https://github.com/fzaninotto/Faker/pull/470) ([ronanguilloux](https://github.com/ronanguilloux))
|
|
||||||
* Fixed missing @return phpDoc in Payment provider [\#469](https://github.com/fzaninotto/Faker/pull/469) ([ronanguilloux](https://github.com/ronanguilloux))
|
|
||||||
* Added SWIFT/BIC payment type formatter to the Payment provider [\#465](https://github.com/fzaninotto/Faker/pull/465) ([ronanguilloux](https://github.com/ronanguilloux))
|
|
||||||
* Fixed small typo in Base provider exception [\#460](https://github.com/fzaninotto/Faker/pull/460) ([miclf](https://github.com/miclf))
|
|
||||||
* Added Georgian (ka\_Ge) locale [\#457](https://github.com/fzaninotto/Faker/pull/457) ([lperto](https://github.com/lperto))
|
|
||||||
* Added PSR-4 Autoloading [\#455](https://github.com/fzaninotto/Faker/pull/455) ([GrahamCampbell](https://github.com/GrahamCampbell))
|
|
||||||
* Added Uganda (en_UG) locale [\#454](https://github.com/fzaninotto/Faker/pull/454) ([tharoldD](https://github.com/tharoldD))
|
|
||||||
* Added `regexify` formatter, generating a random string based on a regular expression [\#453](https://github.com/fzaninotto/Faker/pull/453) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
* Added shuffle formatter, to shuffle an array or a string [\#452](https://github.com/fzaninotto/Faker/pull/452) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
* Added ISBN-10 & ISBN-13 codes formatters to Barcode provider [\#451](https://github.com/fzaninotto/Faker/pull/451) ([gietos](https://github.com/gietos))
|
|
||||||
* Fixed Russian (ru\_RU) middle names (different for different genders) [\#450](https://github.com/fzaninotto/Faker/pull/450) ([gietos](https://github.com/gietos))
|
|
||||||
* Fixed Ukranian (uk\_UA) Person provider [\#448](https://github.com/fzaninotto/Faker/pull/448) ([aivus](https://github.com/aivus))
|
|
||||||
* Added Vietnamese (vi\_VN) locale [\#447](https://github.com/fzaninotto/Faker/pull/447) ([huy95](https://github.com/huy95))
|
|
||||||
* Added type hint to the Documentor constructor [\#446](https://github.com/fzaninotto/Faker/pull/446) ([JeroenDeDauw](https://github.com/JeroenDeDauw))
|
|
||||||
* Fixed Russian (ru\_RU) Person provider (joined names) [\#445](https://github.com/fzaninotto/Faker/pull/445) ([aivus](https://github.com/aivus))
|
|
||||||
* Added English (en\_GB) `mobileNumber` methods [\#438](https://github.com/fzaninotto/Faker/pull/438) ([daveblake](https://github.com/daveblake))
|
|
||||||
* Added Traditional Chinese (zh\_TW) Realtext provider [\#434](https://github.com/fzaninotto/Faker/pull/434) ([tzhuan](https://github.com/tzhuan))
|
|
||||||
* Fixed first name in Spanish for Argentina (es\_AR) Person provider [\#433](https://github.com/fzaninotto/Faker/pull/433) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
* Fixed Canadian (en_CA) state abbreviation for Nunavut [\#430](https://github.com/fzaninotto/Faker/pull/430) ([julien-c](https://github.com/julien-c))
|
|
||||||
* Added CakePHP ORM entity populator [\#428](https://github.com/fzaninotto/Faker/pull/428) ([jadb](https://github.com/jadb))
|
|
||||||
* Added Traditional Chinese (zh\_TW) locale [\#427](https://github.com/fzaninotto/Faker/pull/427) ([tzhuan](https://github.com/tzhuan))
|
|
||||||
* Fixed typo in Doctrine Populator phpDoc [\#425](https://github.com/fzaninotto/Faker/pull/425) ([ihsanudin](https://github.com/ihsanudin))
|
|
||||||
* Added Chinese (zh_CN) Internet provider [\#424](https://github.com/fzaninotto/Faker/pull/424) ([Lisso-Me](https://github.com/Lisso-Me))
|
|
||||||
* Added Country ISO 3166-1 alpha-3 code to the Miscellaneous provider[\#422](https://github.com/fzaninotto/Faker/pull/422) ([gido](https://github.com/gido))
|
|
||||||
* Added English (en\_GB) Person provider [\#421](https://github.com/fzaninotto/Faker/pull/421) ([AlexCutts](https://github.com/AlexCutts))
|
|
||||||
* Added missing tests for the Color Provider [\#420](https://github.com/fzaninotto/Faker/pull/420) ([bessl](https://github.com/bessl))
|
|
||||||
* Added Nepali (ne\_NP) locale [\#419](https://github.com/fzaninotto/Faker/pull/419) ([ankitpokhrel](https://github.com/ankitpokhrel))
|
|
||||||
* Fixed latitude and longitude formatters bug (numeric value out of range for 32bits) [\#416](https://github.com/fzaninotto/Faker/pull/416) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
* Added a dedicated calculator Luhn calculator service [\#414](https://github.com/fzaninotto/Faker/pull/414) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
* Fixed Russian (ru_RU) Person provider (removed lowercase duplications) [\#413](https://github.com/fzaninotto/Faker/pull/413) ([Ragazzo](https://github.com/Ragazzo))
|
|
||||||
* Fixed barcode formatter (improved speed, added tests) [\#412](https://github.com/fzaninotto/Faker/pull/412) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
* Added ipv4 and barcode formatters tests [\#410](https://github.com/fzaninotto/Faker/pull/410) ([bessl](https://github.com/bessl))
|
|
||||||
* Fixed typos in various comments blocks [\#409](https://github.com/fzaninotto/Faker/pull/409) ([bessl](https://github.com/bessl))
|
|
||||||
* Fixed InternetTest (replaced regex with PHP filter) [\#406](https://github.com/fzaninotto/Faker/pull/406) ([bessl](https://github.com/bessl))
|
|
||||||
* Added password formatter to the Internet provider[\#402](https://github.com/fzaninotto/Faker/pull/402) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
* Added Company and Internet Austrian (de\_AT) Providers [\#400](https://github.com/fzaninotto/Faker/pull/400) ([bessl](https://github.com/bessl))
|
|
||||||
* Added third-party libraries section in README [\#399](https://github.com/fzaninotto/Faker/pull/399) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
* Added Spanish for Venezuela (es\_VE) locale [\#398](https://github.com/fzaninotto/Faker/pull/398) ([DIOHz0r](https://github.com/DIOHz0r))
|
|
||||||
* Added PhoneNumber Autrian (de\_AT) Provider, and missing test for the 'locale' method. [\#395](https://github.com/fzaninotto/Faker/pull/395) ([bessl](https://github.com/bessl))
|
|
||||||
* Removed wrongly localized Lorem provider [\#394](https://github.com/fzaninotto/Faker/pull/394) ([fzaninotto](https://github.com/fzaninotto))
|
|
||||||
* Fixed Miscellaneous provider (made the `locale` formatter static) [\#390](https://github.com/fzaninotto/Faker/pull/390) ([bessl](https://github.com/bessl))
|
|
||||||
* Added a unit test file for the Miscellaneous Provider [\#389](https://github.com/fzaninotto/Faker/pull/389) ([bessl](https://github.com/bessl))
|
|
||||||
* Added warning in README about using `rand()`` and the seed functions [\#386](https://github.com/fzaninotto/Faker/pull/386) ([paulvalla](https://github.com/paulvalla))
|
|
||||||
* Fixed French (fr\_FR) Person provider (Uppercased a first name) [\#385](https://github.com/fzaninotto/Faker/pull/385) ([netcarver](https://github.com/netcarver))
|
|
||||||
* Added Russian (ru\_RU) and Ukrainian (uk\_UA) Text providers [\#383](https://github.com/fzaninotto/Faker/pull/383) ([terion-name](https://github.com/terion-name))
|
|
||||||
* Added more street prefixes to French (fr\_FR) Address provider [\#381](https://github.com/fzaninotto/Faker/pull/381) ([ronanguilloux](https://github.com/ronanguilloux))
|
|
||||||
* Added PHP 5.6 to CI targets [\#378](https://github.com/fzaninotto/Faker/pull/378) ([GrahamCampbell](https://github.com/GrahamCampbell))
|
|
||||||
* Fixed spaces remaining at the end of liine in various files [\#377](https://github.com/fzaninotto/Faker/pull/377) ([GrahamCampbell](https://github.com/GrahamCampbell))
|
|
||||||
* Fixed UserAgent provider (added space before processor on linux platform) [\#374](https://github.com/fzaninotto/Faker/pull/374) ([TomK](https://github.com/TomK))
|
|
||||||
* Added Company generator for Russian (ru\_RU) locale [\#371](https://github.com/fzaninotto/Faker/pull/371) ([kix](https://github.com/kix))
|
|
||||||
* Fixed Russian (ru\_RU) Color provider (uppercase letters) [\#370](https://github.com/fzaninotto/Faker/pull/370) ([semanser](https://github.com/semanser))
|
|
||||||
* Added more Polish (pl\_PL) phone numbers [\#369](https://github.com/fzaninotto/Faker/pull/369) ([piotrantosik](https://github.com/piotrantosik))
|
|
||||||
* Fixed Ruby Faker link in readme [\#368](https://github.com/fzaninotto/Faker/pull/368) ([philsturgeon](https://github.com/philsturgeon))
|
|
||||||
* Added more Japanese (ja\_JP) names in Person provider [\#366](https://github.com/fzaninotto/Faker/pull/366) ([kumamidori](https://github.com/kumamidori))
|
|
||||||
* Added Slovenian (sl\_SL) locale [\#363](https://github.com/fzaninotto/Faker/pull/363) ([alesf](https://github.com/alesf))
|
|
||||||
* Fixed German (de\_DE) Person provider (first names) [\#362](https://github.com/fzaninotto/Faker/pull/362) ([mikehaertl](https://github.com/mikehaertl))
|
|
||||||
* Fixed Ukrainian (uk\_UA) Person providr (there is no such letter "ы" in Ukrainian) [\#359](https://github.com/fzaninotto/Faker/pull/359) ([nazar-pc](https://github.com/nazar-pc))
|
|
||||||
* Fixed Chinese (zh\_CN) PhoneNumber provider (the length of mobile phone number is 11) [\#358](https://github.com/fzaninotto/Faker/pull/358) ([byan](https://github.com/byan))
|
|
||||||
* Added Arabic (ar_\JO) Locale [\#357](https://github.com/fzaninotto/Faker/pull/357) ([zrashwani](https://github.com/zrashwani))
|
|
||||||
* Fixed Czech (cs\_CZ) Person provider (missing lowercase in last name) [\#355](https://github.com/fzaninotto/Faker/pull/355) ([halaxa](https://github.com/halaxa))
|
|
||||||
* Fixed French for Belgium (fr\_BE) Address Provider (doubled city names) [\#354](https://github.com/fzaninotto/Faker/pull/354) ([miclf](https://github.com/miclf))
|
|
||||||
* Added Biased Integer Provider [\#332](https://github.com/fzaninotto/Faker/pull/332) ([TimWolla](https://github.com/TimWolla))
|
|
||||||
* Added Swedish (sv\_SE) locale [\#316](https://github.com/fzaninotto/Faker/pull/316) ([ulrikjohansson](https://github.com/ulrikjohansson))
|
|
||||||
* Added English for New Zealand (en\_NZ) locale [\#283](https://github.com/fzaninotto/Faker/pull/283) ([JasonMortonNZ](https://github.com/JasonMortonNZ))
|
|
||||||
* Added mention of external Provider for cron expressions to readme[\#498](https://github.com/fzaninotto/Faker/pull/498) ([swekaj](https://github.com/swekaj))
|
|
||||||
|
|
||||||
## 2014-06-04, v1.4.0
|
|
||||||
|
|
||||||
* Fixed typo in Slovak person names (cinan)
|
|
||||||
* Added tests for uk_UA providers (serge-kuharev)
|
|
||||||
* Fixed numerify() performance by making it 30% faster (fzaninotto)
|
|
||||||
* Added strict option to randomNumber to force number of digits (fzaninotto)
|
|
||||||
* Fixed randomNumber usage duplicating numberBetween (fzaninotto)
|
|
||||||
* Fixed address provider for latvian language (MatissJA)
|
|
||||||
* Added Czech Republic (cs_CZ) address, company, datetime and text providers (Mikulas)
|
|
||||||
* Fixed da_DK Person provider data containing an 'unnamed' person (tolnem)
|
|
||||||
* Added slug provider (fzaninotto)
|
|
||||||
* Fixed IDE insights for new local IP and MAC address providers (hugofonseca)
|
|
||||||
* Added firstname gender method to all Person providers (csanquer)
|
|
||||||
* Fixed tr_TR email service, city name, person, and phone number formats (ogunkarakus)
|
|
||||||
* Fixed US_en state list (fzaninotto)
|
|
||||||
* Fixed en_US address provider so state abbr are ISO 3166 codes (Garbee)
|
|
||||||
* Added local IP and MAC address providers (kielabokkie)
|
|
||||||
* Fixed typo in century list affecting the century provider (fzaninotto)
|
|
||||||
* Added default value to optional modifier (joshuajabbour)
|
|
||||||
* Fixed Portuguese phonenumbers have 9 digits (hugofonseca)
|
|
||||||
* Added fileCopy to File provider to simulate file upload (stefanosala)
|
|
||||||
* Added pt_PT providers (hugofonseca)
|
|
||||||
* Fixed dead code in text provider (hugofonseca)
|
|
||||||
* Fixed IDE insights for magic properties (hugofonseca)
|
|
||||||
* Added tin (NIF) generator for pt_PT provider (hugofonseca)
|
|
||||||
* Fixed numberBetween max default value handling (fzaninotto)
|
|
||||||
* Added pt_PT phone number provider (hugofonseca)
|
|
||||||
* Fixed PSR-2 standards and add make task to force it on Travis (terite)
|
|
||||||
* Added new ro_RO Personal Numerical Code (CNP) and phone number providers (avataru)
|
|
||||||
* Fixed Internet provider for sk_SK locale (cinan)
|
|
||||||
* Fixed typo in en_ZA Internet provider (bjorntheart)
|
|
||||||
* Fixed phpdoc for DateTime magic methods (stof)
|
|
||||||
* Added doc about seeding with maximum timestamp using dateTime formatters (fzaninotto)
|
|
||||||
* Added Maximum Timestamp option to get always same unix timestamp when using a fixed seed (csanquer)
|
|
||||||
* Added Montenegrian (me_ME) providers (ognjenm)
|
|
||||||
* Added ean barcode provider (nineinchnick)
|
|
||||||
* Added fullPath parameter to Image provider (stefanosala)
|
|
||||||
* Added more Polish company formats (nineinchnick)
|
|
||||||
* Added Polish realText provider (nineinchnick)
|
|
||||||
* Fixed remaining non-seedable random generators (terite)
|
|
||||||
* Added randomElements provider (terite)
|
|
||||||
* Added French realText provider (fzaninotto)
|
|
||||||
* Fixed realText provider bootstrap slowness (fzaninotto)
|
|
||||||
* Added realText provider for English and German, based on Markov Chains Generator (TimWolla)
|
|
||||||
* Fixed address format in nl_NL provider (doenietzomoeilijk)
|
|
||||||
* Fixed potentially offensive word from last name list (joshuajabbour)
|
|
||||||
* Fixed reamde documentation about the optional modifier (cryode)
|
|
||||||
* Fixed Image provider and documentor routine (fzaninotto)
|
|
||||||
* Fixed IDE insights for methods (PedroTroller)
|
|
||||||
* Fixed missing data in en_US Address provider (Garbee)
|
|
||||||
* Added Bengali (bn_BD) providers (masnun)
|
|
||||||
* Fixed warning on test file when short tags are on (bateller)
|
|
||||||
* Fixed Doctrine populator undefined index warning (dbojdo)
|
|
||||||
* Added French Canadian (fr_CA) Address and Person providers (marcaube)
|
|
||||||
* Fixed typo in NullGenerator (mhanson01)
|
|
||||||
* Fixed Doctrine populator issue with one-to-one nullable relationship (jpetitcolas)
|
|
||||||
* Added Canadian English (en_CA) address and phone number providers (cviebrock)
|
|
||||||
* Fixed duplicated Payment example in readme (Garbee)
|
|
||||||
* Fixed Polish (pl_PL) Person provider data (czogori)
|
|
||||||
* Added Hungarian (hu_HU) providers (sagikazarmark)
|
|
||||||
* Added 'kana' (ja_JP) name formatters (kzykhys)
|
|
||||||
* Added allow_failure for hhvm to travis-ci and test against php 5.5 (toin0u)
|
|
||||||
|
|
||||||
## 2013-12-16, v1.3.0
|
|
||||||
|
|
||||||
* Fixed state generator in Australian (en_AU) provider (sebklaus)
|
|
||||||
* Fixed IDE insights for locale specific providers (ulrikjohansson)
|
|
||||||
* Added English (South Africa) (en_ZA) person, address, Internet and phone number providers (dmfaux)
|
|
||||||
* Fixed integer values overflowing on signed INTEGER columns on Doctrine populator (Thinkscape)
|
|
||||||
* Fixed spelling error in French (fr_FR) address provider (leihog)
|
|
||||||
* Added improvements based on SensioLabsInsights analysis
|
|
||||||
* Fixed Italian (it_IT) email provider (garak)
|
|
||||||
* Added Spanish (es_ES) Internet provider (eusonlito)
|
|
||||||
* Added English Philippines (en_PH) address provider (kamote)
|
|
||||||
* Added Brazilian (pt_BR) email provider data (KennedyTedesco)
|
|
||||||
* Fixed UK country code (pgscandeias)
|
|
||||||
* Added Peruvian (es_PE) person, address, phone number, and company providers (cslucano)
|
|
||||||
* Added Ukrainian (uk_UA) color provider (ruden)
|
|
||||||
* Fixed Ukrainian (uk_UA) namespace and email translitteration (ruden)
|
|
||||||
* Added Romanian (Moldova) (ro_MD) person, address, and phone number providers (AlexanderC)
|
|
||||||
* Added IBAN generator for every currently known locale that uses it (nineinchnick)
|
|
||||||
* Added Image generation powered by LoremPixel (weotch)
|
|
||||||
* Fixed missing timezone with dateTimeBetween (baldurrensch)
|
|
||||||
* Fixed call to undefined method cardType in Payment (WMeldon)
|
|
||||||
* Added Romanian (ro_RO) address and person providers (calina-c)
|
|
||||||
* Fixed Doctrine populator to use ObjectManager instead of EntityManagerInterface (mgiustiniani)
|
|
||||||
* Fixed docblock for Provider\Base::unique() (pschultz)
|
|
||||||
* Added Payment providers (creditCardType, creditCardNumber, creditCardExpirationDate, creditCardExpirationDateString) (pomaxa)
|
|
||||||
* Added unique() modifier
|
|
||||||
* Added IDE insights to allow better intellisense/phpStorm autocompletion (thallisphp)
|
|
||||||
* Added Polish (pl_PL) address provider, personal identity number and pesel number generator (nineinchnick)
|
|
||||||
* Added Turkish (tr_TR) address provider, and improved internet provider (hasandz)
|
|
||||||
* Fixed Propel column number guesser to use signed range of values (gunnarlium)
|
|
||||||
* Added Greek (el_GR) person, address, and phone number providers (georgeharito)
|
|
||||||
* Added Austrian (en_AU) address, Internet, and phone number providers (rcuddy)
|
|
||||||
* Fixed phpDoc in Doctrine Entity populator (rogamoore)
|
|
||||||
* Added French (fr_FR) phone number formats (vchabot)
|
|
||||||
* Added optional() modifier (weotch)
|
|
||||||
* Fixed typo in the Person provider documentation (jtreminio)
|
|
||||||
* Fixed Russian (ru_RU) person format (alexshadow007)
|
|
||||||
* Added Japanese (ja_JP) person, address, Internet, phone number, and company providers (kumamidori)
|
|
||||||
* Added color providers, driver license and passport number formats for the ru_RU locale (pomaxa)
|
|
||||||
* Added Latvian (lv_LV) person, address, Internet, and phone number providers (pomaxa)
|
|
||||||
* Added Brazilian (pt_BR) Internet provider (vjnrv)
|
|
||||||
* Added more Czech (cs_CZ) lastnames (petrkle)
|
|
||||||
* Added Chinese Simplified (zh_CN) person, address, Internet, and phone number providers (tlikai)
|
|
||||||
* Fixed Typos (pborelli)
|
|
||||||
* Added Color provider with hexColor, rgbColor, rgbColorAsArray, rgbCssColor, safeColorName, and colorName formatters (lsv)
|
|
||||||
* Added support for associative arrays in `randomElement` (aRn0D)
|
|
||||||
|
|
||||||
## 2013-06-09, v1.2.0
|
|
||||||
|
|
||||||
* Added new provider for fr_BE locale (jflefebvre)
|
|
||||||
* Updated locale provider to use a static locale list (spawn-guy)
|
|
||||||
* Fixed invalid UTF-8 sequence in domain provider with the Bulgarian provider (Dynom)
|
|
||||||
* Fixed the nl_NL Person provider (Dynom)
|
|
||||||
* Removed all requires and added the autoload definition to composer (Dynom)
|
|
||||||
* Fixed encoding problems in nl_NL Address provider (Dynom)
|
|
||||||
* Added icelandic provider (is_IS) (birkir)
|
|
||||||
* Added en_CA address and phone numbers (cviebrock)
|
|
||||||
* Updated safeEmail provider to be really safe (TimWolla)
|
|
||||||
* Documented alternative randomNumber usage (Seldaek)
|
|
||||||
* Added basic file provider (anroots)
|
|
||||||
* Fixed use of fourth argument on Doctrine addEntity (ecentinela)
|
|
||||||
* Added nl_BE provider (wimvds)
|
|
||||||
* Added Random Float provider (csanquer)
|
|
||||||
* Fixed bug in Faker\ORM\Doctrine\Populator (mmf-amarcos)
|
|
||||||
* Updated ru_RU provider (rmrevin)
|
|
||||||
* Added safe email domain provider (csanquer)
|
|
||||||
* Fixed latitude provider (rumpl)
|
|
||||||
* Fixed unpredictability of fake data generated by Faker\Provider\Base::numberBetween() (goatherd)
|
|
||||||
* Added uuid provider (goatherd)
|
|
||||||
* Added possibility to call methods on Doctrine entities, possibility to generate unique id (nenadalm)
|
|
||||||
* Fixed prefixes typos in 'pl_PL' Person provider (krymen)
|
|
||||||
* Added more fake data to the Ukraininan providers (lysenkobv)
|
|
||||||
* Added more fake data to the Italian providers (EmanueleMinotto)
|
|
||||||
* Fixed spaces appearing in generated emails (alchy58)
|
|
||||||
* Added Armenian (hy_AM) provider (artash)
|
|
||||||
* Added Generation of valid SIREN & SIRET codes to French providers (alexsegura)
|
|
||||||
* Added Dutch (nl_NL) provider (WouterJ)
|
|
||||||
* Fixed missing typehint in Base::__construct() (benja-M-1)
|
|
||||||
* Fixed typo in README (benja-M-1)
|
|
||||||
* Added Ukrainian (ua_UA) provider (rsvasilyev)
|
|
||||||
* Added Turkish (tr_TR) Provider (faridmovsumov)
|
|
||||||
* Fixed executable bit in some PHP files (siwinski)
|
|
||||||
* Added Brazilian Portuguese (pt_BR) provider (oliveiraev)
|
|
||||||
* Added Spanish (es_ES) provider (ivannis)
|
|
||||||
* Fixed Doctrine populator to allow for the population of entity data that has associations to other entities (afishnamedsquish)
|
|
||||||
* Added Danish (da_DK) providers (toin0u)
|
|
||||||
* Cleaned up whitespaces (toin0u)
|
|
||||||
* Fixed utf-8 bug with lowercase generators (toin0u)
|
|
||||||
* Fixed composer.json (Seldaek)
|
|
||||||
* Fixed bug in Doctrine EntityPopulator (beberlei)
|
|
||||||
* Added Finnish (fi_FI) provider (drodil)
|
|
||||||
|
|
||||||
## 2012-10-29, v1.1.0
|
|
||||||
|
|
||||||
* Updated text provider to return paragraphs as a string instead of array. Great for populating markdown textarea fields (Seldaek)
|
|
||||||
* Updated dateTimeBetween to accept DateTime instances (Seldaek)
|
|
||||||
* Added random number generator between a and b, simply like rand() (Seldaek)
|
|
||||||
* Fixed spaces in generated emails (blaugueux)
|
|
||||||
* Fixed Person provider in Russian locale (Isamashii)
|
|
||||||
* Added new UserAgent provider (blaugueux)
|
|
||||||
* Added locale generator to Miscellaneous provider (blaugueux)
|
|
||||||
* Added timezone generator to DateTime provider (blaugueux)
|
|
||||||
* Added new generators to French Address providers (departments, regions) (geoffrey-brier)
|
|
||||||
* Added new generators to French Company provider (catch phrase, SIREN, and SIRET numbers) (geoffrey-brier)
|
|
||||||
* Added state generator to German Address provider (Powerhamster)
|
|
||||||
* Added Slovak provider (bazo)
|
|
||||||
* Added latitude and longitude formatters to Address provider (fixe)
|
|
||||||
* Added Serbian provider (umpirsky)
|
|
||||||
|
|
||||||
## 2012-07-10, v1.0.0
|
|
||||||
|
|
||||||
* Initial Version
|
|
||||||
22
pfosten/vendor/fzaninotto/faker/LICENSE
vendored
22
pfosten/vendor/fzaninotto/faker/LICENSE
vendored
|
|
@ -1,22 +0,0 @@
|
||||||
Copyright (c) 2011 François Zaninotto
|
|
||||||
Portions Copyright (c) 2008 Caius Durling
|
|
||||||
Portions Copyright (c) 2008 Adam Royle
|
|
||||||
Portions Copyright (c) 2008 Fiona Burrows
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
42
pfosten/vendor/fzaninotto/faker/composer.json
vendored
42
pfosten/vendor/fzaninotto/faker/composer.json
vendored
|
|
@ -1,42 +0,0 @@
|
||||||
{
|
|
||||||
"name": "fzaninotto/faker",
|
|
||||||
"type": "library",
|
|
||||||
"description": "Faker is a PHP library that generates fake data for you.",
|
|
||||||
"keywords": [
|
|
||||||
"faker",
|
|
||||||
"fixtures",
|
|
||||||
"data"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "François Zaninotto"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"require": {
|
|
||||||
"php": "^5.3.3 || ^7.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"ext-intl": "*",
|
|
||||||
"phpunit/phpunit": "^4.8.35 || ^5.7",
|
|
||||||
"squizlabs/php_codesniffer": "^2.9.2"
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Faker\\": "src/Faker/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload-dev": {
|
|
||||||
"psr-4": {
|
|
||||||
"Faker\\Test\\": "test/Faker/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.9-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"config": {
|
|
||||||
"sort-packages": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
1798
pfosten/vendor/fzaninotto/faker/readme.md
vendored
1798
pfosten/vendor/fzaninotto/faker/readme.md
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -1,73 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Calculator;
|
|
||||||
|
|
||||||
class Iban
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Generates IBAN Checksum
|
|
||||||
*
|
|
||||||
* @param string $iban
|
|
||||||
* @return string Checksum (numeric string)
|
|
||||||
*/
|
|
||||||
public static function checksum($iban)
|
|
||||||
{
|
|
||||||
// Move first four digits to end and set checksum to '00'
|
|
||||||
$checkString = substr($iban, 4) . substr($iban, 0, 2) . '00';
|
|
||||||
|
|
||||||
// Replace all letters with their number equivalents
|
|
||||||
$checkString = preg_replace_callback('/[A-Z]/', array('self','alphaToNumberCallback'), $checkString);
|
|
||||||
|
|
||||||
// Perform mod 97 and subtract from 98
|
|
||||||
$checksum = 98 - self::mod97($checkString);
|
|
||||||
|
|
||||||
return str_pad($checksum, 2, '0', STR_PAD_LEFT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $match
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
private static function alphaToNumberCallback($match)
|
|
||||||
{
|
|
||||||
return self::alphaToNumber($match[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts letter to number
|
|
||||||
*
|
|
||||||
* @param string $char
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public static function alphaToNumber($char)
|
|
||||||
{
|
|
||||||
return ord($char) - 55;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calculates mod97 on a numeric string
|
|
||||||
*
|
|
||||||
* @param string $number Numeric string
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public static function mod97($number)
|
|
||||||
{
|
|
||||||
$checksum = (int)$number[0];
|
|
||||||
for ($i = 1, $size = strlen($number); $i < $size; $i++) {
|
|
||||||
$checksum = (10 * $checksum + (int) $number[$i]) % 97;
|
|
||||||
}
|
|
||||||
return $checksum;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks whether an IBAN has a valid checksum
|
|
||||||
*
|
|
||||||
* @param string $iban
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public static function isValid($iban)
|
|
||||||
{
|
|
||||||
return self::checksum($iban) === substr($iban, 2, 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Calculator;
|
|
||||||
|
|
||||||
use InvalidArgumentException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Utility class for generating and validating Luhn numbers.
|
|
||||||
*
|
|
||||||
* Luhn algorithm is used to validate credit card numbers, IMEI numbers, and
|
|
||||||
* National Provider Identifier numbers.
|
|
||||||
*
|
|
||||||
* @see http://en.wikipedia.org/wiki/Luhn_algorithm
|
|
||||||
*/
|
|
||||||
class Luhn
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param string $number
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
private static function checksum($number)
|
|
||||||
{
|
|
||||||
$number = (string) $number;
|
|
||||||
$length = strlen($number);
|
|
||||||
$sum = 0;
|
|
||||||
for ($i = $length - 1; $i >= 0; $i -= 2) {
|
|
||||||
$sum += $number[$i];
|
|
||||||
}
|
|
||||||
for ($i = $length - 2; $i >= 0; $i -= 2) {
|
|
||||||
$sum += array_sum(str_split($number[$i] * 2));
|
|
||||||
}
|
|
||||||
|
|
||||||
return $sum % 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $partialNumber
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function computeCheckDigit($partialNumber)
|
|
||||||
{
|
|
||||||
$checkDigit = self::checksum($partialNumber . '0');
|
|
||||||
if ($checkDigit === 0) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (string) (10 - $checkDigit);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks whether a number (partial number + check digit) is Luhn compliant
|
|
||||||
*
|
|
||||||
* @param string $number
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public static function isValid($number)
|
|
||||||
{
|
|
||||||
return self::checksum($number) === 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a Luhn compliant number.
|
|
||||||
*
|
|
||||||
* @param string $partialValue
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function generateLuhnNumber($partialValue)
|
|
||||||
{
|
|
||||||
if (!preg_match('/^\d+$/', $partialValue)) {
|
|
||||||
throw new InvalidArgumentException('Argument should be an integer.');
|
|
||||||
}
|
|
||||||
return $partialValue . Luhn::computeCheckDigit($partialValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This generator returns a default value for all called properties
|
|
||||||
* and methods. It works with Faker\Generator\Base->optional().
|
|
||||||
*/
|
|
||||||
class DefaultGenerator
|
|
||||||
{
|
|
||||||
protected $default;
|
|
||||||
|
|
||||||
public function __construct($default = null)
|
|
||||||
{
|
|
||||||
$this->default = $default;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $attribute
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function __get($attribute)
|
|
||||||
{
|
|
||||||
return $this->default;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $method
|
|
||||||
* @param array $attributes
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function __call($method, $attributes)
|
|
||||||
{
|
|
||||||
return $this->default;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker;
|
|
||||||
|
|
||||||
class Documentor
|
|
||||||
{
|
|
||||||
protected $generator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Generator $generator
|
|
||||||
*/
|
|
||||||
public function __construct(Generator $generator)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getFormatters()
|
|
||||||
{
|
|
||||||
$formatters = array();
|
|
||||||
$providers = array_reverse($this->generator->getProviders());
|
|
||||||
$providers[]= new Provider\Base($this->generator);
|
|
||||||
foreach ($providers as $provider) {
|
|
||||||
$providerClass = get_class($provider);
|
|
||||||
$formatters[$providerClass] = array();
|
|
||||||
$refl = new \ReflectionObject($provider);
|
|
||||||
foreach ($refl->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflmethod) {
|
|
||||||
if ($reflmethod->getDeclaringClass()->getName() == 'Faker\Provider\Base' && $providerClass != 'Faker\Provider\Base') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$methodName = $reflmethod->name;
|
|
||||||
if ($reflmethod->isConstructor()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$parameters = array();
|
|
||||||
foreach ($reflmethod->getParameters() as $reflparameter) {
|
|
||||||
$parameter = '$'. $reflparameter->getName();
|
|
||||||
if ($reflparameter->isDefaultValueAvailable()) {
|
|
||||||
$parameter .= ' = ' . var_export($reflparameter->getDefaultValue(), true);
|
|
||||||
}
|
|
||||||
$parameters []= $parameter;
|
|
||||||
}
|
|
||||||
$parameters = $parameters ? '('. join(', ', $parameters) . ')' : '';
|
|
||||||
try {
|
|
||||||
$example = $this->generator->format($methodName);
|
|
||||||
} catch (\InvalidArgumentException $e) {
|
|
||||||
$example = '';
|
|
||||||
}
|
|
||||||
if (is_array($example)) {
|
|
||||||
$example = "array('". join("', '", $example) . "')";
|
|
||||||
} elseif ($example instanceof \DateTime) {
|
|
||||||
$example = "DateTime('" . $example->format('Y-m-d H:i:s') . "')";
|
|
||||||
} elseif ($example instanceof Generator || $example instanceof UniqueGenerator) { // modifier
|
|
||||||
$example = '';
|
|
||||||
} else {
|
|
||||||
$example = var_export($example, true);
|
|
||||||
}
|
|
||||||
$formatters[$providerClass][$methodName . $parameters] = $example;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $formatters;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker;
|
|
||||||
|
|
||||||
class Factory
|
|
||||||
{
|
|
||||||
const DEFAULT_LOCALE = 'en_US';
|
|
||||||
|
|
||||||
protected static $defaultProviders = array('Address', 'Barcode', 'Biased', 'Color', 'Company', 'DateTime', 'File', 'HtmlLorem', 'Image', 'Internet', 'Lorem', 'Miscellaneous', 'Payment', 'Person', 'PhoneNumber', 'Text', 'UserAgent', 'Uuid');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new generator
|
|
||||||
*
|
|
||||||
* @param string $locale
|
|
||||||
* @return Generator
|
|
||||||
*/
|
|
||||||
public static function create($locale = self::DEFAULT_LOCALE)
|
|
||||||
{
|
|
||||||
$generator = new Generator();
|
|
||||||
foreach (static::$defaultProviders as $provider) {
|
|
||||||
$providerClassName = self::getProviderClassname($provider, $locale);
|
|
||||||
$generator->addProvider(new $providerClassName($generator));
|
|
||||||
}
|
|
||||||
|
|
||||||
return $generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $provider
|
|
||||||
* @param string $locale
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected static function getProviderClassname($provider, $locale = '')
|
|
||||||
{
|
|
||||||
if ($providerClass = self::findProviderClassname($provider, $locale)) {
|
|
||||||
return $providerClass;
|
|
||||||
}
|
|
||||||
// fallback to default locale
|
|
||||||
if ($providerClass = self::findProviderClassname($provider, static::DEFAULT_LOCALE)) {
|
|
||||||
return $providerClass;
|
|
||||||
}
|
|
||||||
// fallback to no locale
|
|
||||||
if ($providerClass = self::findProviderClassname($provider)) {
|
|
||||||
return $providerClass;
|
|
||||||
}
|
|
||||||
throw new \InvalidArgumentException(sprintf('Unable to find provider "%s" with locale "%s"', $provider, $locale));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $provider
|
|
||||||
* @param string $locale
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected static function findProviderClassname($provider, $locale = '')
|
|
||||||
{
|
|
||||||
$providerClass = 'Faker\\' . ($locale ? sprintf('Provider\%s\%s', $locale, $provider) : sprintf('Provider\%s', $provider));
|
|
||||||
if (class_exists($providerClass, true)) {
|
|
||||||
return $providerClass;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,292 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @property string $name
|
|
||||||
* @method string name(string $gender = null)
|
|
||||||
* @property string $firstName
|
|
||||||
* @method string firstName(string $gender = null)
|
|
||||||
* @property string $firstNameMale
|
|
||||||
* @property string $firstNameFemale
|
|
||||||
* @property string $lastName
|
|
||||||
* @property string $title
|
|
||||||
* @method string title(string $gender = null)
|
|
||||||
* @property string $titleMale
|
|
||||||
* @property string $titleFemale
|
|
||||||
*
|
|
||||||
* @property string $citySuffix
|
|
||||||
* @property string $streetSuffix
|
|
||||||
* @property string $buildingNumber
|
|
||||||
* @property string $city
|
|
||||||
* @property string $streetName
|
|
||||||
* @property string $streetAddress
|
|
||||||
* @property string $secondaryAddress
|
|
||||||
* @property string $postcode
|
|
||||||
* @property string $address
|
|
||||||
* @property string $state
|
|
||||||
* @property string $country
|
|
||||||
* @property float $latitude
|
|
||||||
* @property float $longitude
|
|
||||||
*
|
|
||||||
* @property string $ean13
|
|
||||||
* @property string $ean8
|
|
||||||
* @property string $isbn13
|
|
||||||
* @property string $isbn10
|
|
||||||
*
|
|
||||||
* @property string $phoneNumber
|
|
||||||
* @property string $e164PhoneNumber
|
|
||||||
*
|
|
||||||
* @property string $company
|
|
||||||
* @property string $companySuffix
|
|
||||||
* @property string $jobTitle
|
|
||||||
*
|
|
||||||
* @property string $creditCardType
|
|
||||||
* @property string $creditCardNumber
|
|
||||||
* @method string creditCardNumber($type = null, $formatted = false, $separator = '-')
|
|
||||||
* @property \DateTime $creditCardExpirationDate
|
|
||||||
* @property string $creditCardExpirationDateString
|
|
||||||
* @property array $creditCardDetails
|
|
||||||
* @property string $bankAccountNumber
|
|
||||||
* @method string iban($countryCode = null, $prefix = '', $length = null)
|
|
||||||
* @property string $swiftBicNumber
|
|
||||||
* @property string $vat
|
|
||||||
*
|
|
||||||
* @property string $word
|
|
||||||
* @property string|array $words
|
|
||||||
* @method string|array words($nb = 3, $asText = false)
|
|
||||||
* @method string word()
|
|
||||||
* @property string $sentence
|
|
||||||
* @method string sentence($nbWords = 6, $variableNbWords = true)
|
|
||||||
* @property string|array $sentences
|
|
||||||
* @method string|array sentences($nb = 3, $asText = false)
|
|
||||||
* @property string $paragraph
|
|
||||||
* @method string paragraph($nbSentences = 3, $variableNbSentences = true)
|
|
||||||
* @property string|array $paragraphs
|
|
||||||
* @method string|array paragraphs($nb = 3, $asText = false)
|
|
||||||
* @property string $text
|
|
||||||
* @method string text($maxNbChars = 200)
|
|
||||||
*
|
|
||||||
* @method string realText($maxNbChars = 200, $indexSize = 2)
|
|
||||||
*
|
|
||||||
* @property string $email
|
|
||||||
* @property string $safeEmail
|
|
||||||
* @property string $freeEmail
|
|
||||||
* @property string $companyEmail
|
|
||||||
* @property string $freeEmailDomain
|
|
||||||
* @property string $safeEmailDomain
|
|
||||||
* @property string $userName
|
|
||||||
* @property string $password
|
|
||||||
* @method string password($minLength = 6, $maxLength = 20)
|
|
||||||
* @property string $domainName
|
|
||||||
* @property string $domainWord
|
|
||||||
* @property string $tld
|
|
||||||
* @property string $url
|
|
||||||
* @property string $slug
|
|
||||||
* @method string slug($nbWords = 6, $variableNbWords = true)
|
|
||||||
* @property string $ipv4
|
|
||||||
* @property string $ipv6
|
|
||||||
* @property string $localIpv4
|
|
||||||
* @property string $macAddress
|
|
||||||
*
|
|
||||||
* @property int $unixTime
|
|
||||||
* @property \DateTime $dateTime
|
|
||||||
* @property \DateTime $dateTimeAD
|
|
||||||
* @property string $iso8601
|
|
||||||
* @property \DateTime $dateTimeThisCentury
|
|
||||||
* @property \DateTime $dateTimeThisDecade
|
|
||||||
* @property \DateTime $dateTimeThisYear
|
|
||||||
* @property \DateTime $dateTimeThisMonth
|
|
||||||
* @property string $amPm
|
|
||||||
* @property string $dayOfMonth
|
|
||||||
* @property string $dayOfWeek
|
|
||||||
* @property string $month
|
|
||||||
* @property string $monthName
|
|
||||||
* @property string $year
|
|
||||||
* @property string $century
|
|
||||||
* @property string $timezone
|
|
||||||
* @method string amPm($max = 'now')
|
|
||||||
* @method string date($format = 'Y-m-d', $max = 'now')
|
|
||||||
* @method string dayOfMonth($max = 'now')
|
|
||||||
* @method string dayOfWeek($max = 'now')
|
|
||||||
* @method string iso8601($max = 'now')
|
|
||||||
* @method string month($max = 'now')
|
|
||||||
* @method string monthName($max = 'now')
|
|
||||||
* @method string time($format = 'H:i:s', $max = 'now')
|
|
||||||
* @method int unixTime($max = 'now')
|
|
||||||
* @method string year($max = 'now')
|
|
||||||
* @method \DateTime dateTime($max = 'now', $timezone = null)
|
|
||||||
* @method \DateTime dateTimeAd($max = 'now', $timezone = null)
|
|
||||||
* @method \DateTime dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null)
|
|
||||||
* @method \DateTime dateTimeInInterval($date = '-30 years', $interval = '+5 days', $timezone = null)
|
|
||||||
* @method \DateTime dateTimeThisCentury($max = 'now', $timezone = null)
|
|
||||||
* @method \DateTime dateTimeThisDecade($max = 'now', $timezone = null)
|
|
||||||
* @method \DateTime dateTimeThisYear($max = 'now', $timezone = null)
|
|
||||||
* @method \DateTime dateTimeThisMonth($max = 'now', $timezone = null)
|
|
||||||
*
|
|
||||||
* @property string $md5
|
|
||||||
* @property string $sha1
|
|
||||||
* @property string $sha256
|
|
||||||
* @property string $locale
|
|
||||||
* @property string $countryCode
|
|
||||||
* @property string $countryISOAlpha3
|
|
||||||
* @property string $languageCode
|
|
||||||
* @property string $currencyCode
|
|
||||||
* @property boolean $boolean
|
|
||||||
* @method boolean boolean($chanceOfGettingTrue = 50)
|
|
||||||
*
|
|
||||||
* @property int $randomDigit
|
|
||||||
* @property int $randomDigitNot
|
|
||||||
* @property int $randomDigitNotNull
|
|
||||||
* @property string $randomLetter
|
|
||||||
* @property string $randomAscii
|
|
||||||
* @method int randomNumber($nbDigits = null, $strict = false)
|
|
||||||
* @method int|string|null randomKey(array $array = array())
|
|
||||||
* @method int numberBetween($min = 0, $max = 2147483647)
|
|
||||||
* @method float randomFloat($nbMaxDecimals = null, $min = 0, $max = null)
|
|
||||||
* @method mixed randomElement(array $array = array('a', 'b', 'c'))
|
|
||||||
* @method array randomElements(array $array = array('a', 'b', 'c'), $count = 1, $allowDuplicates = false)
|
|
||||||
* @method array|string shuffle($arg = '')
|
|
||||||
* @method array shuffleArray(array $array = array())
|
|
||||||
* @method string shuffleString($string = '', $encoding = 'UTF-8')
|
|
||||||
* @method string numerify($string = '###')
|
|
||||||
* @method string lexify($string = '????')
|
|
||||||
* @method string bothify($string = '## ??')
|
|
||||||
* @method string asciify($string = '****')
|
|
||||||
* @method string regexify($regex = '')
|
|
||||||
* @method string toLower($string = '')
|
|
||||||
* @method string toUpper($string = '')
|
|
||||||
* @method Generator optional($weight = 0.5, $default = null)
|
|
||||||
* @method Generator unique($reset = false, $maxRetries = 10000)
|
|
||||||
* @method Generator valid($validator = null, $maxRetries = 10000)
|
|
||||||
* @method mixed passthrough($passthrough)
|
|
||||||
*
|
|
||||||
* @method integer biasedNumberBetween($min = 0, $max = 100, $function = 'sqrt')
|
|
||||||
*
|
|
||||||
* @property string $macProcessor
|
|
||||||
* @property string $linuxProcessor
|
|
||||||
* @property string $userAgent
|
|
||||||
* @property string $chrome
|
|
||||||
* @property string $firefox
|
|
||||||
* @property string $safari
|
|
||||||
* @property string $opera
|
|
||||||
* @property string $internetExplorer
|
|
||||||
* @property string $windowsPlatformToken
|
|
||||||
* @property string $macPlatformToken
|
|
||||||
* @property string $linuxPlatformToken
|
|
||||||
*
|
|
||||||
* @property string $uuid
|
|
||||||
*
|
|
||||||
* @property string $mimeType
|
|
||||||
* @property string $fileExtension
|
|
||||||
* @method string file($sourceDirectory = '/tmp', $targetDirectory = '/tmp', $fullPath = true)
|
|
||||||
*
|
|
||||||
* @method string imageUrl($width = 640, $height = 480, $category = null, $randomize = true, $word = null, $gray = false)
|
|
||||||
* @method string image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null)
|
|
||||||
*
|
|
||||||
* @property string $hexColor
|
|
||||||
* @property string $safeHexColor
|
|
||||||
* @property string $rgbColor
|
|
||||||
* @property array $rgbColorAsArray
|
|
||||||
* @property string $rgbCssColor
|
|
||||||
* @property string $safeColorName
|
|
||||||
* @property string $colorName
|
|
||||||
*
|
|
||||||
* @method string randomHtml($maxDepth = 4, $maxWidth = 4)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
class Generator
|
|
||||||
{
|
|
||||||
protected $providers = array();
|
|
||||||
protected $formatters = array();
|
|
||||||
|
|
||||||
public function addProvider($provider)
|
|
||||||
{
|
|
||||||
array_unshift($this->providers, $provider);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getProviders()
|
|
||||||
{
|
|
||||||
return $this->providers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function seed($seed = null)
|
|
||||||
{
|
|
||||||
if ($seed === null) {
|
|
||||||
mt_srand();
|
|
||||||
} else {
|
|
||||||
if (PHP_VERSION_ID < 70100) {
|
|
||||||
mt_srand((int) $seed);
|
|
||||||
} else {
|
|
||||||
mt_srand((int) $seed, MT_RAND_PHP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function format($formatter, $arguments = array())
|
|
||||||
{
|
|
||||||
return call_user_func_array($this->getFormatter($formatter), $arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $formatter
|
|
||||||
*
|
|
||||||
* @return Callable
|
|
||||||
*/
|
|
||||||
public function getFormatter($formatter)
|
|
||||||
{
|
|
||||||
if (isset($this->formatters[$formatter])) {
|
|
||||||
return $this->formatters[$formatter];
|
|
||||||
}
|
|
||||||
foreach ($this->providers as $provider) {
|
|
||||||
if (method_exists($provider, $formatter)) {
|
|
||||||
$this->formatters[$formatter] = array($provider, $formatter);
|
|
||||||
|
|
||||||
return $this->formatters[$formatter];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw new \InvalidArgumentException(sprintf('Unknown formatter "%s"', $formatter));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Replaces tokens ('{{ tokenName }}') with the result from the token method call
|
|
||||||
*
|
|
||||||
* @param string $string String that needs to bet parsed
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function parse($string)
|
|
||||||
{
|
|
||||||
return preg_replace_callback('/\{\{\s?(\w+)\s?\}\}/u', array($this, 'callFormatWithMatches'), $string);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function callFormatWithMatches($matches)
|
|
||||||
{
|
|
||||||
return $this->format($matches[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $attribute
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function __get($attribute)
|
|
||||||
{
|
|
||||||
return $this->format($attribute);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $method
|
|
||||||
* @param array $attributes
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function __call($method, $attributes)
|
|
||||||
{
|
|
||||||
return $this->format($method, $attributes);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function __destruct()
|
|
||||||
{
|
|
||||||
$this->seed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,156 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Guesser;
|
|
||||||
|
|
||||||
use \Faker\Provider\Base;
|
|
||||||
|
|
||||||
class Name
|
|
||||||
{
|
|
||||||
protected $generator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
*/
|
|
||||||
public function __construct(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $name
|
|
||||||
* @param int|null $size Length of field, if known
|
|
||||||
* @return callable
|
|
||||||
*/
|
|
||||||
public function guessFormat($name, $size = null)
|
|
||||||
{
|
|
||||||
$name = Base::toLower($name);
|
|
||||||
$generator = $this->generator;
|
|
||||||
if (preg_match('/^is[_A-Z]/', $name)) {
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->boolean;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
if (preg_match('/(_a|A)t$/', $name)) {
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->dateTime;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
switch (str_replace('_', '', $name)) {
|
|
||||||
case 'firstname':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->firstName;
|
|
||||||
};
|
|
||||||
case 'lastname':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->lastName;
|
|
||||||
};
|
|
||||||
case 'username':
|
|
||||||
case 'login':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->userName;
|
|
||||||
};
|
|
||||||
case 'email':
|
|
||||||
case 'emailaddress':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->email;
|
|
||||||
};
|
|
||||||
case 'phonenumber':
|
|
||||||
case 'phone':
|
|
||||||
case 'telephone':
|
|
||||||
case 'telnumber':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->phoneNumber;
|
|
||||||
};
|
|
||||||
case 'address':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->address;
|
|
||||||
};
|
|
||||||
case 'city':
|
|
||||||
case 'town':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->city;
|
|
||||||
};
|
|
||||||
case 'streetaddress':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->streetAddress;
|
|
||||||
};
|
|
||||||
case 'postcode':
|
|
||||||
case 'zipcode':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->postcode;
|
|
||||||
};
|
|
||||||
case 'state':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->state;
|
|
||||||
};
|
|
||||||
case 'county':
|
|
||||||
if ($this->generator->locale == 'en_US') {
|
|
||||||
return function () use ($generator) {
|
|
||||||
return sprintf('%s County', $generator->city);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->state;
|
|
||||||
};
|
|
||||||
case 'country':
|
|
||||||
switch ($size) {
|
|
||||||
case 2:
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->countryCode;
|
|
||||||
};
|
|
||||||
case 3:
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->countryISOAlpha3;
|
|
||||||
};
|
|
||||||
case 5:
|
|
||||||
case 6:
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->locale;
|
|
||||||
};
|
|
||||||
default:
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->country;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'locale':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->locale;
|
|
||||||
};
|
|
||||||
case 'currency':
|
|
||||||
case 'currencycode':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->currencyCode;
|
|
||||||
};
|
|
||||||
case 'url':
|
|
||||||
case 'website':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->url;
|
|
||||||
};
|
|
||||||
case 'company':
|
|
||||||
case 'companyname':
|
|
||||||
case 'employer':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->company;
|
|
||||||
};
|
|
||||||
case 'title':
|
|
||||||
if ($size !== null && $size <= 10) {
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->title;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->sentence;
|
|
||||||
};
|
|
||||||
case 'body':
|
|
||||||
case 'summary':
|
|
||||||
case 'article':
|
|
||||||
case 'description':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->text;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\CakePHP;
|
|
||||||
|
|
||||||
class ColumnTypeGuesser
|
|
||||||
{
|
|
||||||
protected $generator;
|
|
||||||
|
|
||||||
public function __construct(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Closure|null
|
|
||||||
*/
|
|
||||||
public function guessFormat($column, $table)
|
|
||||||
{
|
|
||||||
$generator = $this->generator;
|
|
||||||
$schema = $table->schema();
|
|
||||||
|
|
||||||
switch ($schema->columnType($column)) {
|
|
||||||
case 'boolean':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->boolean;
|
|
||||||
};
|
|
||||||
case 'integer':
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('2147483647'));
|
|
||||||
};
|
|
||||||
case 'biginteger':
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('9223372036854775807'));
|
|
||||||
};
|
|
||||||
case 'decimal':
|
|
||||||
case 'float':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->randomFloat();
|
|
||||||
};
|
|
||||||
case 'uuid':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->uuid();
|
|
||||||
};
|
|
||||||
case 'string':
|
|
||||||
if (method_exists($schema, 'getColumn')) {
|
|
||||||
$columnData = $schema->getColumn($column);
|
|
||||||
} else {
|
|
||||||
$columnData = $schema->column($column);
|
|
||||||
}
|
|
||||||
$length = $columnData['length'];
|
|
||||||
return function () use ($generator, $length) {
|
|
||||||
return $generator->text($length);
|
|
||||||
};
|
|
||||||
case 'text':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->text();
|
|
||||||
};
|
|
||||||
case 'date':
|
|
||||||
case 'datetime':
|
|
||||||
case 'timestamp':
|
|
||||||
case 'time':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->datetime();
|
|
||||||
};
|
|
||||||
|
|
||||||
case 'binary':
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,166 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\CakePHP;
|
|
||||||
|
|
||||||
use Cake\ORM\TableRegistry;
|
|
||||||
|
|
||||||
class EntityPopulator
|
|
||||||
{
|
|
||||||
protected $class;
|
|
||||||
protected $connectionName;
|
|
||||||
protected $columnFormatters = [];
|
|
||||||
protected $modifiers = [];
|
|
||||||
|
|
||||||
public function __construct($class)
|
|
||||||
{
|
|
||||||
$this->class = $class;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $name
|
|
||||||
*/
|
|
||||||
public function __get($name)
|
|
||||||
{
|
|
||||||
return $this->{$name};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $name
|
|
||||||
*/
|
|
||||||
public function __set($name, $value)
|
|
||||||
{
|
|
||||||
$this->{$name} = $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function mergeColumnFormattersWith($columnFormatters)
|
|
||||||
{
|
|
||||||
$this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function mergeModifiersWith($modifiers)
|
|
||||||
{
|
|
||||||
$this->modifiers = array_merge($this->modifiers, $modifiers);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function guessColumnFormatters($populator)
|
|
||||||
{
|
|
||||||
$formatters = [];
|
|
||||||
$class = $this->class;
|
|
||||||
$table = $this->getTable($class);
|
|
||||||
$schema = $table->schema();
|
|
||||||
$pk = $schema->primaryKey();
|
|
||||||
$guessers = $populator->getGuessers() + ['ColumnTypeGuesser' => new ColumnTypeGuesser($populator->getGenerator())];
|
|
||||||
$isForeignKey = function ($column) use ($table) {
|
|
||||||
foreach ($table->associations()->type('BelongsTo') as $assoc) {
|
|
||||||
if ($column == $assoc->foreignKey()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
foreach ($schema->columns() as $column) {
|
|
||||||
if ($column == $pk[0] || $isForeignKey($column)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($guessers as $guesser) {
|
|
||||||
if ($formatter = $guesser->guessFormat($column, $table)) {
|
|
||||||
$formatters[$column] = $formatter;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $formatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function guessModifiers()
|
|
||||||
{
|
|
||||||
$modifiers = [];
|
|
||||||
$table = $this->getTable($this->class);
|
|
||||||
|
|
||||||
$belongsTo = $table->associations()->type('BelongsTo');
|
|
||||||
foreach ($belongsTo as $assoc) {
|
|
||||||
$modifiers['belongsTo' . $assoc->name()] = function ($data, $insertedEntities) use ($assoc) {
|
|
||||||
$table = $assoc->target();
|
|
||||||
$foreignModel = $table->alias();
|
|
||||||
|
|
||||||
$foreignKeys = [];
|
|
||||||
if (!empty($insertedEntities[$foreignModel])) {
|
|
||||||
$foreignKeys = $insertedEntities[$foreignModel];
|
|
||||||
} else {
|
|
||||||
$foreignKeys = $table->find('all')
|
|
||||||
->select(['id'])
|
|
||||||
->map(function ($row) {
|
|
||||||
return $row->id;
|
|
||||||
})
|
|
||||||
->toArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($foreignKeys)) {
|
|
||||||
throw new \Exception(sprintf('%s belongsTo %s, which seems empty at this point.', $this->getTable($this->class)->table(), $assoc->table()));
|
|
||||||
}
|
|
||||||
|
|
||||||
$foreignKey = $foreignKeys[array_rand($foreignKeys)];
|
|
||||||
$data[$assoc->foreignKey()] = $foreignKey;
|
|
||||||
return $data;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO check if TreeBehavior attached to modify lft/rgt cols
|
|
||||||
|
|
||||||
return $modifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $options
|
|
||||||
*/
|
|
||||||
public function execute($class, $insertedEntities, $options = [])
|
|
||||||
{
|
|
||||||
$table = $this->getTable($class);
|
|
||||||
$entity = $table->newEntity();
|
|
||||||
|
|
||||||
foreach ($this->columnFormatters as $column => $format) {
|
|
||||||
if (!is_null($format)) {
|
|
||||||
$entity->{$column} = is_callable($format) ? $format($insertedEntities, $table) : $format;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($this->modifiers as $modifier) {
|
|
||||||
$entity = $modifier($entity, $insertedEntities);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$entity = $table->save($entity, $options)) {
|
|
||||||
throw new \RuntimeException("Failed saving $class record");
|
|
||||||
}
|
|
||||||
|
|
||||||
$pk = $table->primaryKey();
|
|
||||||
if (is_string($pk)) {
|
|
||||||
return $entity->{$pk};
|
|
||||||
}
|
|
||||||
|
|
||||||
return $entity->{$pk[0]};
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setConnection($name)
|
|
||||||
{
|
|
||||||
$this->connectionName = $name;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getTable($class)
|
|
||||||
{
|
|
||||||
$options = [];
|
|
||||||
if (!empty($this->connectionName)) {
|
|
||||||
$options['connection'] = $this->connectionName;
|
|
||||||
}
|
|
||||||
return TableRegistry::get($class, $options);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,109 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\CakePHP;
|
|
||||||
|
|
||||||
class Populator
|
|
||||||
{
|
|
||||||
|
|
||||||
protected $generator;
|
|
||||||
protected $entities = [];
|
|
||||||
protected $quantities = [];
|
|
||||||
protected $guessers = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
*/
|
|
||||||
public function __construct(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Faker\Generator
|
|
||||||
*/
|
|
||||||
public function getGenerator()
|
|
||||||
{
|
|
||||||
return $this->generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getGuessers()
|
|
||||||
{
|
|
||||||
return $this->guessers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return $this
|
|
||||||
*/
|
|
||||||
public function removeGuesser($name)
|
|
||||||
{
|
|
||||||
if ($this->guessers[$name]) {
|
|
||||||
unset($this->guessers[$name]);
|
|
||||||
}
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return $this
|
|
||||||
* @throws \Exception
|
|
||||||
*/
|
|
||||||
public function addGuesser($class)
|
|
||||||
{
|
|
||||||
if (!is_object($class)) {
|
|
||||||
$class = new $class($this->generator);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!method_exists($class, 'guessFormat')) {
|
|
||||||
throw new \Exception('Missing required custom guesser method: ' . get_class($class) . '::guessFormat()');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->guessers[get_class($class)] = $class;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $customColumnFormatters
|
|
||||||
* @param array $customModifiers
|
|
||||||
* @return $this
|
|
||||||
*/
|
|
||||||
public function addEntity($entity, $number, $customColumnFormatters = [], $customModifiers = [])
|
|
||||||
{
|
|
||||||
if (!$entity instanceof EntityPopulator) {
|
|
||||||
$entity = new EntityPopulator($entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
$entity->columnFormatters = $entity->guessColumnFormatters($this);
|
|
||||||
if ($customColumnFormatters) {
|
|
||||||
$entity->mergeColumnFormattersWith($customColumnFormatters);
|
|
||||||
}
|
|
||||||
|
|
||||||
$entity->modifiers = $entity->guessModifiers($this);
|
|
||||||
if ($customModifiers) {
|
|
||||||
$entity->mergeModifiersWith($customModifiers);
|
|
||||||
}
|
|
||||||
|
|
||||||
$class = $entity->class;
|
|
||||||
$this->entities[$class] = $entity;
|
|
||||||
$this->quantities[$class] = $number;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $options
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function execute($options = [])
|
|
||||||
{
|
|
||||||
$insertedEntities = [];
|
|
||||||
|
|
||||||
foreach ($this->quantities as $class => $number) {
|
|
||||||
for ($i = 0; $i < $number; $i++) {
|
|
||||||
$insertedEntities[$class][] = $this->entities[$class]->execute($class, $insertedEntities, $options);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $insertedEntities;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Doctrine;
|
|
||||||
|
|
||||||
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
|
|
||||||
|
|
||||||
class ColumnTypeGuesser
|
|
||||||
{
|
|
||||||
protected $generator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
*/
|
|
||||||
public function __construct(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param ClassMetadata $class
|
|
||||||
* @return \Closure|null
|
|
||||||
*/
|
|
||||||
public function guessFormat($fieldName, ClassMetadata $class)
|
|
||||||
{
|
|
||||||
$generator = $this->generator;
|
|
||||||
$type = $class->getTypeOfField($fieldName);
|
|
||||||
switch ($type) {
|
|
||||||
case 'boolean':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->boolean;
|
|
||||||
};
|
|
||||||
case 'decimal':
|
|
||||||
$size = isset($class->fieldMappings[$fieldName]['precision']) ? $class->fieldMappings[$fieldName]['precision'] : 2;
|
|
||||||
|
|
||||||
return function () use ($generator, $size) {
|
|
||||||
return $generator->randomNumber($size + 2) / 100;
|
|
||||||
};
|
|
||||||
case 'smallint':
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, 65535);
|
|
||||||
};
|
|
||||||
case 'integer':
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('2147483647'));
|
|
||||||
};
|
|
||||||
case 'bigint':
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('18446744073709551615'));
|
|
||||||
};
|
|
||||||
case 'float':
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('4294967295'))/mt_rand(1, intval('4294967295'));
|
|
||||||
};
|
|
||||||
case 'string':
|
|
||||||
$size = isset($class->fieldMappings[$fieldName]['length']) ? $class->fieldMappings[$fieldName]['length'] : 255;
|
|
||||||
|
|
||||||
return function () use ($generator, $size) {
|
|
||||||
return $generator->text($size);
|
|
||||||
};
|
|
||||||
case 'text':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->text;
|
|
||||||
};
|
|
||||||
case 'datetime':
|
|
||||||
case 'date':
|
|
||||||
case 'time':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->datetime;
|
|
||||||
};
|
|
||||||
case 'datetime_immutable':
|
|
||||||
case 'date_immutable':
|
|
||||||
case 'time_immutable':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return \DateTimeImmutable::createFromMutable($generator->datetime);
|
|
||||||
};
|
|
||||||
default:
|
|
||||||
// no smart way to guess what the user expects here
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,251 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Doctrine;
|
|
||||||
|
|
||||||
use Doctrine\Common\Persistence\ObjectManager;
|
|
||||||
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service class for populating a table through a Doctrine Entity class.
|
|
||||||
*/
|
|
||||||
class EntityPopulator
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var ClassMetadata
|
|
||||||
*/
|
|
||||||
protected $class;
|
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $columnFormatters = array();
|
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $modifiers = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class constructor.
|
|
||||||
*
|
|
||||||
* @param ClassMetadata $class
|
|
||||||
*/
|
|
||||||
public function __construct(ClassMetadata $class)
|
|
||||||
{
|
|
||||||
$this->class = $class;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getClass()
|
|
||||||
{
|
|
||||||
return $this->class->getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $columnFormatters
|
|
||||||
*/
|
|
||||||
public function setColumnFormatters($columnFormatters)
|
|
||||||
{
|
|
||||||
$this->columnFormatters = $columnFormatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getColumnFormatters()
|
|
||||||
{
|
|
||||||
return $this->columnFormatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function mergeColumnFormattersWith($columnFormatters)
|
|
||||||
{
|
|
||||||
$this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $modifiers
|
|
||||||
*/
|
|
||||||
public function setModifiers(array $modifiers)
|
|
||||||
{
|
|
||||||
$this->modifiers = $modifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getModifiers()
|
|
||||||
{
|
|
||||||
return $this->modifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $modifiers
|
|
||||||
*/
|
|
||||||
public function mergeModifiersWith(array $modifiers)
|
|
||||||
{
|
|
||||||
$this->modifiers = array_merge($this->modifiers, $modifiers);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function guessColumnFormatters(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$formatters = array();
|
|
||||||
$nameGuesser = new \Faker\Guesser\Name($generator);
|
|
||||||
$columnTypeGuesser = new ColumnTypeGuesser($generator);
|
|
||||||
foreach ($this->class->getFieldNames() as $fieldName) {
|
|
||||||
if ($this->class->isIdentifier($fieldName) || !$this->class->hasField($fieldName)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$size = isset($this->class->fieldMappings[$fieldName]['length']) ? $this->class->fieldMappings[$fieldName]['length'] : null;
|
|
||||||
if ($formatter = $nameGuesser->guessFormat($fieldName, $size)) {
|
|
||||||
$formatters[$fieldName] = $formatter;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($formatter = $columnTypeGuesser->guessFormat($fieldName, $this->class)) {
|
|
||||||
$formatters[$fieldName] = $formatter;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($this->class->getAssociationNames() as $assocName) {
|
|
||||||
if ($this->class->isCollectionValuedAssociation($assocName)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$relatedClass = $this->class->getAssociationTargetClass($assocName);
|
|
||||||
|
|
||||||
$unique = $optional = false;
|
|
||||||
if ($this->class instanceof \Doctrine\ORM\Mapping\ClassMetadata) {
|
|
||||||
$mappings = $this->class->getAssociationMappings();
|
|
||||||
foreach ($mappings as $mapping) {
|
|
||||||
if ($mapping['targetEntity'] == $relatedClass) {
|
|
||||||
if ($mapping['type'] == \Doctrine\ORM\Mapping\ClassMetadata::ONE_TO_ONE) {
|
|
||||||
$unique = true;
|
|
||||||
$optional = isset($mapping['joinColumns'][0]['nullable']) ? $mapping['joinColumns'][0]['nullable'] : false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} elseif ($this->class instanceof \Doctrine\ODM\MongoDB\Mapping\ClassMetadata) {
|
|
||||||
$mappings = $this->class->associationMappings;
|
|
||||||
foreach ($mappings as $mapping) {
|
|
||||||
if ($mapping['targetDocument'] == $relatedClass) {
|
|
||||||
if ($mapping['type'] == \Doctrine\ODM\MongoDB\Mapping\ClassMetadata::ONE && $mapping['association'] == \Doctrine\ODM\MongoDB\Mapping\ClassMetadata::REFERENCE_ONE) {
|
|
||||||
$unique = true;
|
|
||||||
$optional = isset($mapping['nullable']) ? $mapping['nullable'] : false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$index = 0;
|
|
||||||
$formatters[$assocName] = function ($inserted) use ($relatedClass, &$index, $unique, $optional) {
|
|
||||||
|
|
||||||
if (isset($inserted[$relatedClass])) {
|
|
||||||
if ($unique) {
|
|
||||||
$related = null;
|
|
||||||
if (isset($inserted[$relatedClass][$index]) || !$optional) {
|
|
||||||
$related = $inserted[$relatedClass][$index];
|
|
||||||
}
|
|
||||||
|
|
||||||
$index++;
|
|
||||||
|
|
||||||
return $related;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $inserted[$relatedClass][mt_rand(0, count($inserted[$relatedClass]) - 1)];
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return $formatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Insert one new record using the Entity class.
|
|
||||||
* @param ObjectManager $manager
|
|
||||||
* @param bool $generateId
|
|
||||||
* @return EntityPopulator
|
|
||||||
*/
|
|
||||||
public function execute(ObjectManager $manager, $insertedEntities, $generateId = false)
|
|
||||||
{
|
|
||||||
$obj = $this->class->newInstance();
|
|
||||||
|
|
||||||
$this->fillColumns($obj, $insertedEntities);
|
|
||||||
$this->callMethods($obj, $insertedEntities);
|
|
||||||
|
|
||||||
if ($generateId) {
|
|
||||||
$idsName = $this->class->getIdentifier();
|
|
||||||
foreach ($idsName as $idName) {
|
|
||||||
$id = $this->generateId($obj, $idName, $manager);
|
|
||||||
$this->class->reflFields[$idName]->setValue($obj, $id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$manager->persist($obj);
|
|
||||||
|
|
||||||
return $obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function fillColumns($obj, $insertedEntities)
|
|
||||||
{
|
|
||||||
foreach ($this->columnFormatters as $field => $format) {
|
|
||||||
if (null !== $format) {
|
|
||||||
// Add some extended debugging information to any errors thrown by the formatter
|
|
||||||
try {
|
|
||||||
$value = is_callable($format) ? $format($insertedEntities, $obj) : $format;
|
|
||||||
} catch (\InvalidArgumentException $ex) {
|
|
||||||
throw new \InvalidArgumentException(sprintf(
|
|
||||||
"Failed to generate a value for %s::%s: %s",
|
|
||||||
get_class($obj),
|
|
||||||
$field,
|
|
||||||
$ex->getMessage()
|
|
||||||
));
|
|
||||||
}
|
|
||||||
// Try a standard setter if it's available, otherwise fall back on reflection
|
|
||||||
$setter = sprintf("set%s", ucfirst($field));
|
|
||||||
if (is_callable(array($obj, $setter))) {
|
|
||||||
$obj->$setter($value);
|
|
||||||
} else {
|
|
||||||
$this->class->reflFields[$field]->setValue($obj, $value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private function callMethods($obj, $insertedEntities)
|
|
||||||
{
|
|
||||||
foreach ($this->getModifiers() as $modifier) {
|
|
||||||
$modifier($obj, $insertedEntities);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param ObjectManager $manager
|
|
||||||
* @return int|null
|
|
||||||
*/
|
|
||||||
private function generateId($obj, $column, ObjectManager $manager)
|
|
||||||
{
|
|
||||||
/* @var $repository \Doctrine\Common\Persistence\ObjectRepository */
|
|
||||||
$repository = $manager->getRepository(get_class($obj));
|
|
||||||
$result = $repository->createQueryBuilder('e')
|
|
||||||
->select(sprintf('e.%s', $column))
|
|
||||||
->getQuery()
|
|
||||||
->execute();
|
|
||||||
$ids = array_map('current', $result->toArray());
|
|
||||||
|
|
||||||
$id = null;
|
|
||||||
do {
|
|
||||||
$id = mt_rand();
|
|
||||||
} while (in_array($id, $ids));
|
|
||||||
|
|
||||||
return $id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,110 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Doctrine;
|
|
||||||
|
|
||||||
use Doctrine\Common\Persistence\ObjectManager;
|
|
||||||
use Faker\Generator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service class for populating a database using the Doctrine ORM or ODM.
|
|
||||||
* A Populator can populate several tables using ActiveRecord classes.
|
|
||||||
*/
|
|
||||||
class Populator
|
|
||||||
{
|
|
||||||
/** @var int */
|
|
||||||
protected $batchSize;
|
|
||||||
|
|
||||||
/** @var Generator */
|
|
||||||
protected $generator;
|
|
||||||
|
|
||||||
/** @var ObjectManager|null */
|
|
||||||
protected $manager;
|
|
||||||
|
|
||||||
/** @var array */
|
|
||||||
protected $entities = array();
|
|
||||||
|
|
||||||
/** @var array */
|
|
||||||
protected $quantities = array();
|
|
||||||
|
|
||||||
/** @var array */
|
|
||||||
protected $generateId = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Populator constructor.
|
|
||||||
* @param Generator $generator
|
|
||||||
* @param ObjectManager|null $manager
|
|
||||||
* @param int $batchSize
|
|
||||||
*/
|
|
||||||
public function __construct(Generator $generator, ObjectManager $manager = null, $batchSize = 1000)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
$this->manager = $manager;
|
|
||||||
$this->batchSize = $batchSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add an order for the generation of $number records for $entity.
|
|
||||||
*
|
|
||||||
* @param mixed $entity A Doctrine classname, or a \Faker\ORM\Doctrine\EntityPopulator instance
|
|
||||||
* @param int $number The number of entities to populate
|
|
||||||
*/
|
|
||||||
public function addEntity($entity, $number, $customColumnFormatters = array(), $customModifiers = array(), $generateId = false)
|
|
||||||
{
|
|
||||||
if (!$entity instanceof \Faker\ORM\Doctrine\EntityPopulator) {
|
|
||||||
if (null === $this->manager) {
|
|
||||||
throw new \InvalidArgumentException("No entity manager passed to Doctrine Populator.");
|
|
||||||
}
|
|
||||||
$entity = new \Faker\ORM\Doctrine\EntityPopulator($this->manager->getClassMetadata($entity));
|
|
||||||
}
|
|
||||||
$entity->setColumnFormatters($entity->guessColumnFormatters($this->generator));
|
|
||||||
if ($customColumnFormatters) {
|
|
||||||
$entity->mergeColumnFormattersWith($customColumnFormatters);
|
|
||||||
}
|
|
||||||
$entity->mergeModifiersWith($customModifiers);
|
|
||||||
$this->generateId[$entity->getClass()] = $generateId;
|
|
||||||
|
|
||||||
$class = $entity->getClass();
|
|
||||||
$this->entities[$class] = $entity;
|
|
||||||
$this->quantities[$class] = $number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Populate the database using all the Entity classes previously added.
|
|
||||||
*
|
|
||||||
* Please note that large amounts of data will result in more memory usage since the the Populator will return
|
|
||||||
* all newly created primary keys after executing.
|
|
||||||
*
|
|
||||||
* @param null|EntityManager $entityManager A Doctrine connection object
|
|
||||||
*
|
|
||||||
* @return array A list of the inserted PKs
|
|
||||||
*/
|
|
||||||
public function execute($entityManager = null)
|
|
||||||
{
|
|
||||||
if (null === $entityManager) {
|
|
||||||
$entityManager = $this->manager;
|
|
||||||
}
|
|
||||||
if (null === $entityManager) {
|
|
||||||
throw new \InvalidArgumentException("No entity manager passed to Doctrine Populator.");
|
|
||||||
}
|
|
||||||
|
|
||||||
$insertedEntities = array();
|
|
||||||
foreach ($this->quantities as $class => $number) {
|
|
||||||
$generateId = $this->generateId[$class];
|
|
||||||
for ($i=0; $i < $number; $i++) {
|
|
||||||
$insertedEntities[$class][]= $this->entities[$class]->execute(
|
|
||||||
$entityManager,
|
|
||||||
$insertedEntities,
|
|
||||||
$generateId
|
|
||||||
);
|
|
||||||
if (count($insertedEntities) % $this->batchSize === 0) {
|
|
||||||
$entityManager->flush();
|
|
||||||
$entityManager->clear($class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$entityManager->flush();
|
|
||||||
$entityManager->clear($class);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $insertedEntities;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Mandango;
|
|
||||||
|
|
||||||
class ColumnTypeGuesser
|
|
||||||
{
|
|
||||||
protected $generator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
*/
|
|
||||||
public function __construct(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Closure|null
|
|
||||||
*/
|
|
||||||
public function guessFormat($field)
|
|
||||||
{
|
|
||||||
$generator = $this->generator;
|
|
||||||
switch ($field['type']) {
|
|
||||||
case 'boolean':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->boolean;
|
|
||||||
};
|
|
||||||
case 'integer':
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('4294967295'));
|
|
||||||
};
|
|
||||||
case 'float':
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('4294967295'))/mt_rand(1, intval('4294967295'));
|
|
||||||
};
|
|
||||||
case 'string':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->text(255);
|
|
||||||
};
|
|
||||||
case 'date':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->datetime;
|
|
||||||
};
|
|
||||||
default:
|
|
||||||
// no smart way to guess what the user expects here
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,122 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Mandango;
|
|
||||||
|
|
||||||
use Mandango\Mandango;
|
|
||||||
use Faker\Provider\Base;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service class for populating a table through a Mandango ActiveRecord class.
|
|
||||||
*/
|
|
||||||
class EntityPopulator
|
|
||||||
{
|
|
||||||
protected $class;
|
|
||||||
protected $columnFormatters = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class constructor.
|
|
||||||
*
|
|
||||||
* @param string $class A Mandango ActiveRecord classname
|
|
||||||
*/
|
|
||||||
public function __construct($class)
|
|
||||||
{
|
|
||||||
$this->class = $class;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getClass()
|
|
||||||
{
|
|
||||||
return $this->class;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setColumnFormatters($columnFormatters)
|
|
||||||
{
|
|
||||||
$this->columnFormatters = $columnFormatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getColumnFormatters()
|
|
||||||
{
|
|
||||||
return $this->columnFormatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function mergeColumnFormattersWith($columnFormatters)
|
|
||||||
{
|
|
||||||
$this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
* @param Mandango $mandango
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function guessColumnFormatters(\Faker\Generator $generator, Mandango $mandango)
|
|
||||||
{
|
|
||||||
$formatters = array();
|
|
||||||
$nameGuesser = new \Faker\Guesser\Name($generator);
|
|
||||||
$columnTypeGuesser = new \Faker\ORM\Mandango\ColumnTypeGuesser($generator);
|
|
||||||
|
|
||||||
$metadata = $mandango->getMetadata($this->class);
|
|
||||||
|
|
||||||
// fields
|
|
||||||
foreach ($metadata['fields'] as $fieldName => $field) {
|
|
||||||
if ($formatter = $nameGuesser->guessFormat($fieldName)) {
|
|
||||||
$formatters[$fieldName] = $formatter;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($formatter = $columnTypeGuesser->guessFormat($field)) {
|
|
||||||
$formatters[$fieldName] = $formatter;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// references
|
|
||||||
foreach (array_merge($metadata['referencesOne'], $metadata['referencesMany']) as $referenceName => $reference) {
|
|
||||||
if (!isset($reference['class'])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$referenceClass = $reference['class'];
|
|
||||||
|
|
||||||
$formatters[$referenceName] = function ($insertedEntities) use ($referenceClass) {
|
|
||||||
if (isset($insertedEntities[$referenceClass])) {
|
|
||||||
return Base::randomElement($insertedEntities[$referenceClass]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return $formatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Insert one new record using the Entity class.
|
|
||||||
* @param Mandango $mandango
|
|
||||||
*/
|
|
||||||
public function execute(Mandango $mandango, $insertedEntities)
|
|
||||||
{
|
|
||||||
$metadata = $mandango->getMetadata($this->class);
|
|
||||||
|
|
||||||
$obj = $mandango->create($this->class);
|
|
||||||
foreach ($this->columnFormatters as $column => $format) {
|
|
||||||
if (null !== $format) {
|
|
||||||
$value = is_callable($format) ? $format($insertedEntities, $obj) : $format;
|
|
||||||
|
|
||||||
if (isset($metadata['fields'][$column]) ||
|
|
||||||
isset($metadata['referencesOne'][$column])) {
|
|
||||||
$obj->set($column, $value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($metadata['referencesMany'][$column])) {
|
|
||||||
$adder = 'add'.ucfirst($column);
|
|
||||||
$obj->$adder($value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$mandango->persist($obj);
|
|
||||||
|
|
||||||
return $obj;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Mandango;
|
|
||||||
|
|
||||||
use Mandango\Mandango;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service class for populating a database using Mandango.
|
|
||||||
* A Populator can populate several tables using ActiveRecord classes.
|
|
||||||
*/
|
|
||||||
class Populator
|
|
||||||
{
|
|
||||||
protected $generator;
|
|
||||||
protected $mandango;
|
|
||||||
protected $entities = array();
|
|
||||||
protected $quantities = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
* @param Mandango $mandango
|
|
||||||
*/
|
|
||||||
public function __construct(\Faker\Generator $generator, Mandango $mandango)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
$this->mandango = $mandango;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add an order for the generation of $number records for $entity.
|
|
||||||
*
|
|
||||||
* @param mixed $entity A Propel ActiveRecord classname, or a \Faker\ORM\Propel\EntityPopulator instance
|
|
||||||
* @param int $number The number of entities to populate
|
|
||||||
*/
|
|
||||||
public function addEntity($entity, $number, $customColumnFormatters = array())
|
|
||||||
{
|
|
||||||
if (!$entity instanceof \Faker\ORM\Mandango\EntityPopulator) {
|
|
||||||
$entity = new \Faker\ORM\Mandango\EntityPopulator($entity);
|
|
||||||
}
|
|
||||||
$entity->setColumnFormatters($entity->guessColumnFormatters($this->generator, $this->mandango));
|
|
||||||
if ($customColumnFormatters) {
|
|
||||||
$entity->mergeColumnFormattersWith($customColumnFormatters);
|
|
||||||
}
|
|
||||||
$class = $entity->getClass();
|
|
||||||
$this->entities[$class] = $entity;
|
|
||||||
$this->quantities[$class] = $number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Populate the database using all the Entity classes previously added.
|
|
||||||
*
|
|
||||||
* @return array A list of the inserted entities.
|
|
||||||
*/
|
|
||||||
public function execute()
|
|
||||||
{
|
|
||||||
$insertedEntities = array();
|
|
||||||
foreach ($this->quantities as $class => $number) {
|
|
||||||
for ($i=0; $i < $number; $i++) {
|
|
||||||
$insertedEntities[$class][]= $this->entities[$class]->execute($this->mandango, $insertedEntities);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$this->mandango->flush();
|
|
||||||
|
|
||||||
return $insertedEntities;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,107 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Propel;
|
|
||||||
|
|
||||||
use \PropelColumnTypes;
|
|
||||||
use \ColumnMap;
|
|
||||||
|
|
||||||
class ColumnTypeGuesser
|
|
||||||
{
|
|
||||||
protected $generator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
*/
|
|
||||||
public function __construct(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param ColumnMap $column
|
|
||||||
* @return \Closure|null
|
|
||||||
*/
|
|
||||||
public function guessFormat(ColumnMap $column)
|
|
||||||
{
|
|
||||||
$generator = $this->generator;
|
|
||||||
if ($column->isTemporal()) {
|
|
||||||
if ($column->isEpochTemporal()) {
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->dateTime;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->dateTimeAD;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
$type = $column->getType();
|
|
||||||
switch ($type) {
|
|
||||||
case PropelColumnTypes::BOOLEAN:
|
|
||||||
case PropelColumnTypes::BOOLEAN_EMU:
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->boolean;
|
|
||||||
};
|
|
||||||
case PropelColumnTypes::NUMERIC:
|
|
||||||
case PropelColumnTypes::DECIMAL:
|
|
||||||
$size = $column->getSize();
|
|
||||||
|
|
||||||
return function () use ($generator, $size) {
|
|
||||||
return $generator->randomNumber($size + 2) / 100;
|
|
||||||
};
|
|
||||||
case PropelColumnTypes::TINYINT:
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, 127);
|
|
||||||
};
|
|
||||||
case PropelColumnTypes::SMALLINT:
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, 32767);
|
|
||||||
};
|
|
||||||
case PropelColumnTypes::INTEGER:
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('2147483647'));
|
|
||||||
};
|
|
||||||
case PropelColumnTypes::BIGINT:
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('9223372036854775807'));
|
|
||||||
};
|
|
||||||
case PropelColumnTypes::FLOAT:
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('2147483647'))/mt_rand(1, intval('2147483647'));
|
|
||||||
};
|
|
||||||
case PropelColumnTypes::DOUBLE:
|
|
||||||
case PropelColumnTypes::REAL:
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('9223372036854775807'))/mt_rand(1, intval('9223372036854775807'));
|
|
||||||
};
|
|
||||||
case PropelColumnTypes::CHAR:
|
|
||||||
case PropelColumnTypes::VARCHAR:
|
|
||||||
case PropelColumnTypes::BINARY:
|
|
||||||
case PropelColumnTypes::VARBINARY:
|
|
||||||
$size = $column->getSize();
|
|
||||||
|
|
||||||
return function () use ($generator, $size) {
|
|
||||||
return $generator->text($size);
|
|
||||||
};
|
|
||||||
case PropelColumnTypes::LONGVARCHAR:
|
|
||||||
case PropelColumnTypes::LONGVARBINARY:
|
|
||||||
case PropelColumnTypes::CLOB:
|
|
||||||
case PropelColumnTypes::CLOB_EMU:
|
|
||||||
case PropelColumnTypes::BLOB:
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->text;
|
|
||||||
};
|
|
||||||
case PropelColumnTypes::ENUM:
|
|
||||||
$valueSet = $column->getValueSet();
|
|
||||||
|
|
||||||
return function () use ($generator, $valueSet) {
|
|
||||||
return $generator->randomElement($valueSet);
|
|
||||||
};
|
|
||||||
case PropelColumnTypes::OBJECT:
|
|
||||||
case PropelColumnTypes::PHP_ARRAY:
|
|
||||||
default:
|
|
||||||
// no smart way to guess what the user expects here
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,191 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Propel;
|
|
||||||
|
|
||||||
use \Faker\Provider\Base;
|
|
||||||
use \ColumnMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service class for populating a table through a Propel ActiveRecord class.
|
|
||||||
*/
|
|
||||||
class EntityPopulator
|
|
||||||
{
|
|
||||||
protected $class;
|
|
||||||
protected $columnFormatters = array();
|
|
||||||
protected $modifiers = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class constructor.
|
|
||||||
*
|
|
||||||
* @param string $class A Propel ActiveRecord classname
|
|
||||||
*/
|
|
||||||
public function __construct($class)
|
|
||||||
{
|
|
||||||
$this->class = $class;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getClass()
|
|
||||||
{
|
|
||||||
return $this->class;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setColumnFormatters($columnFormatters)
|
|
||||||
{
|
|
||||||
$this->columnFormatters = $columnFormatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getColumnFormatters()
|
|
||||||
{
|
|
||||||
return $this->columnFormatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function mergeColumnFormattersWith($columnFormatters)
|
|
||||||
{
|
|
||||||
$this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function guessColumnFormatters(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$formatters = array();
|
|
||||||
$class = $this->class;
|
|
||||||
$peerClass = $class::PEER;
|
|
||||||
$tableMap = $peerClass::getTableMap();
|
|
||||||
$nameGuesser = new \Faker\Guesser\Name($generator);
|
|
||||||
$columnTypeGuesser = new \Faker\ORM\Propel\ColumnTypeGuesser($generator);
|
|
||||||
foreach ($tableMap->getColumns() as $columnMap) {
|
|
||||||
// skip behavior columns, handled by modifiers
|
|
||||||
if ($this->isColumnBehavior($columnMap)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($columnMap->isForeignKey()) {
|
|
||||||
$relatedClass = $columnMap->getRelation()->getForeignTable()->getClassname();
|
|
||||||
$formatters[$columnMap->getPhpName()] = function ($inserted) use ($relatedClass) {
|
|
||||||
return isset($inserted[$relatedClass]) ? $inserted[$relatedClass][mt_rand(0, count($inserted[$relatedClass]) - 1)] : null;
|
|
||||||
};
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($columnMap->isPrimaryKey()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($formatter = $nameGuesser->guessFormat($columnMap->getPhpName(), $columnMap->getSize())) {
|
|
||||||
$formatters[$columnMap->getPhpName()] = $formatter;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($formatter = $columnTypeGuesser->guessFormat($columnMap)) {
|
|
||||||
$formatters[$columnMap->getPhpName()] = $formatter;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $formatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param ColumnMap $columnMap
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
protected function isColumnBehavior(ColumnMap $columnMap)
|
|
||||||
{
|
|
||||||
foreach ($columnMap->getTable()->getBehaviors() as $name => $params) {
|
|
||||||
$columnName = Base::toLower($columnMap->getName());
|
|
||||||
switch ($name) {
|
|
||||||
case 'nested_set':
|
|
||||||
$columnNames = array($params['left_column'], $params['right_column'], $params['level_column']);
|
|
||||||
if (in_array($columnName, $columnNames)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'timestampable':
|
|
||||||
$columnNames = array($params['create_column'], $params['update_column']);
|
|
||||||
if (in_array($columnName, $columnNames)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setModifiers($modifiers)
|
|
||||||
{
|
|
||||||
$this->modifiers = $modifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getModifiers()
|
|
||||||
{
|
|
||||||
return $this->modifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function mergeModifiersWith($modifiers)
|
|
||||||
{
|
|
||||||
$this->modifiers = array_merge($this->modifiers, $modifiers);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function guessModifiers(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$modifiers = array();
|
|
||||||
$class = $this->class;
|
|
||||||
$peerClass = $class::PEER;
|
|
||||||
$tableMap = $peerClass::getTableMap();
|
|
||||||
foreach ($tableMap->getBehaviors() as $name => $params) {
|
|
||||||
switch ($name) {
|
|
||||||
case 'nested_set':
|
|
||||||
$modifiers['nested_set'] = function ($obj, $inserted) use ($class, $generator) {
|
|
||||||
if (isset($inserted[$class])) {
|
|
||||||
$queryClass = $class . 'Query';
|
|
||||||
$parent = $queryClass::create()->findPk($generator->randomElement($inserted[$class]));
|
|
||||||
$obj->insertAsLastChildOf($parent);
|
|
||||||
} else {
|
|
||||||
$obj->makeRoot();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
case 'sortable':
|
|
||||||
$modifiers['sortable'] = function ($obj, $inserted) use ($class) {
|
|
||||||
$maxRank = isset($inserted[$class]) ? count($inserted[$class]) : 0;
|
|
||||||
$obj->insertAtRank(mt_rand(1, $maxRank + 1));
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $modifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Insert one new record using the Entity class.
|
|
||||||
*/
|
|
||||||
public function execute($con, $insertedEntities)
|
|
||||||
{
|
|
||||||
$obj = new $this->class();
|
|
||||||
foreach ($this->getColumnFormatters() as $column => $format) {
|
|
||||||
if (null !== $format) {
|
|
||||||
$obj->setByName($column, is_callable($format) ? $format($insertedEntities, $obj) : $format);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($this->getModifiers() as $modifier) {
|
|
||||||
$modifier($obj, $insertedEntities);
|
|
||||||
}
|
|
||||||
$obj->save($con);
|
|
||||||
|
|
||||||
return $obj->getPrimaryKey();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,89 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Propel;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service class for populating a database using the Propel ORM.
|
|
||||||
* A Populator can populate several tables using ActiveRecord classes.
|
|
||||||
*/
|
|
||||||
class Populator
|
|
||||||
{
|
|
||||||
protected $generator;
|
|
||||||
protected $entities = array();
|
|
||||||
protected $quantities = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
*/
|
|
||||||
public function __construct(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add an order for the generation of $number records for $entity.
|
|
||||||
*
|
|
||||||
* @param mixed $entity A Propel ActiveRecord classname, or a \Faker\ORM\Propel\EntityPopulator instance
|
|
||||||
* @param int $number The number of entities to populate
|
|
||||||
*/
|
|
||||||
public function addEntity($entity, $number, $customColumnFormatters = array(), $customModifiers = array())
|
|
||||||
{
|
|
||||||
if (!$entity instanceof \Faker\ORM\Propel\EntityPopulator) {
|
|
||||||
$entity = new \Faker\ORM\Propel\EntityPopulator($entity);
|
|
||||||
}
|
|
||||||
$entity->setColumnFormatters($entity->guessColumnFormatters($this->generator));
|
|
||||||
if ($customColumnFormatters) {
|
|
||||||
$entity->mergeColumnFormattersWith($customColumnFormatters);
|
|
||||||
}
|
|
||||||
$entity->setModifiers($entity->guessModifiers($this->generator));
|
|
||||||
if ($customModifiers) {
|
|
||||||
$entity->mergeModifiersWith($customModifiers);
|
|
||||||
}
|
|
||||||
$class = $entity->getClass();
|
|
||||||
$this->entities[$class] = $entity;
|
|
||||||
$this->quantities[$class] = $number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Populate the database using all the Entity classes previously added.
|
|
||||||
*
|
|
||||||
* @param PropelPDO $con A Propel connection object
|
|
||||||
*
|
|
||||||
* @return array A list of the inserted PKs
|
|
||||||
*/
|
|
||||||
public function execute($con = null)
|
|
||||||
{
|
|
||||||
if (null === $con) {
|
|
||||||
$con = $this->getConnection();
|
|
||||||
}
|
|
||||||
$isInstancePoolingEnabled = \Propel::isInstancePoolingEnabled();
|
|
||||||
\Propel::disableInstancePooling();
|
|
||||||
$insertedEntities = array();
|
|
||||||
$con->beginTransaction();
|
|
||||||
foreach ($this->quantities as $class => $number) {
|
|
||||||
for ($i=0; $i < $number; $i++) {
|
|
||||||
$insertedEntities[$class][]= $this->entities[$class]->execute($con, $insertedEntities);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$con->commit();
|
|
||||||
if ($isInstancePoolingEnabled) {
|
|
||||||
\Propel::enableInstancePooling();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $insertedEntities;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getConnection()
|
|
||||||
{
|
|
||||||
// use the first connection available
|
|
||||||
$class = key($this->entities);
|
|
||||||
|
|
||||||
if (!$class) {
|
|
||||||
throw new \RuntimeException('No class found from entities. Did you add entities to the Populator ?');
|
|
||||||
}
|
|
||||||
|
|
||||||
$peer = $class::PEER;
|
|
||||||
|
|
||||||
return \Propel::getConnection($peer::DATABASE_NAME, \Propel::CONNECTION_WRITE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,107 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Propel2;
|
|
||||||
|
|
||||||
use \Propel\Generator\Model\PropelTypes;
|
|
||||||
use \Propel\Runtime\Map\ColumnMap;
|
|
||||||
|
|
||||||
class ColumnTypeGuesser
|
|
||||||
{
|
|
||||||
protected $generator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
*/
|
|
||||||
public function __construct(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param ColumnMap $column
|
|
||||||
* @return \Closure|null
|
|
||||||
*/
|
|
||||||
public function guessFormat(ColumnMap $column)
|
|
||||||
{
|
|
||||||
$generator = $this->generator;
|
|
||||||
if ($column->isTemporal()) {
|
|
||||||
if ($column->getType() == PropelTypes::BU_DATE || $column->getType() == PropelTypes::BU_TIMESTAMP) {
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->dateTime;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->dateTimeAD;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
$type = $column->getType();
|
|
||||||
switch ($type) {
|
|
||||||
case PropelTypes::BOOLEAN:
|
|
||||||
case PropelTypes::BOOLEAN_EMU:
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->boolean;
|
|
||||||
};
|
|
||||||
case PropelTypes::NUMERIC:
|
|
||||||
case PropelTypes::DECIMAL:
|
|
||||||
$size = $column->getSize();
|
|
||||||
|
|
||||||
return function () use ($generator, $size) {
|
|
||||||
return $generator->randomNumber($size + 2) / 100;
|
|
||||||
};
|
|
||||||
case PropelTypes::TINYINT:
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, 127);
|
|
||||||
};
|
|
||||||
case PropelTypes::SMALLINT:
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, 32767);
|
|
||||||
};
|
|
||||||
case PropelTypes::INTEGER:
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('2147483647'));
|
|
||||||
};
|
|
||||||
case PropelTypes::BIGINT:
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('9223372036854775807'));
|
|
||||||
};
|
|
||||||
case PropelTypes::FLOAT:
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('2147483647'))/mt_rand(1, intval('2147483647'));
|
|
||||||
};
|
|
||||||
case PropelTypes::DOUBLE:
|
|
||||||
case PropelTypes::REAL:
|
|
||||||
return function () {
|
|
||||||
return mt_rand(0, intval('9223372036854775807'))/mt_rand(1, intval('9223372036854775807'));
|
|
||||||
};
|
|
||||||
case PropelTypes::CHAR:
|
|
||||||
case PropelTypes::VARCHAR:
|
|
||||||
case PropelTypes::BINARY:
|
|
||||||
case PropelTypes::VARBINARY:
|
|
||||||
$size = $column->getSize();
|
|
||||||
|
|
||||||
return function () use ($generator, $size) {
|
|
||||||
return $generator->text($size);
|
|
||||||
};
|
|
||||||
case PropelTypes::LONGVARCHAR:
|
|
||||||
case PropelTypes::LONGVARBINARY:
|
|
||||||
case PropelTypes::CLOB:
|
|
||||||
case PropelTypes::CLOB_EMU:
|
|
||||||
case PropelTypes::BLOB:
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->text;
|
|
||||||
};
|
|
||||||
case PropelTypes::ENUM:
|
|
||||||
$valueSet = $column->getValueSet();
|
|
||||||
|
|
||||||
return function () use ($generator, $valueSet) {
|
|
||||||
return $generator->randomElement($valueSet);
|
|
||||||
};
|
|
||||||
case PropelTypes::OBJECT:
|
|
||||||
case PropelTypes::PHP_ARRAY:
|
|
||||||
default:
|
|
||||||
// no smart way to guess what the user expects here
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,192 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Propel2;
|
|
||||||
|
|
||||||
use \Faker\Provider\Base;
|
|
||||||
use \Propel\Runtime\Map\ColumnMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service class for populating a table through a Propel ActiveRecord class.
|
|
||||||
*/
|
|
||||||
class EntityPopulator
|
|
||||||
{
|
|
||||||
protected $class;
|
|
||||||
protected $columnFormatters = array();
|
|
||||||
protected $modifiers = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class constructor.
|
|
||||||
*
|
|
||||||
* @param string $class A Propel ActiveRecord classname
|
|
||||||
*/
|
|
||||||
public function __construct($class)
|
|
||||||
{
|
|
||||||
$this->class = $class;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getClass()
|
|
||||||
{
|
|
||||||
return $this->class;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setColumnFormatters($columnFormatters)
|
|
||||||
{
|
|
||||||
$this->columnFormatters = $columnFormatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getColumnFormatters()
|
|
||||||
{
|
|
||||||
return $this->columnFormatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function mergeColumnFormattersWith($columnFormatters)
|
|
||||||
{
|
|
||||||
$this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function guessColumnFormatters(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$formatters = array();
|
|
||||||
$class = $this->class;
|
|
||||||
$peerClass = $class::TABLE_MAP;
|
|
||||||
$tableMap = $peerClass::getTableMap();
|
|
||||||
$nameGuesser = new \Faker\Guesser\Name($generator);
|
|
||||||
$columnTypeGuesser = new \Faker\ORM\Propel2\ColumnTypeGuesser($generator);
|
|
||||||
foreach ($tableMap->getColumns() as $columnMap) {
|
|
||||||
// skip behavior columns, handled by modifiers
|
|
||||||
if ($this->isColumnBehavior($columnMap)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($columnMap->isForeignKey()) {
|
|
||||||
$relatedClass = $columnMap->getRelation()->getForeignTable()->getClassname();
|
|
||||||
$formatters[$columnMap->getPhpName()] = function ($inserted) use ($relatedClass) {
|
|
||||||
$relatedClass = trim($relatedClass, "\\");
|
|
||||||
return isset($inserted[$relatedClass]) ? $inserted[$relatedClass][mt_rand(0, count($inserted[$relatedClass]) - 1)] : null;
|
|
||||||
};
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($columnMap->isPrimaryKey()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($formatter = $nameGuesser->guessFormat($columnMap->getPhpName(), $columnMap->getSize())) {
|
|
||||||
$formatters[$columnMap->getPhpName()] = $formatter;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($formatter = $columnTypeGuesser->guessFormat($columnMap)) {
|
|
||||||
$formatters[$columnMap->getPhpName()] = $formatter;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $formatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param ColumnMap $columnMap
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
protected function isColumnBehavior(ColumnMap $columnMap)
|
|
||||||
{
|
|
||||||
foreach ($columnMap->getTable()->getBehaviors() as $name => $params) {
|
|
||||||
$columnName = Base::toLower($columnMap->getName());
|
|
||||||
switch ($name) {
|
|
||||||
case 'nested_set':
|
|
||||||
$columnNames = array($params['left_column'], $params['right_column'], $params['level_column']);
|
|
||||||
if (in_array($columnName, $columnNames)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'timestampable':
|
|
||||||
$columnNames = array($params['create_column'], $params['update_column']);
|
|
||||||
if (in_array($columnName, $columnNames)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setModifiers($modifiers)
|
|
||||||
{
|
|
||||||
$this->modifiers = $modifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getModifiers()
|
|
||||||
{
|
|
||||||
return $this->modifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function mergeModifiersWith($modifiers)
|
|
||||||
{
|
|
||||||
$this->modifiers = array_merge($this->modifiers, $modifiers);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function guessModifiers(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$modifiers = array();
|
|
||||||
$class = $this->class;
|
|
||||||
$peerClass = $class::TABLE_MAP;
|
|
||||||
$tableMap = $peerClass::getTableMap();
|
|
||||||
foreach ($tableMap->getBehaviors() as $name => $params) {
|
|
||||||
switch ($name) {
|
|
||||||
case 'nested_set':
|
|
||||||
$modifiers['nested_set'] = function ($obj, $inserted) use ($class, $generator) {
|
|
||||||
if (isset($inserted[$class])) {
|
|
||||||
$queryClass = $class . 'Query';
|
|
||||||
$parent = $queryClass::create()->findPk($generator->randomElement($inserted[$class]));
|
|
||||||
$obj->insertAsLastChildOf($parent);
|
|
||||||
} else {
|
|
||||||
$obj->makeRoot();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
case 'sortable':
|
|
||||||
$modifiers['sortable'] = function ($obj, $inserted) use ($class) {
|
|
||||||
$maxRank = isset($inserted[$class]) ? count($inserted[$class]) : 0;
|
|
||||||
$obj->insertAtRank(mt_rand(1, $maxRank + 1));
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $modifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Insert one new record using the Entity class.
|
|
||||||
*/
|
|
||||||
public function execute($con, $insertedEntities)
|
|
||||||
{
|
|
||||||
$obj = new $this->class();
|
|
||||||
foreach ($this->getColumnFormatters() as $column => $format) {
|
|
||||||
if (null !== $format) {
|
|
||||||
$obj->setByName($column, is_callable($format) ? $format($insertedEntities, $obj) : $format);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($this->getModifiers() as $modifier) {
|
|
||||||
$modifier($obj, $insertedEntities);
|
|
||||||
}
|
|
||||||
$obj->save($con);
|
|
||||||
|
|
||||||
return $obj->getPrimaryKey();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,92 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Propel2;
|
|
||||||
|
|
||||||
use Propel\Runtime\Propel;
|
|
||||||
use Propel\Runtime\ServiceContainer\ServiceContainerInterface;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service class for populating a database using the Propel ORM.
|
|
||||||
* A Populator can populate several tables using ActiveRecord classes.
|
|
||||||
*/
|
|
||||||
class Populator
|
|
||||||
{
|
|
||||||
protected $generator;
|
|
||||||
protected $entities = array();
|
|
||||||
protected $quantities = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
*/
|
|
||||||
public function __construct(\Faker\Generator $generator)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add an order for the generation of $number records for $entity.
|
|
||||||
*
|
|
||||||
* @param mixed $entity A Propel ActiveRecord classname, or a \Faker\ORM\Propel2\EntityPopulator instance
|
|
||||||
* @param int $number The number of entities to populate
|
|
||||||
*/
|
|
||||||
public function addEntity($entity, $number, $customColumnFormatters = array(), $customModifiers = array())
|
|
||||||
{
|
|
||||||
if (!$entity instanceof \Faker\ORM\Propel2\EntityPopulator) {
|
|
||||||
$entity = new \Faker\ORM\Propel2\EntityPopulator($entity);
|
|
||||||
}
|
|
||||||
$entity->setColumnFormatters($entity->guessColumnFormatters($this->generator));
|
|
||||||
if ($customColumnFormatters) {
|
|
||||||
$entity->mergeColumnFormattersWith($customColumnFormatters);
|
|
||||||
}
|
|
||||||
$entity->setModifiers($entity->guessModifiers($this->generator));
|
|
||||||
if ($customModifiers) {
|
|
||||||
$entity->mergeModifiersWith($customModifiers);
|
|
||||||
}
|
|
||||||
$class = $entity->getClass();
|
|
||||||
$this->entities[$class] = $entity;
|
|
||||||
$this->quantities[$class] = $number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Populate the database using all the Entity classes previously added.
|
|
||||||
*
|
|
||||||
* @param PropelPDO $con A Propel connection object
|
|
||||||
*
|
|
||||||
* @return array A list of the inserted PKs
|
|
||||||
*/
|
|
||||||
public function execute($con = null)
|
|
||||||
{
|
|
||||||
if (null === $con) {
|
|
||||||
$con = $this->getConnection();
|
|
||||||
}
|
|
||||||
$isInstancePoolingEnabled = Propel::isInstancePoolingEnabled();
|
|
||||||
Propel::disableInstancePooling();
|
|
||||||
$insertedEntities = array();
|
|
||||||
$con->beginTransaction();
|
|
||||||
foreach ($this->quantities as $class => $number) {
|
|
||||||
for ($i=0; $i < $number; $i++) {
|
|
||||||
$insertedEntities[$class][]= $this->entities[$class]->execute($con, $insertedEntities);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$con->commit();
|
|
||||||
if ($isInstancePoolingEnabled) {
|
|
||||||
Propel::enableInstancePooling();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $insertedEntities;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getConnection()
|
|
||||||
{
|
|
||||||
// use the first connection available
|
|
||||||
$class = key($this->entities);
|
|
||||||
|
|
||||||
if (!$class) {
|
|
||||||
throw new \RuntimeException('No class found from entities. Did you add entities to the Populator ?');
|
|
||||||
}
|
|
||||||
|
|
||||||
$peer = $class::TABLE_MAP;
|
|
||||||
|
|
||||||
return Propel::getConnection($peer::DATABASE_NAME, ServiceContainerInterface::CONNECTION_WRITE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Spot;
|
|
||||||
|
|
||||||
use Faker\Generator;
|
|
||||||
|
|
||||||
class ColumnTypeGuesser
|
|
||||||
{
|
|
||||||
protected $generator;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ColumnTypeGuesser constructor.
|
|
||||||
* @param Generator $generator
|
|
||||||
*/
|
|
||||||
public function __construct(Generator $generator)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $field
|
|
||||||
* @return \Closure|null
|
|
||||||
*/
|
|
||||||
public function guessFormat(array $field)
|
|
||||||
{
|
|
||||||
$generator = $this->generator;
|
|
||||||
$type = $field['type'];
|
|
||||||
switch ($type) {
|
|
||||||
case 'boolean':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->boolean;
|
|
||||||
};
|
|
||||||
case 'decimal':
|
|
||||||
$size = isset($field['precision']) ? $field['precision'] : 2;
|
|
||||||
|
|
||||||
return function () use ($generator, $size) {
|
|
||||||
return $generator->randomNumber($size + 2) / 100;
|
|
||||||
};
|
|
||||||
case 'smallint':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->numberBetween(0, 65535);
|
|
||||||
};
|
|
||||||
case 'integer':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->numberBetween(0, intval('2147483647'));
|
|
||||||
};
|
|
||||||
case 'bigint':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->numberBetween(0, intval('18446744073709551615'));
|
|
||||||
};
|
|
||||||
case 'float':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->randomFloat(null, 0, intval('4294967295'));
|
|
||||||
};
|
|
||||||
case 'string':
|
|
||||||
$size = isset($field['length']) ? $field['length'] : 255;
|
|
||||||
|
|
||||||
return function () use ($generator, $size) {
|
|
||||||
return $generator->text($size);
|
|
||||||
};
|
|
||||||
case 'text':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->text;
|
|
||||||
};
|
|
||||||
case 'datetime':
|
|
||||||
case 'date':
|
|
||||||
case 'time':
|
|
||||||
return function () use ($generator) {
|
|
||||||
return $generator->datetime;
|
|
||||||
};
|
|
||||||
default:
|
|
||||||
// no smart way to guess what the user expects here
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,219 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\ORM\Spot;
|
|
||||||
|
|
||||||
use Faker\Generator;
|
|
||||||
use Faker\Guesser\Name;
|
|
||||||
use Spot\Locator;
|
|
||||||
use Spot\Mapper;
|
|
||||||
use Spot\Relation\BelongsTo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service class for populating a table through a Spot Entity class.
|
|
||||||
*/
|
|
||||||
class EntityPopulator
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* When fetching existing data - fetch only few first rows.
|
|
||||||
*/
|
|
||||||
const RELATED_FETCH_COUNT = 10;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Mapper
|
|
||||||
*/
|
|
||||||
protected $mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Locator
|
|
||||||
*/
|
|
||||||
protected $locator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $columnFormatters = array();
|
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $modifiers = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
protected $useExistingData = false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class constructor.
|
|
||||||
*
|
|
||||||
* @param Mapper $mapper
|
|
||||||
* @param Locator $locator
|
|
||||||
* @param $useExistingData
|
|
||||||
*/
|
|
||||||
public function __construct(Mapper $mapper, Locator $locator, $useExistingData = false)
|
|
||||||
{
|
|
||||||
$this->mapper = $mapper;
|
|
||||||
$this->locator = $locator;
|
|
||||||
$this->useExistingData = $useExistingData;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getMapper()
|
|
||||||
{
|
|
||||||
return $this->mapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $columnFormatters
|
|
||||||
*/
|
|
||||||
public function setColumnFormatters($columnFormatters)
|
|
||||||
{
|
|
||||||
$this->columnFormatters = $columnFormatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getColumnFormatters()
|
|
||||||
{
|
|
||||||
return $this->columnFormatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $columnFormatters
|
|
||||||
*/
|
|
||||||
public function mergeColumnFormattersWith($columnFormatters)
|
|
||||||
{
|
|
||||||
$this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $modifiers
|
|
||||||
*/
|
|
||||||
public function setModifiers(array $modifiers)
|
|
||||||
{
|
|
||||||
$this->modifiers = $modifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getModifiers()
|
|
||||||
{
|
|
||||||
return $this->modifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $modifiers
|
|
||||||
*/
|
|
||||||
public function mergeModifiersWith(array $modifiers)
|
|
||||||
{
|
|
||||||
$this->modifiers = array_merge($this->modifiers, $modifiers);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Generator $generator
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function guessColumnFormatters(Generator $generator)
|
|
||||||
{
|
|
||||||
$formatters = array();
|
|
||||||
$nameGuesser = new Name($generator);
|
|
||||||
$columnTypeGuesser = new ColumnTypeGuesser($generator);
|
|
||||||
$fields = $this->mapper->fields();
|
|
||||||
foreach ($fields as $fieldName => $field) {
|
|
||||||
if ($field['primary'] === true) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($formatter = $nameGuesser->guessFormat($fieldName)) {
|
|
||||||
$formatters[$fieldName] = $formatter;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($formatter = $columnTypeGuesser->guessFormat($field)) {
|
|
||||||
$formatters[$fieldName] = $formatter;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$entityName = $this->mapper->entity();
|
|
||||||
$entity = $this->mapper->build([]);
|
|
||||||
$relations = $entityName::relations($this->mapper, $entity);
|
|
||||||
foreach ($relations as $relation) {
|
|
||||||
// We don't need any other relation here.
|
|
||||||
if ($relation instanceof BelongsTo) {
|
|
||||||
$fieldName = $relation->localKey();
|
|
||||||
$entityName = $relation->entityName();
|
|
||||||
$field = $fields[$fieldName];
|
|
||||||
$required = $field['required'];
|
|
||||||
|
|
||||||
$locator = $this->locator;
|
|
||||||
|
|
||||||
$formatters[$fieldName] = function ($inserted) use ($required, $entityName, $locator) {
|
|
||||||
if (!empty($inserted[$entityName])) {
|
|
||||||
return $inserted[$entityName][mt_rand(0, count($inserted[$entityName]) - 1)]->get('id');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($required && $this->useExistingData) {
|
|
||||||
// We did not add anything like this, but it's required,
|
|
||||||
// So let's find something existing in DB.
|
|
||||||
$mapper = $locator->mapper($entityName);
|
|
||||||
$records = $mapper->all()->limit(self::RELATED_FETCH_COUNT)->toArray();
|
|
||||||
if (empty($records)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $records[mt_rand(0, count($records) - 1)]['id'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $formatters;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Insert one new record using the Entity class.
|
|
||||||
*
|
|
||||||
* @param $insertedEntities
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function execute($insertedEntities)
|
|
||||||
{
|
|
||||||
$obj = $this->mapper->build([]);
|
|
||||||
|
|
||||||
$this->fillColumns($obj, $insertedEntities);
|
|
||||||
$this->callMethods($obj, $insertedEntities);
|
|
||||||
|
|
||||||
$this->mapper->insert($obj);
|
|
||||||
|
|
||||||
|
|
||||||
return $obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $obj
|
|
||||||
* @param $insertedEntities
|
|
||||||
*/
|
|
||||||
private function fillColumns($obj, $insertedEntities)
|
|
||||||
{
|
|
||||||
foreach ($this->columnFormatters as $field => $format) {
|
|
||||||
if (null !== $format) {
|
|
||||||
$value = is_callable($format) ? $format($insertedEntities, $obj) : $format;
|
|
||||||
$obj->set($field, $value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $obj
|
|
||||||
* @param $insertedEntities
|
|
||||||
*/
|
|
||||||
private function callMethods($obj, $insertedEntities)
|
|
||||||
{
|
|
||||||
foreach ($this->getModifiers() as $modifier) {
|
|
||||||
$modifier($obj, $insertedEntities);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,88 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
namespace Faker\ORM\Spot;
|
|
||||||
|
|
||||||
use Spot\Locator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service class for populating a database using the Spot ORM.
|
|
||||||
*/
|
|
||||||
class Populator
|
|
||||||
{
|
|
||||||
protected $generator;
|
|
||||||
protected $locator;
|
|
||||||
protected $entities = array();
|
|
||||||
protected $quantities = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Populator constructor.
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
* @param Locator|null $locator
|
|
||||||
*/
|
|
||||||
public function __construct(\Faker\Generator $generator, Locator $locator = null)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
$this->locator = $locator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add an order for the generation of $number records for $entity.
|
|
||||||
*
|
|
||||||
* @param $entityName string Name of Entity object to generate
|
|
||||||
* @param $number int The number of entities to populate
|
|
||||||
* @param $customColumnFormatters array
|
|
||||||
* @param $customModifiers array
|
|
||||||
* @param $useExistingData bool Should we use existing rows (e.g. roles) to populate relations?
|
|
||||||
*/
|
|
||||||
public function addEntity(
|
|
||||||
$entityName,
|
|
||||||
$number,
|
|
||||||
$customColumnFormatters = array(),
|
|
||||||
$customModifiers = array(),
|
|
||||||
$useExistingData = false
|
|
||||||
) {
|
|
||||||
$mapper = $this->locator->mapper($entityName);
|
|
||||||
if (null === $mapper) {
|
|
||||||
throw new \InvalidArgumentException("No mapper can be found for entity " . $entityName);
|
|
||||||
}
|
|
||||||
$entity = new EntityPopulator($mapper, $this->locator, $useExistingData);
|
|
||||||
|
|
||||||
$entity->setColumnFormatters($entity->guessColumnFormatters($this->generator));
|
|
||||||
if ($customColumnFormatters) {
|
|
||||||
$entity->mergeColumnFormattersWith($customColumnFormatters);
|
|
||||||
}
|
|
||||||
$entity->mergeModifiersWith($customModifiers);
|
|
||||||
|
|
||||||
$this->entities[$entityName] = $entity;
|
|
||||||
$this->quantities[$entityName] = $number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Populate the database using all the Entity classes previously added.
|
|
||||||
*
|
|
||||||
* @param Locator $locator A Spot locator
|
|
||||||
*
|
|
||||||
* @return array A list of the inserted PKs
|
|
||||||
*/
|
|
||||||
public function execute($locator = null)
|
|
||||||
{
|
|
||||||
if (null === $locator) {
|
|
||||||
$locator = $this->locator;
|
|
||||||
}
|
|
||||||
if (null === $locator) {
|
|
||||||
throw new \InvalidArgumentException("No entity manager passed to Spot Populator.");
|
|
||||||
}
|
|
||||||
|
|
||||||
$insertedEntities = array();
|
|
||||||
foreach ($this->quantities as $entityName => $number) {
|
|
||||||
for ($i = 0; $i < $number; $i++) {
|
|
||||||
$insertedEntities[$entityName][] = $this->entities[$entityName]->execute(
|
|
||||||
$insertedEntities
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $insertedEntities;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,139 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
class Address extends Base
|
|
||||||
{
|
|
||||||
protected static $citySuffix = array('Ville');
|
|
||||||
protected static $streetSuffix = array('Street');
|
|
||||||
protected static $cityFormats = array(
|
|
||||||
'{{firstName}}{{citySuffix}}',
|
|
||||||
);
|
|
||||||
protected static $streetNameFormats = array(
|
|
||||||
'{{lastName}} {{streetSuffix}}'
|
|
||||||
);
|
|
||||||
protected static $streetAddressFormats = array(
|
|
||||||
'{{buildingNumber}} {{streetName}}'
|
|
||||||
);
|
|
||||||
protected static $addressFormats = array(
|
|
||||||
'{{streetAddress}} {{postcode}} {{city}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $buildingNumber = array('%#');
|
|
||||||
protected static $postcode = array('#####');
|
|
||||||
protected static $country = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'town'
|
|
||||||
*/
|
|
||||||
public static function citySuffix()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$citySuffix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'Avenue'
|
|
||||||
*/
|
|
||||||
public static function streetSuffix()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$streetSuffix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '791'
|
|
||||||
*/
|
|
||||||
public static function buildingNumber()
|
|
||||||
{
|
|
||||||
return static::numerify(static::randomElement(static::$buildingNumber));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'Sashabury'
|
|
||||||
*/
|
|
||||||
public function city()
|
|
||||||
{
|
|
||||||
$format = static::randomElement(static::$cityFormats);
|
|
||||||
|
|
||||||
return $this->generator->parse($format);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'Crist Parks'
|
|
||||||
*/
|
|
||||||
public function streetName()
|
|
||||||
{
|
|
||||||
$format = static::randomElement(static::$streetNameFormats);
|
|
||||||
|
|
||||||
return $this->generator->parse($format);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '791 Crist Parks'
|
|
||||||
*/
|
|
||||||
public function streetAddress()
|
|
||||||
{
|
|
||||||
$format = static::randomElement(static::$streetAddressFormats);
|
|
||||||
|
|
||||||
return $this->generator->parse($format);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 86039-9874
|
|
||||||
*/
|
|
||||||
public static function postcode()
|
|
||||||
{
|
|
||||||
return static::toUpper(static::bothify(static::randomElement(static::$postcode)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '791 Crist Parks, Sashabury, IL 86039-9874'
|
|
||||||
*/
|
|
||||||
public function address()
|
|
||||||
{
|
|
||||||
$format = static::randomElement(static::$addressFormats);
|
|
||||||
|
|
||||||
return $this->generator->parse($format);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'Japan'
|
|
||||||
*/
|
|
||||||
public static function country()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$country);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '77.147489'
|
|
||||||
* @param float|int $min
|
|
||||||
* @param float|int $max
|
|
||||||
* @return float Uses signed degrees format (returns a float number between -90 and 90)
|
|
||||||
*/
|
|
||||||
public static function latitude($min = -90, $max = 90)
|
|
||||||
{
|
|
||||||
return static::randomFloat(6, $min, $max);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '86.211205'
|
|
||||||
* @param float|int $min
|
|
||||||
* @param float|int $max
|
|
||||||
* @return float Uses signed degrees format (returns a float number between -180 and 180)
|
|
||||||
*/
|
|
||||||
public static function longitude($min = -180, $max = 180)
|
|
||||||
{
|
|
||||||
return static::randomFloat(6, $min, $max);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example array('77.147489', '86.211205')
|
|
||||||
* @return array | latitude, longitude
|
|
||||||
*/
|
|
||||||
public static function localCoordinates()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
'latitude' => static::latitude(),
|
|
||||||
'longitude' => static::longitude()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,114 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see http://en.wikipedia.org/wiki/EAN-13
|
|
||||||
* @see http://en.wikipedia.org/wiki/ISBN
|
|
||||||
*/
|
|
||||||
class Barcode extends Base
|
|
||||||
{
|
|
||||||
private function ean($length = 13)
|
|
||||||
{
|
|
||||||
$code = static::numerify(str_repeat('#', $length - 1));
|
|
||||||
|
|
||||||
return $code . static::eanChecksum($code);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Utility function for computing EAN checksums
|
|
||||||
*
|
|
||||||
* @param string $input
|
|
||||||
*
|
|
||||||
* @return integer
|
|
||||||
*/
|
|
||||||
protected static function eanChecksum($input)
|
|
||||||
{
|
|
||||||
$sequence = (strlen($input) + 1) === 8 ? array(3, 1) : array(1, 3);
|
|
||||||
$sums = 0;
|
|
||||||
foreach (str_split($input) as $n => $digit) {
|
|
||||||
$sums += $digit * $sequence[$n % 2];
|
|
||||||
}
|
|
||||||
return (10 - $sums % 10) % 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ISBN-10 check digit
|
|
||||||
* @link http://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digits
|
|
||||||
*
|
|
||||||
* @param string $input ISBN without check-digit
|
|
||||||
* @throws \LengthException When wrong input length passed
|
|
||||||
*
|
|
||||||
* @return integer Check digit
|
|
||||||
*/
|
|
||||||
protected static function isbnChecksum($input)
|
|
||||||
{
|
|
||||||
// We're calculating check digit for ISBN-10
|
|
||||||
// so, the length of the input should be 9
|
|
||||||
$length = 9;
|
|
||||||
|
|
||||||
if (strlen($input) !== $length) {
|
|
||||||
throw new \LengthException(sprintf('Input length should be equal to %d', $length));
|
|
||||||
}
|
|
||||||
|
|
||||||
$digits = str_split($input);
|
|
||||||
array_walk(
|
|
||||||
$digits,
|
|
||||||
function (&$digit, $position) {
|
|
||||||
$digit = (10 - $position) * $digit;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
$result = (11 - array_sum($digits) % 11) % 11;
|
|
||||||
|
|
||||||
// 10 is replaced by X
|
|
||||||
return ($result < 10)?$result:'X';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a random EAN13 barcode.
|
|
||||||
* @return string
|
|
||||||
* @example '4006381333931'
|
|
||||||
*/
|
|
||||||
public function ean13()
|
|
||||||
{
|
|
||||||
return $this->ean(13);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a random EAN8 barcode.
|
|
||||||
* @return string
|
|
||||||
* @example '73513537'
|
|
||||||
*/
|
|
||||||
public function ean8()
|
|
||||||
{
|
|
||||||
return $this->ean(8);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a random ISBN-10 code
|
|
||||||
* @link http://en.wikipedia.org/wiki/International_Standard_Book_Number
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* @example '4881416324'
|
|
||||||
*/
|
|
||||||
public function isbn10()
|
|
||||||
{
|
|
||||||
$code = static::numerify(str_repeat('#', 9));
|
|
||||||
|
|
||||||
return $code . static::isbnChecksum($code);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a random ISBN-13 code
|
|
||||||
* @link http://en.wikipedia.org/wiki/International_Standard_Book_Number
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* @example '9790404436093'
|
|
||||||
*/
|
|
||||||
public function isbn13()
|
|
||||||
{
|
|
||||||
$code = '97' . static::numberBetween(8, 9) . static::numerify(str_repeat('#', 9));
|
|
||||||
|
|
||||||
return $code . static::eanChecksum($code);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,612 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
use Faker\Generator;
|
|
||||||
use Faker\DefaultGenerator;
|
|
||||||
use Faker\UniqueGenerator;
|
|
||||||
use Faker\ValidGenerator;
|
|
||||||
|
|
||||||
class Base
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var \Faker\Generator
|
|
||||||
*/
|
|
||||||
protected $generator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var \Faker\UniqueGenerator
|
|
||||||
*/
|
|
||||||
protected $unique;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Faker\Generator $generator
|
|
||||||
*/
|
|
||||||
public function __construct(Generator $generator)
|
|
||||||
{
|
|
||||||
$this->generator = $generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a random number between 0 and 9
|
|
||||||
*
|
|
||||||
* @return integer
|
|
||||||
*/
|
|
||||||
public static function randomDigit()
|
|
||||||
{
|
|
||||||
return mt_rand(0, 9);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a random number between 1 and 9
|
|
||||||
*
|
|
||||||
* @return integer
|
|
||||||
*/
|
|
||||||
public static function randomDigitNotNull()
|
|
||||||
{
|
|
||||||
return mt_rand(1, 9);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generates a random digit, which cannot be $except
|
|
||||||
*
|
|
||||||
* @param int $except
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public static function randomDigitNot($except)
|
|
||||||
{
|
|
||||||
$result = self::numberBetween(0, 8);
|
|
||||||
if ($result >= $except) {
|
|
||||||
$result++;
|
|
||||||
}
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a random integer with 0 to $nbDigits digits.
|
|
||||||
*
|
|
||||||
* The maximum value returned is mt_getrandmax()
|
|
||||||
*
|
|
||||||
* @param integer $nbDigits Defaults to a random number between 1 and 9
|
|
||||||
* @param boolean $strict Whether the returned number should have exactly $nbDigits
|
|
||||||
* @example 79907610
|
|
||||||
*
|
|
||||||
* @return integer
|
|
||||||
*/
|
|
||||||
public static function randomNumber($nbDigits = null, $strict = false)
|
|
||||||
{
|
|
||||||
if (!is_bool($strict)) {
|
|
||||||
throw new \InvalidArgumentException('randomNumber() generates numbers of fixed width. To generate numbers between two boundaries, use numberBetween() instead.');
|
|
||||||
}
|
|
||||||
if (null === $nbDigits) {
|
|
||||||
$nbDigits = static::randomDigitNotNull();
|
|
||||||
}
|
|
||||||
$max = pow(10, $nbDigits) - 1;
|
|
||||||
if ($max > mt_getrandmax()) {
|
|
||||||
throw new \InvalidArgumentException('randomNumber() can only generate numbers up to mt_getrandmax()');
|
|
||||||
}
|
|
||||||
if ($strict) {
|
|
||||||
return mt_rand(pow(10, $nbDigits - 1), $max);
|
|
||||||
}
|
|
||||||
|
|
||||||
return mt_rand(0, $max);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return a random float number
|
|
||||||
*
|
|
||||||
* @param int $nbMaxDecimals
|
|
||||||
* @param int|float $min
|
|
||||||
* @param int|float $max
|
|
||||||
* @example 48.8932
|
|
||||||
*
|
|
||||||
* @return float
|
|
||||||
*/
|
|
||||||
public static function randomFloat($nbMaxDecimals = null, $min = 0, $max = null)
|
|
||||||
{
|
|
||||||
if (null === $nbMaxDecimals) {
|
|
||||||
$nbMaxDecimals = static::randomDigit();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null === $max) {
|
|
||||||
$max = static::randomNumber();
|
|
||||||
if ($min > $max) {
|
|
||||||
$max = $min;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($min > $max) {
|
|
||||||
$tmp = $min;
|
|
||||||
$min = $max;
|
|
||||||
$max = $tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
return round($min + mt_rand() / mt_getrandmax() * ($max - $min), $nbMaxDecimals);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a random number between $int1 and $int2 (any order)
|
|
||||||
*
|
|
||||||
* @param integer $int1 default to 0
|
|
||||||
* @param integer $int2 defaults to 32 bit max integer, ie 2147483647
|
|
||||||
* @example 79907610
|
|
||||||
*
|
|
||||||
* @return integer
|
|
||||||
*/
|
|
||||||
public static function numberBetween($int1 = 0, $int2 = 2147483647)
|
|
||||||
{
|
|
||||||
$min = $int1 < $int2 ? $int1 : $int2;
|
|
||||||
$max = $int1 < $int2 ? $int2 : $int1;
|
|
||||||
return mt_rand($min, $max);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the passed value
|
|
||||||
*
|
|
||||||
* @param mixed $value
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public static function passthrough($value)
|
|
||||||
{
|
|
||||||
return $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a random letter from a to z
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function randomLetter()
|
|
||||||
{
|
|
||||||
return chr(mt_rand(97, 122));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a random ASCII character (excluding accents and special chars)
|
|
||||||
*/
|
|
||||||
public static function randomAscii()
|
|
||||||
{
|
|
||||||
return chr(mt_rand(33, 126));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns randomly ordered subsequence of $count elements from a provided array
|
|
||||||
*
|
|
||||||
* @param array $array Array to take elements from. Defaults to a-c
|
|
||||||
* @param integer $count Number of elements to take.
|
|
||||||
* @param boolean $allowDuplicates Allow elements to be picked several times. Defaults to false
|
|
||||||
* @throws \LengthException When requesting more elements than provided
|
|
||||||
*
|
|
||||||
* @return array New array with $count elements from $array
|
|
||||||
*/
|
|
||||||
public static function randomElements($array = array('a', 'b', 'c'), $count = 1, $allowDuplicates = false)
|
|
||||||
{
|
|
||||||
$traversables = array();
|
|
||||||
|
|
||||||
if ($array instanceof \Traversable) {
|
|
||||||
foreach ($array as $element) {
|
|
||||||
$traversables[] = $element;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$arr = count($traversables) ? $traversables : $array;
|
|
||||||
|
|
||||||
$allKeys = array_keys($arr);
|
|
||||||
$numKeys = count($allKeys);
|
|
||||||
|
|
||||||
if (!$allowDuplicates && $numKeys < $count) {
|
|
||||||
throw new \LengthException(sprintf('Cannot get %d elements, only %d in array', $count, $numKeys));
|
|
||||||
}
|
|
||||||
|
|
||||||
$highKey = $numKeys - 1;
|
|
||||||
$keys = $elements = array();
|
|
||||||
$numElements = 0;
|
|
||||||
|
|
||||||
while ($numElements < $count) {
|
|
||||||
$num = mt_rand(0, $highKey);
|
|
||||||
|
|
||||||
if (!$allowDuplicates) {
|
|
||||||
if (isset($keys[$num])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$keys[$num] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$elements[] = $arr[$allKeys[$num]];
|
|
||||||
$numElements++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $elements;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a random element from a passed array
|
|
||||||
*
|
|
||||||
* @param array $array
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public static function randomElement($array = array('a', 'b', 'c'))
|
|
||||||
{
|
|
||||||
if (!$array || ($array instanceof \Traversable && !count($array))) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
$elements = static::randomElements($array, 1);
|
|
||||||
|
|
||||||
return $elements[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a random key from a passed associative array
|
|
||||||
*
|
|
||||||
* @param array $array
|
|
||||||
* @return int|string|null
|
|
||||||
*/
|
|
||||||
public static function randomKey($array = array())
|
|
||||||
{
|
|
||||||
if (!$array) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
$keys = array_keys($array);
|
|
||||||
$key = $keys[mt_rand(0, count($keys) - 1)];
|
|
||||||
|
|
||||||
return $key;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a shuffled version of the argument.
|
|
||||||
*
|
|
||||||
* This function accepts either an array, or a string.
|
|
||||||
*
|
|
||||||
* @example $faker->shuffle([1, 2, 3]); // [2, 1, 3]
|
|
||||||
* @example $faker->shuffle('hello, world'); // 'rlo,h eold!lw'
|
|
||||||
*
|
|
||||||
* @see shuffleArray()
|
|
||||||
* @see shuffleString()
|
|
||||||
*
|
|
||||||
* @param array|string $arg The set to shuffle
|
|
||||||
* @return array|string The shuffled set
|
|
||||||
*/
|
|
||||||
public static function shuffle($arg = '')
|
|
||||||
{
|
|
||||||
if (is_array($arg)) {
|
|
||||||
return static::shuffleArray($arg);
|
|
||||||
}
|
|
||||||
if (is_string($arg)) {
|
|
||||||
return static::shuffleString($arg);
|
|
||||||
}
|
|
||||||
throw new \InvalidArgumentException('shuffle() only supports strings or arrays');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a shuffled version of the array.
|
|
||||||
*
|
|
||||||
* This function does not mutate the original array. It uses the
|
|
||||||
* Fisher–Yates algorithm, which is unbiased, together with a Mersenne
|
|
||||||
* twister random generator. This function is therefore more random than
|
|
||||||
* PHP's shuffle() function, and it is seedable.
|
|
||||||
*
|
|
||||||
* @link http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
|
|
||||||
*
|
|
||||||
* @example $faker->shuffleArray([1, 2, 3]); // [2, 1, 3]
|
|
||||||
*
|
|
||||||
* @param array $array The set to shuffle
|
|
||||||
* @return array The shuffled set
|
|
||||||
*/
|
|
||||||
public static function shuffleArray($array = array())
|
|
||||||
{
|
|
||||||
$shuffledArray = array();
|
|
||||||
$i = 0;
|
|
||||||
reset($array);
|
|
||||||
foreach ($array as $key => $value) {
|
|
||||||
if ($i == 0) {
|
|
||||||
$j = 0;
|
|
||||||
} else {
|
|
||||||
$j = mt_rand(0, $i);
|
|
||||||
}
|
|
||||||
if ($j == $i) {
|
|
||||||
$shuffledArray[]= $value;
|
|
||||||
} else {
|
|
||||||
$shuffledArray[]= $shuffledArray[$j];
|
|
||||||
$shuffledArray[$j] = $value;
|
|
||||||
}
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
return $shuffledArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a shuffled version of the string.
|
|
||||||
*
|
|
||||||
* This function does not mutate the original string. It uses the
|
|
||||||
* Fisher–Yates algorithm, which is unbiased, together with a Mersenne
|
|
||||||
* twister random generator. This function is therefore more random than
|
|
||||||
* PHP's shuffle() function, and it is seedable. Additionally, it is
|
|
||||||
* UTF8 safe if the mb extension is available.
|
|
||||||
*
|
|
||||||
* @link http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
|
|
||||||
*
|
|
||||||
* @example $faker->shuffleString('hello, world'); // 'rlo,h eold!lw'
|
|
||||||
*
|
|
||||||
* @param string $string The set to shuffle
|
|
||||||
* @param string $encoding The string encoding (defaults to UTF-8)
|
|
||||||
* @return string The shuffled set
|
|
||||||
*/
|
|
||||||
public static function shuffleString($string = '', $encoding = 'UTF-8')
|
|
||||||
{
|
|
||||||
if (function_exists('mb_strlen')) {
|
|
||||||
// UTF8-safe str_split()
|
|
||||||
$array = array();
|
|
||||||
$strlen = mb_strlen($string, $encoding);
|
|
||||||
for ($i = 0; $i < $strlen; $i++) {
|
|
||||||
$array []= mb_substr($string, $i, 1, $encoding);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$array = str_split($string, 1);
|
|
||||||
}
|
|
||||||
return implode('', static::shuffleArray($array));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function replaceWildcard($string, $wildcard = '#', $callback = 'static::randomDigit')
|
|
||||||
{
|
|
||||||
if (($pos = strpos($string, $wildcard)) === false) {
|
|
||||||
return $string;
|
|
||||||
}
|
|
||||||
for ($i = $pos, $last = strrpos($string, $wildcard, $pos) + 1; $i < $last; $i++) {
|
|
||||||
if ($string[$i] === $wildcard) {
|
|
||||||
$string[$i] = call_user_func($callback);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Replaces all hash sign ('#') occurrences with a random number
|
|
||||||
* Replaces all percentage sign ('%') occurrences with a not null number
|
|
||||||
*
|
|
||||||
* @param string $string String that needs to bet parsed
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function numerify($string = '###')
|
|
||||||
{
|
|
||||||
// instead of using randomDigit() several times, which is slow,
|
|
||||||
// count the number of hashes and generate once a large number
|
|
||||||
$toReplace = array();
|
|
||||||
if (($pos = strpos($string, '#')) !== false) {
|
|
||||||
for ($i = $pos, $last = strrpos($string, '#', $pos) + 1; $i < $last; $i++) {
|
|
||||||
if ($string[$i] === '#') {
|
|
||||||
$toReplace[] = $i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($nbReplacements = count($toReplace)) {
|
|
||||||
$maxAtOnce = strlen((string) mt_getrandmax()) - 1;
|
|
||||||
$numbers = '';
|
|
||||||
$i = 0;
|
|
||||||
while ($i < $nbReplacements) {
|
|
||||||
$size = min($nbReplacements - $i, $maxAtOnce);
|
|
||||||
$numbers .= str_pad(static::randomNumber($size), $size, '0', STR_PAD_LEFT);
|
|
||||||
$i += $size;
|
|
||||||
}
|
|
||||||
for ($i = 0; $i < $nbReplacements; $i++) {
|
|
||||||
$string[$toReplace[$i]] = $numbers[$i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$string = self::replaceWildcard($string, '%', 'static::randomDigitNotNull');
|
|
||||||
|
|
||||||
return $string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Replaces all question mark ('?') occurrences with a random letter
|
|
||||||
*
|
|
||||||
* @param string $string String that needs to bet parsed
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function lexify($string = '????')
|
|
||||||
{
|
|
||||||
return self::replaceWildcard($string, '?', 'static::randomLetter');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Replaces hash signs ('#') and question marks ('?') with random numbers and letters
|
|
||||||
* An asterisk ('*') is replaced with either a random number or a random letter
|
|
||||||
*
|
|
||||||
* @param string $string String that needs to bet parsed
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function bothify($string = '## ??')
|
|
||||||
{
|
|
||||||
$string = self::replaceWildcard($string, '*', function () {
|
|
||||||
return mt_rand(0, 1) ? '#' : '?';
|
|
||||||
});
|
|
||||||
return static::lexify(static::numerify($string));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Replaces * signs with random numbers and letters and special characters
|
|
||||||
*
|
|
||||||
* @example $faker->asciify(''********'); // "s5'G!uC3"
|
|
||||||
*
|
|
||||||
* @param string $string String that needs to bet parsed
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function asciify($string = '****')
|
|
||||||
{
|
|
||||||
return preg_replace_callback('/\*/u', 'static::randomAscii', $string);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Transforms a basic regular expression into a random string satisfying the expression.
|
|
||||||
*
|
|
||||||
* @example $faker->regexify('[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}'); // sm0@y8k96a.ej
|
|
||||||
*
|
|
||||||
* Regex delimiters '/.../' and begin/end markers '^...$' are ignored.
|
|
||||||
*
|
|
||||||
* Only supports a small subset of the regex syntax. For instance,
|
|
||||||
* unicode, negated classes, unbounded ranges, subpatterns, back references,
|
|
||||||
* assertions, recursive patterns, and comments are not supported. Escaping
|
|
||||||
* support is extremely fragile.
|
|
||||||
*
|
|
||||||
* This method is also VERY slow. Use it only when no other formatter
|
|
||||||
* can generate the fake data you want. For instance, prefer calling
|
|
||||||
* `$faker->email` rather than `regexify` with the previous regular
|
|
||||||
* expression.
|
|
||||||
*
|
|
||||||
* Also note than `bothify` can probably do most of what this method does,
|
|
||||||
* but much faster. For instance, for a dummy email generation, try
|
|
||||||
* `$faker->bothify('?????????@???.???')`.
|
|
||||||
*
|
|
||||||
* @see https://github.com/icomefromthenet/ReverseRegex for a more robust implementation
|
|
||||||
*
|
|
||||||
* @param string $regex A regular expression (delimiters are optional)
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function regexify($regex = '')
|
|
||||||
{
|
|
||||||
// ditch the anchors
|
|
||||||
$regex = preg_replace('/^\/?\^?/', '', $regex);
|
|
||||||
$regex = preg_replace('/\$?\/?$/', '', $regex);
|
|
||||||
// All {2} become {2,2}
|
|
||||||
$regex = preg_replace('/\{(\d+)\}/', '{\1,\1}', $regex);
|
|
||||||
// Single-letter quantifiers (?, *, +) become bracket quantifiers ({0,1}, {0,rand}, {1, rand})
|
|
||||||
$regex = preg_replace('/(?<!\\\)\?/', '{0,1}', $regex);
|
|
||||||
$regex = preg_replace('/(?<!\\\)\*/', '{0,' . static::randomDigitNotNull() . '}', $regex);
|
|
||||||
$regex = preg_replace('/(?<!\\\)\+/', '{1,' . static::randomDigitNotNull() . '}', $regex);
|
|
||||||
// [12]{1,2} becomes [12] or [12][12]
|
|
||||||
$regex = preg_replace_callback('/(\[[^\]]+\])\{(\d+),(\d+)\}/', function ($matches) {
|
|
||||||
return str_repeat($matches[1], Base::randomElement(range($matches[2], $matches[3])));
|
|
||||||
}, $regex);
|
|
||||||
// (12|34){1,2} becomes (12|34) or (12|34)(12|34)
|
|
||||||
$regex = preg_replace_callback('/(\([^\)]+\))\{(\d+),(\d+)\}/', function ($matches) {
|
|
||||||
return str_repeat($matches[1], Base::randomElement(range($matches[2], $matches[3])));
|
|
||||||
}, $regex);
|
|
||||||
// A{1,2} becomes A or AA or \d{3} becomes \d\d\d
|
|
||||||
$regex = preg_replace_callback('/(\\\?.)\{(\d+),(\d+)\}/', function ($matches) {
|
|
||||||
return str_repeat($matches[1], Base::randomElement(range($matches[2], $matches[3])));
|
|
||||||
}, $regex);
|
|
||||||
// (this|that) becomes 'this' or 'that'
|
|
||||||
$regex = preg_replace_callback('/\((.*?)\)/', function ($matches) {
|
|
||||||
return Base::randomElement(explode('|', str_replace(array('(', ')'), '', $matches[1])));
|
|
||||||
}, $regex);
|
|
||||||
// All A-F inside of [] become ABCDEF
|
|
||||||
$regex = preg_replace_callback('/\[([^\]]+)\]/', function ($matches) {
|
|
||||||
return '[' . preg_replace_callback('/(\w|\d)\-(\w|\d)/', function ($range) {
|
|
||||||
return implode('', range($range[1], $range[2]));
|
|
||||||
}, $matches[1]) . ']';
|
|
||||||
}, $regex);
|
|
||||||
// All [ABC] become B (or A or C)
|
|
||||||
$regex = preg_replace_callback('/\[([^\]]+)\]/', function ($matches) {
|
|
||||||
return Base::randomElement(str_split($matches[1]));
|
|
||||||
}, $regex);
|
|
||||||
// replace \d with number and \w with letter and . with ascii
|
|
||||||
$regex = preg_replace_callback('/\\\w/', 'static::randomLetter', $regex);
|
|
||||||
$regex = preg_replace_callback('/\\\d/', 'static::randomDigit', $regex);
|
|
||||||
$regex = preg_replace_callback('/(?<!\\\)\./', 'static::randomAscii', $regex);
|
|
||||||
// remove remaining backslashes
|
|
||||||
$regex = str_replace('\\', '', $regex);
|
|
||||||
// phew
|
|
||||||
return $regex;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts string to lowercase.
|
|
||||||
* Uses mb_string extension if available.
|
|
||||||
*
|
|
||||||
* @param string $string String that should be converted to lowercase
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function toLower($string = '')
|
|
||||||
{
|
|
||||||
return extension_loaded('mbstring') ? mb_strtolower($string, 'UTF-8') : strtolower($string);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts string to uppercase.
|
|
||||||
* Uses mb_string extension if available.
|
|
||||||
*
|
|
||||||
* @param string $string String that should be converted to uppercase
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function toUpper($string = '')
|
|
||||||
{
|
|
||||||
return extension_loaded('mbstring') ? mb_strtoupper($string, 'UTF-8') : strtoupper($string);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Chainable method for making any formatter optional.
|
|
||||||
*
|
|
||||||
* @param float|integer $weight Set the probability of receiving a null value.
|
|
||||||
* "0" will always return null, "1" will always return the generator.
|
|
||||||
* If $weight is an integer value, then the same system works
|
|
||||||
* between 0 (always get false) and 100 (always get true).
|
|
||||||
* @return mixed|null
|
|
||||||
*/
|
|
||||||
public function optional($weight = 0.5, $default = null)
|
|
||||||
{
|
|
||||||
// old system based on 0.1 <= $weight <= 0.9
|
|
||||||
// TODO: remove in v2
|
|
||||||
if ($weight > 0 && $weight < 1 && mt_rand() / mt_getrandmax() <= $weight) {
|
|
||||||
return $this->generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
// new system with percentage
|
|
||||||
if (is_int($weight) && mt_rand(1, 100) <= $weight) {
|
|
||||||
return $this->generator;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new DefaultGenerator($default);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Chainable method for making any formatter unique.
|
|
||||||
*
|
|
||||||
* <code>
|
|
||||||
* // will never return twice the same value
|
|
||||||
* $faker->unique()->randomElement(array(1, 2, 3));
|
|
||||||
* </code>
|
|
||||||
*
|
|
||||||
* @param boolean $reset If set to true, resets the list of existing values
|
|
||||||
* @param integer $maxRetries Maximum number of retries to find a unique value,
|
|
||||||
* After which an OverflowException is thrown.
|
|
||||||
* @throws \OverflowException When no unique value can be found by iterating $maxRetries times
|
|
||||||
*
|
|
||||||
* @return UniqueGenerator A proxy class returning only non-existing values
|
|
||||||
*/
|
|
||||||
public function unique($reset = false, $maxRetries = 10000)
|
|
||||||
{
|
|
||||||
if ($reset || !$this->unique) {
|
|
||||||
$this->unique = new UniqueGenerator($this->generator, $maxRetries);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->unique;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Chainable method for forcing any formatter to return only valid values.
|
|
||||||
*
|
|
||||||
* The value validity is determined by a function passed as first argument.
|
|
||||||
*
|
|
||||||
* <code>
|
|
||||||
* $values = array();
|
|
||||||
* $evenValidator = function ($digit) {
|
|
||||||
* return $digit % 2 === 0;
|
|
||||||
* };
|
|
||||||
* for ($i=0; $i < 10; $i++) {
|
|
||||||
* $values []= $faker->valid($evenValidator)->randomDigit;
|
|
||||||
* }
|
|
||||||
* print_r($values); // [0, 4, 8, 4, 2, 6, 0, 8, 8, 6]
|
|
||||||
* </code>
|
|
||||||
*
|
|
||||||
* @param Closure $validator A function returning true for valid values
|
|
||||||
* @param integer $maxRetries Maximum number of retries to find a unique value,
|
|
||||||
* After which an OverflowException is thrown.
|
|
||||||
* @throws \OverflowException When no valid value can be found by iterating $maxRetries times
|
|
||||||
*
|
|
||||||
* @return ValidGenerator A proxy class returning only valid values
|
|
||||||
*/
|
|
||||||
public function valid($validator = null, $maxRetries = 10000)
|
|
||||||
{
|
|
||||||
return new ValidGenerator($this->generator, $validator, $maxRetries);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
class Biased extends Base
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Returns a biased integer between $min and $max (both inclusive).
|
|
||||||
* The distribution depends on $function.
|
|
||||||
*
|
|
||||||
* The algorithm creates two doubles, x ∈ [0, 1], y ∈ [0, 1) and checks whether the
|
|
||||||
* return value of $function for x is greater than or equal to y. If this is
|
|
||||||
* the case the number is accepted and x is mapped to the appropriate integer
|
|
||||||
* between $min and $max. Otherwise two new doubles are created until the pair
|
|
||||||
* is accepted.
|
|
||||||
*
|
|
||||||
* @param integer $min Minimum value of the generated integers.
|
|
||||||
* @param integer $max Maximum value of the generated integers.
|
|
||||||
* @param callable $function A function mapping x ∈ [0, 1] onto a double ∈ [0, 1]
|
|
||||||
* @return integer An integer between $min and $max.
|
|
||||||
*/
|
|
||||||
public function biasedNumberBetween($min = 0, $max = 100, $function = 'sqrt')
|
|
||||||
{
|
|
||||||
do {
|
|
||||||
$x = mt_rand() / mt_getrandmax();
|
|
||||||
$y = mt_rand() / (mt_getrandmax() + 1);
|
|
||||||
} while (call_user_func($function, $x) < $y);
|
|
||||||
|
|
||||||
return (int) floor($x * ($max - $min + 1) + $min);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 'unbiased' creates an unbiased distribution by giving
|
|
||||||
* each value the same value of one.
|
|
||||||
*
|
|
||||||
* @return integer
|
|
||||||
*/
|
|
||||||
protected static function unbiased()
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 'linearLow' favors lower numbers. The probability decreases
|
|
||||||
* in a linear fashion.
|
|
||||||
*
|
|
||||||
* @return integer
|
|
||||||
*/
|
|
||||||
protected static function linearLow($x)
|
|
||||||
{
|
|
||||||
return 1 - $x;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 'linearHigh' favors higher numbers. The probability increases
|
|
||||||
* in a linear fashion.
|
|
||||||
*
|
|
||||||
* @return integer
|
|
||||||
*/
|
|
||||||
protected static function linearHigh($x)
|
|
||||||
{
|
|
||||||
return $x;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,143 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author lsv
|
|
||||||
*/
|
|
||||||
class Color extends Base
|
|
||||||
{
|
|
||||||
protected static $safeColorNames = array(
|
|
||||||
'black', 'maroon', 'green', 'navy', 'olive',
|
|
||||||
'purple', 'teal', 'lime', 'blue', 'silver',
|
|
||||||
'gray', 'yellow', 'fuchsia', 'aqua', 'white'
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $allColorNames = array(
|
|
||||||
'AliceBlue', 'AntiqueWhite', 'Aqua', 'Aquamarine',
|
|
||||||
'Azure', 'Beige', 'Bisque', 'Black', 'BlanchedAlmond',
|
|
||||||
'Blue', 'BlueViolet', 'Brown', 'BurlyWood', 'CadetBlue',
|
|
||||||
'Chartreuse', 'Chocolate', 'Coral', 'CornflowerBlue',
|
|
||||||
'Cornsilk', 'Crimson', 'Cyan', 'DarkBlue', 'DarkCyan',
|
|
||||||
'DarkGoldenRod', 'DarkGray', 'DarkGreen', 'DarkKhaki',
|
|
||||||
'DarkMagenta', 'DarkOliveGreen', 'Darkorange', 'DarkOrchid',
|
|
||||||
'DarkRed', 'DarkSalmon', 'DarkSeaGreen', 'DarkSlateBlue',
|
|
||||||
'DarkSlateGray', 'DarkTurquoise', 'DarkViolet', 'DeepPink',
|
|
||||||
'DeepSkyBlue', 'DimGray', 'DimGrey', 'DodgerBlue', 'FireBrick',
|
|
||||||
'FloralWhite', 'ForestGreen', 'Fuchsia', 'Gainsboro', 'GhostWhite',
|
|
||||||
'Gold', 'GoldenRod', 'Gray', 'Green', 'GreenYellow', 'HoneyDew',
|
|
||||||
'HotPink', 'IndianRed', 'Indigo', 'Ivory', 'Khaki', 'Lavender',
|
|
||||||
'LavenderBlush', 'LawnGreen', 'LemonChiffon', 'LightBlue', 'LightCoral',
|
|
||||||
'LightCyan', 'LightGoldenRodYellow', 'LightGray', 'LightGreen', 'LightPink',
|
|
||||||
'LightSalmon', 'LightSeaGreen', 'LightSkyBlue', 'LightSlateGray', 'LightSteelBlue',
|
|
||||||
'LightYellow', 'Lime', 'LimeGreen', 'Linen', 'Magenta', 'Maroon', 'MediumAquaMarine',
|
|
||||||
'MediumBlue', 'MediumOrchid', 'MediumPurple', 'MediumSeaGreen', 'MediumSlateBlue',
|
|
||||||
'MediumSpringGreen', 'MediumTurquoise', 'MediumVioletRed', 'MidnightBlue',
|
|
||||||
'MintCream', 'MistyRose', 'Moccasin', 'NavajoWhite', 'Navy', 'OldLace', 'Olive',
|
|
||||||
'OliveDrab', 'Orange', 'OrangeRed', 'Orchid', 'PaleGoldenRod', 'PaleGreen',
|
|
||||||
'PaleTurquoise', 'PaleVioletRed', 'PapayaWhip', 'PeachPuff', 'Peru', 'Pink', 'Plum',
|
|
||||||
'PowderBlue', 'Purple', 'Red', 'RosyBrown', 'RoyalBlue', 'SaddleBrown', 'Salmon',
|
|
||||||
'SandyBrown', 'SeaGreen', 'SeaShell', 'Sienna', 'Silver', 'SkyBlue', 'SlateBlue',
|
|
||||||
'SlateGray', 'Snow', 'SpringGreen', 'SteelBlue', 'Tan', 'Teal', 'Thistle', 'Tomato',
|
|
||||||
'Turquoise', 'Violet', 'Wheat', 'White', 'WhiteSmoke', 'Yellow', 'YellowGreen'
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '#fa3cc2'
|
|
||||||
*/
|
|
||||||
public static function hexColor()
|
|
||||||
{
|
|
||||||
return '#' . str_pad(dechex(mt_rand(1, 16777215)), 6, '0', STR_PAD_LEFT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '#ff0044'
|
|
||||||
*/
|
|
||||||
public static function safeHexColor()
|
|
||||||
{
|
|
||||||
$color = str_pad(dechex(mt_rand(0, 255)), 3, '0', STR_PAD_LEFT);
|
|
||||||
|
|
||||||
return '#' . $color[0] . $color[0] . $color[1] . $color[1] . $color[2] . $color[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'array(0,255,122)'
|
|
||||||
*/
|
|
||||||
public static function rgbColorAsArray()
|
|
||||||
{
|
|
||||||
$color = static::hexColor();
|
|
||||||
|
|
||||||
return array(
|
|
||||||
hexdec(substr($color, 1, 2)),
|
|
||||||
hexdec(substr($color, 3, 2)),
|
|
||||||
hexdec(substr($color, 5, 2))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '0,255,122'
|
|
||||||
*/
|
|
||||||
public static function rgbColor()
|
|
||||||
{
|
|
||||||
return implode(',', static::rgbColorAsArray());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'rgb(0,255,122)'
|
|
||||||
*/
|
|
||||||
public static function rgbCssColor()
|
|
||||||
{
|
|
||||||
return 'rgb(' . static::rgbColor() . ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'rgba(0,255,122,0.8)'
|
|
||||||
*/
|
|
||||||
public static function rgbaCssColor()
|
|
||||||
{
|
|
||||||
return 'rgba(' . static::rgbColor() . ',' . static::randomFloat(1, 0, 1) . ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'blue'
|
|
||||||
*/
|
|
||||||
public static function safeColorName()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$safeColorNames);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'NavajoWhite'
|
|
||||||
*/
|
|
||||||
public static function colorName()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$allColorNames);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '340,50,20'
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function hslColor()
|
|
||||||
{
|
|
||||||
return sprintf(
|
|
||||||
'%s,%s,%s',
|
|
||||||
static::numberBetween(0, 360),
|
|
||||||
static::numberBetween(0, 100),
|
|
||||||
static::numberBetween(0, 100)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example array(340, 50, 20)
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public static function hslColorAsArray()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
static::numberBetween(0, 360),
|
|
||||||
static::numberBetween(0, 100),
|
|
||||||
static::numberBetween(0, 100)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
class Company extends Base
|
|
||||||
{
|
|
||||||
protected static $formats = array(
|
|
||||||
'{{lastName}} {{companySuffix}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $companySuffix = array('Ltd');
|
|
||||||
|
|
||||||
protected static $jobTitleFormat = array(
|
|
||||||
'{{word}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'Acme Ltd'
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function company()
|
|
||||||
{
|
|
||||||
$format = static::randomElement(static::$formats);
|
|
||||||
|
|
||||||
return $this->generator->parse($format);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'Ltd'
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function companySuffix()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$companySuffix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'Job'
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function jobTitle()
|
|
||||||
{
|
|
||||||
$format = static::randomElement(static::$jobTitleFormat);
|
|
||||||
|
|
||||||
return $this->generator->parse($format);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,340 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
class DateTime extends Base
|
|
||||||
{
|
|
||||||
protected static $century = array('I','II','III','IV','V','VI','VII','VIII','IX','X','XI','XII','XIII','XIV','XV','XVI','XVII','XVIII','XIX','XX','XXI');
|
|
||||||
|
|
||||||
protected static $defaultTimezone = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|string|float|int $max
|
|
||||||
* @return int|false
|
|
||||||
*/
|
|
||||||
protected static function getMaxTimestamp($max = 'now')
|
|
||||||
{
|
|
||||||
if (is_numeric($max)) {
|
|
||||||
return (int) $max;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($max instanceof \DateTime) {
|
|
||||||
return $max->getTimestamp();
|
|
||||||
}
|
|
||||||
|
|
||||||
return strtotime(empty($max) ? 'now' : $max);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a timestamp between January 1, 1970 and now
|
|
||||||
*
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @return int
|
|
||||||
*
|
|
||||||
* @example 1061306726
|
|
||||||
*/
|
|
||||||
public static function unixTime($max = 'now')
|
|
||||||
{
|
|
||||||
return mt_rand(0, static::getMaxTimestamp($max));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a datetime object for a date between January 1, 1970 and now
|
|
||||||
*
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @param string $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
|
|
||||||
* @example DateTime('2005-08-16 20:39:21')
|
|
||||||
* @return \DateTime
|
|
||||||
* @see http://php.net/manual/en/timezones.php
|
|
||||||
* @see http://php.net/manual/en/function.date-default-timezone-get.php
|
|
||||||
*/
|
|
||||||
public static function dateTime($max = 'now', $timezone = null)
|
|
||||||
{
|
|
||||||
return static::setTimezone(
|
|
||||||
new \DateTime('@' . static::unixTime($max)),
|
|
||||||
$timezone
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a datetime object for a date between January 1, 001 and now
|
|
||||||
*
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
|
|
||||||
* @example DateTime('1265-03-22 21:15:52')
|
|
||||||
* @return \DateTime
|
|
||||||
* @see http://php.net/manual/en/timezones.php
|
|
||||||
* @see http://php.net/manual/en/function.date-default-timezone-get.php
|
|
||||||
*/
|
|
||||||
public static function dateTimeAD($max = 'now', $timezone = null)
|
|
||||||
{
|
|
||||||
$min = (PHP_INT_SIZE>4 ? -62135597361 : -PHP_INT_MAX);
|
|
||||||
return static::setTimezone(
|
|
||||||
new \DateTime('@' . mt_rand($min, static::getMaxTimestamp($max))),
|
|
||||||
$timezone
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* get a date string formatted with ISO8601
|
|
||||||
*
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @return string
|
|
||||||
* @example '2003-10-21T16:05:52+0000'
|
|
||||||
*/
|
|
||||||
public static function iso8601($max = 'now')
|
|
||||||
{
|
|
||||||
return static::date(\DateTime::ISO8601, $max);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a date string between January 1, 1970 and now
|
|
||||||
*
|
|
||||||
* @param string $format
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @return string
|
|
||||||
* @example '2008-11-27'
|
|
||||||
*/
|
|
||||||
public static function date($format = 'Y-m-d', $max = 'now')
|
|
||||||
{
|
|
||||||
return static::dateTime($max)->format($format);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a time string (24h format by default)
|
|
||||||
*
|
|
||||||
* @param string $format
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @return string
|
|
||||||
* @example '15:02:34'
|
|
||||||
*/
|
|
||||||
public static function time($format = 'H:i:s', $max = 'now')
|
|
||||||
{
|
|
||||||
return static::dateTime($max)->format($format);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a DateTime object based on a random date between two given dates.
|
|
||||||
* Accepts date strings that can be recognized by strtotime().
|
|
||||||
*
|
|
||||||
* @param \DateTime|string $startDate Defaults to 30 years ago
|
|
||||||
* @param \DateTime|string $endDate Defaults to "now"
|
|
||||||
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
|
|
||||||
* @example DateTime('1999-02-02 11:42:52')
|
|
||||||
* @return \DateTime
|
|
||||||
* @see http://php.net/manual/en/timezones.php
|
|
||||||
* @see http://php.net/manual/en/function.date-default-timezone-get.php
|
|
||||||
*/
|
|
||||||
public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null)
|
|
||||||
{
|
|
||||||
$startTimestamp = $startDate instanceof \DateTime ? $startDate->getTimestamp() : strtotime($startDate);
|
|
||||||
$endTimestamp = static::getMaxTimestamp($endDate);
|
|
||||||
|
|
||||||
if ($startTimestamp > $endTimestamp) {
|
|
||||||
throw new \InvalidArgumentException('Start date must be anterior to end date.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$timestamp = mt_rand($startTimestamp, $endTimestamp);
|
|
||||||
|
|
||||||
return static::setTimezone(
|
|
||||||
new \DateTime('@' . $timestamp),
|
|
||||||
$timezone
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a DateTime object based on a random date between one given date and
|
|
||||||
* an interval
|
|
||||||
* Accepts date string that can be recognized by strtotime().
|
|
||||||
*
|
|
||||||
* @param \DateTime|string $date Defaults to 30 years ago
|
|
||||||
* @param string $interval Defaults to 5 days after
|
|
||||||
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
|
|
||||||
* @example dateTimeInInterval('1999-02-02 11:42:52', '+ 5 days')
|
|
||||||
* @return \DateTime
|
|
||||||
* @see http://php.net/manual/en/timezones.php
|
|
||||||
* @see http://php.net/manual/en/function.date-default-timezone-get.php
|
|
||||||
*/
|
|
||||||
public static function dateTimeInInterval($date = '-30 years', $interval = '+5 days', $timezone = null)
|
|
||||||
{
|
|
||||||
$intervalObject = \DateInterval::createFromDateString($interval);
|
|
||||||
$datetime = $date instanceof \DateTime ? $date : new \DateTime($date);
|
|
||||||
$otherDatetime = clone $datetime;
|
|
||||||
$otherDatetime->add($intervalObject);
|
|
||||||
|
|
||||||
$begin = $datetime > $otherDatetime ? $otherDatetime : $datetime;
|
|
||||||
$end = $datetime===$begin ? $otherDatetime : $datetime;
|
|
||||||
|
|
||||||
return static::dateTimeBetween(
|
|
||||||
$begin,
|
|
||||||
$end,
|
|
||||||
$timezone
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
|
|
||||||
* @example DateTime('1964-04-04 11:02:02')
|
|
||||||
* @return \DateTime
|
|
||||||
*/
|
|
||||||
public static function dateTimeThisCentury($max = 'now', $timezone = null)
|
|
||||||
{
|
|
||||||
return static::dateTimeBetween('-100 year', $max, $timezone);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
|
|
||||||
* @example DateTime('2010-03-10 05:18:58')
|
|
||||||
* @return \DateTime
|
|
||||||
*/
|
|
||||||
public static function dateTimeThisDecade($max = 'now', $timezone = null)
|
|
||||||
{
|
|
||||||
return static::dateTimeBetween('-10 year', $max, $timezone);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
|
|
||||||
* @example DateTime('2011-09-19 09:24:37')
|
|
||||||
* @return \DateTime
|
|
||||||
*/
|
|
||||||
public static function dateTimeThisYear($max = 'now', $timezone = null)
|
|
||||||
{
|
|
||||||
return static::dateTimeBetween('-1 year', $max, $timezone);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
|
|
||||||
* @example DateTime('2011-10-05 12:51:46')
|
|
||||||
* @return \DateTime
|
|
||||||
*/
|
|
||||||
public static function dateTimeThisMonth($max = 'now', $timezone = null)
|
|
||||||
{
|
|
||||||
return static::dateTimeBetween('-1 month', $max, $timezone);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @return string
|
|
||||||
* @example 'am'
|
|
||||||
*/
|
|
||||||
public static function amPm($max = 'now')
|
|
||||||
{
|
|
||||||
return static::dateTime($max)->format('a');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @return string
|
|
||||||
* @example '22'
|
|
||||||
*/
|
|
||||||
public static function dayOfMonth($max = 'now')
|
|
||||||
{
|
|
||||||
return static::dateTime($max)->format('d');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @return string
|
|
||||||
* @example 'Tuesday'
|
|
||||||
*/
|
|
||||||
public static function dayOfWeek($max = 'now')
|
|
||||||
{
|
|
||||||
return static::dateTime($max)->format('l');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @return string
|
|
||||||
* @example '7'
|
|
||||||
*/
|
|
||||||
public static function month($max = 'now')
|
|
||||||
{
|
|
||||||
return static::dateTime($max)->format('m');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @return string
|
|
||||||
* @example 'September'
|
|
||||||
*/
|
|
||||||
public static function monthName($max = 'now')
|
|
||||||
{
|
|
||||||
return static::dateTime($max)->format('F');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now"
|
|
||||||
* @return string
|
|
||||||
* @example '1673'
|
|
||||||
*/
|
|
||||||
public static function year($max = 'now')
|
|
||||||
{
|
|
||||||
return static::dateTime($max)->format('Y');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
* @example 'XVII'
|
|
||||||
*/
|
|
||||||
public static function century()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$century);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
* @example 'Europe/Paris'
|
|
||||||
*/
|
|
||||||
public static function timezone()
|
|
||||||
{
|
|
||||||
return static::randomElement(\DateTimeZone::listIdentifiers());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Internal method to set the time zone on a DateTime.
|
|
||||||
*
|
|
||||||
* @param \DateTime $dt
|
|
||||||
* @param string|null $timezone
|
|
||||||
*
|
|
||||||
* @return \DateTime
|
|
||||||
*/
|
|
||||||
private static function setTimezone(\DateTime $dt, $timezone)
|
|
||||||
{
|
|
||||||
return $dt->setTimezone(new \DateTimeZone(static::resolveTimezone($timezone)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets default time zone.
|
|
||||||
*
|
|
||||||
* @param string $timezone
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public static function setDefaultTimezone($timezone = null)
|
|
||||||
{
|
|
||||||
static::$defaultTimezone = $timezone;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets default time zone.
|
|
||||||
*
|
|
||||||
* @return string|null
|
|
||||||
*/
|
|
||||||
public static function getDefaultTimezone()
|
|
||||||
{
|
|
||||||
return static::$defaultTimezone;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string|null $timezone
|
|
||||||
* @return null|string
|
|
||||||
*/
|
|
||||||
private static function resolveTimezone($timezone)
|
|
||||||
{
|
|
||||||
return ((null === $timezone) ? ((null === static::$defaultTimezone) ? date_default_timezone_get() : static::$defaultTimezone) : $timezone);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,606 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
class File extends Base
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MIME types from the apache.org file. Some types are truncated.
|
|
||||||
*
|
|
||||||
* @var array Map of MIME types => file extension(s)
|
|
||||||
* @link http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
|
|
||||||
*/
|
|
||||||
protected static $mimeTypes = array(
|
|
||||||
'application/atom+xml' => 'atom',
|
|
||||||
'application/ecmascript' => 'ecma',
|
|
||||||
'application/emma+xml' => 'emma',
|
|
||||||
'application/epub+zip' => 'epub',
|
|
||||||
'application/java-archive' => 'jar',
|
|
||||||
'application/java-vm' => 'class',
|
|
||||||
'application/javascript' => 'js',
|
|
||||||
'application/json' => 'json',
|
|
||||||
'application/jsonml+json' => 'jsonml',
|
|
||||||
'application/lost+xml' => 'lostxml',
|
|
||||||
'application/mathml+xml' => 'mathml',
|
|
||||||
'application/mets+xml' => 'mets',
|
|
||||||
'application/mods+xml' => 'mods',
|
|
||||||
'application/mp4' => 'mp4s',
|
|
||||||
'application/msword' => array('doc', 'dot'),
|
|
||||||
'application/octet-stream' => array(
|
|
||||||
'bin',
|
|
||||||
'dms',
|
|
||||||
'lrf',
|
|
||||||
'mar',
|
|
||||||
'so',
|
|
||||||
'dist',
|
|
||||||
'distz',
|
|
||||||
'pkg',
|
|
||||||
'bpk',
|
|
||||||
'dump',
|
|
||||||
'elc',
|
|
||||||
'deploy'
|
|
||||||
),
|
|
||||||
'application/ogg' => 'ogx',
|
|
||||||
'application/omdoc+xml' => 'omdoc',
|
|
||||||
'application/pdf' => 'pdf',
|
|
||||||
'application/pgp-encrypted' => 'pgp',
|
|
||||||
'application/pgp-signature' => array('asc', 'sig'),
|
|
||||||
'application/pkix-pkipath' => 'pkipath',
|
|
||||||
'application/pkixcmp' => 'pki',
|
|
||||||
'application/pls+xml' => 'pls',
|
|
||||||
'application/postscript' => array('ai', 'eps', 'ps'),
|
|
||||||
'application/pskc+xml' => 'pskcxml',
|
|
||||||
'application/rdf+xml' => 'rdf',
|
|
||||||
'application/reginfo+xml' => 'rif',
|
|
||||||
'application/rss+xml' => 'rss',
|
|
||||||
'application/rtf' => 'rtf',
|
|
||||||
'application/sbml+xml' => 'sbml',
|
|
||||||
'application/vnd.adobe.air-application-installer-package+zip' => 'air',
|
|
||||||
'application/vnd.adobe.xdp+xml' => 'xdp',
|
|
||||||
'application/vnd.adobe.xfdf' => 'xfdf',
|
|
||||||
'application/vnd.ahead.space' => 'ahead',
|
|
||||||
'application/vnd.dart' => 'dart',
|
|
||||||
'application/vnd.data-vision.rdz' => 'rdz',
|
|
||||||
'application/vnd.dece.data' => array('uvf', 'uvvf', 'uvd', 'uvvd'),
|
|
||||||
'application/vnd.dece.ttml+xml' => array('uvt', 'uvvt'),
|
|
||||||
'application/vnd.dece.unspecified' => array('uvx', 'uvvx'),
|
|
||||||
'application/vnd.dece.zip' => array('uvz', 'uvvz'),
|
|
||||||
'application/vnd.denovo.fcselayout-link' => 'fe_launch',
|
|
||||||
'application/vnd.dna' => 'dna',
|
|
||||||
'application/vnd.dolby.mlp' => 'mlp',
|
|
||||||
'application/vnd.dpgraph' => 'dpg',
|
|
||||||
'application/vnd.dreamfactory' => 'dfac',
|
|
||||||
'application/vnd.ds-keypoint' => 'kpxx',
|
|
||||||
'application/vnd.dvb.ait' => 'ait',
|
|
||||||
'application/vnd.dvb.service' => 'svc',
|
|
||||||
'application/vnd.dynageo' => 'geo',
|
|
||||||
'application/vnd.ecowin.chart' => 'mag',
|
|
||||||
'application/vnd.enliven' => 'nml',
|
|
||||||
'application/vnd.epson.esf' => 'esf',
|
|
||||||
'application/vnd.epson.msf' => 'msf',
|
|
||||||
'application/vnd.epson.quickanime' => 'qam',
|
|
||||||
'application/vnd.epson.salt' => 'slt',
|
|
||||||
'application/vnd.epson.ssf' => 'ssf',
|
|
||||||
'application/vnd.ezpix-album' => 'ez2',
|
|
||||||
'application/vnd.ezpix-package' => 'ez3',
|
|
||||||
'application/vnd.fdf' => 'fdf',
|
|
||||||
'application/vnd.fdsn.mseed' => 'mseed',
|
|
||||||
'application/vnd.fdsn.seed' => array('seed', 'dataless'),
|
|
||||||
'application/vnd.flographit' => 'gph',
|
|
||||||
'application/vnd.fluxtime.clip' => 'ftc',
|
|
||||||
'application/vnd.hal+xml' => 'hal',
|
|
||||||
'application/vnd.hydrostatix.sof-data' => 'sfd-hdstx',
|
|
||||||
'application/vnd.ibm.minipay' => 'mpy',
|
|
||||||
'application/vnd.ibm.secure-container' => 'sc',
|
|
||||||
'application/vnd.iccprofile' => array('icc', 'icm'),
|
|
||||||
'application/vnd.igloader' => 'igl',
|
|
||||||
'application/vnd.immervision-ivp' => 'ivp',
|
|
||||||
'application/vnd.kde.karbon' => 'karbon',
|
|
||||||
'application/vnd.kde.kchart' => 'chrt',
|
|
||||||
'application/vnd.kde.kformula' => 'kfo',
|
|
||||||
'application/vnd.kde.kivio' => 'flw',
|
|
||||||
'application/vnd.kde.kontour' => 'kon',
|
|
||||||
'application/vnd.kde.kpresenter' => array('kpr', 'kpt'),
|
|
||||||
'application/vnd.kde.kspread' => 'ksp',
|
|
||||||
'application/vnd.kde.kword' => array('kwd', 'kwt'),
|
|
||||||
'application/vnd.kenameaapp' => 'htke',
|
|
||||||
'application/vnd.kidspiration' => 'kia',
|
|
||||||
'application/vnd.kinar' => array('kne', 'knp'),
|
|
||||||
'application/vnd.koan' => array('skp', 'skd', 'skt', 'skm'),
|
|
||||||
'application/vnd.kodak-descriptor' => 'sse',
|
|
||||||
'application/vnd.las.las+xml' => 'lasxml',
|
|
||||||
'application/vnd.llamagraphics.life-balance.desktop' => 'lbd',
|
|
||||||
'application/vnd.llamagraphics.life-balance.exchange+xml' => 'lbe',
|
|
||||||
'application/vnd.lotus-1-2-3' => '123',
|
|
||||||
'application/vnd.lotus-approach' => 'apr',
|
|
||||||
'application/vnd.lotus-freelance' => 'pre',
|
|
||||||
'application/vnd.lotus-notes' => 'nsf',
|
|
||||||
'application/vnd.lotus-organizer' => 'org',
|
|
||||||
'application/vnd.lotus-screencam' => 'scm',
|
|
||||||
'application/vnd.mozilla.xul+xml' => 'xul',
|
|
||||||
'application/vnd.ms-artgalry' => 'cil',
|
|
||||||
'application/vnd.ms-cab-compressed' => 'cab',
|
|
||||||
'application/vnd.ms-excel' => array(
|
|
||||||
'xls',
|
|
||||||
'xlm',
|
|
||||||
'xla',
|
|
||||||
'xlc',
|
|
||||||
'xlt',
|
|
||||||
'xlw'
|
|
||||||
),
|
|
||||||
'application/vnd.ms-excel.addin.macroenabled.12' => 'xlam',
|
|
||||||
'application/vnd.ms-excel.sheet.binary.macroenabled.12' => 'xlsb',
|
|
||||||
'application/vnd.ms-excel.sheet.macroenabled.12' => 'xlsm',
|
|
||||||
'application/vnd.ms-excel.template.macroenabled.12' => 'xltm',
|
|
||||||
'application/vnd.ms-fontobject' => 'eot',
|
|
||||||
'application/vnd.ms-htmlhelp' => 'chm',
|
|
||||||
'application/vnd.ms-ims' => 'ims',
|
|
||||||
'application/vnd.ms-lrm' => 'lrm',
|
|
||||||
'application/vnd.ms-officetheme' => 'thmx',
|
|
||||||
'application/vnd.ms-pki.seccat' => 'cat',
|
|
||||||
'application/vnd.ms-pki.stl' => 'stl',
|
|
||||||
'application/vnd.ms-powerpoint' => array('ppt', 'pps', 'pot'),
|
|
||||||
'application/vnd.ms-powerpoint.addin.macroenabled.12' => 'ppam',
|
|
||||||
'application/vnd.ms-powerpoint.presentation.macroenabled.12' => 'pptm',
|
|
||||||
'application/vnd.ms-powerpoint.slide.macroenabled.12' => 'sldm',
|
|
||||||
'application/vnd.ms-powerpoint.slideshow.macroenabled.12' => 'ppsm',
|
|
||||||
'application/vnd.ms-powerpoint.template.macroenabled.12' => 'potm',
|
|
||||||
'application/vnd.ms-project' => array('mpp', 'mpt'),
|
|
||||||
'application/vnd.ms-word.document.macroenabled.12' => 'docm',
|
|
||||||
'application/vnd.ms-word.template.macroenabled.12' => 'dotm',
|
|
||||||
'application/vnd.ms-works' => array('wps', 'wks', 'wcm', 'wdb'),
|
|
||||||
'application/vnd.ms-wpl' => 'wpl',
|
|
||||||
'application/vnd.ms-xpsdocument' => 'xps',
|
|
||||||
'application/vnd.mseq' => 'mseq',
|
|
||||||
'application/vnd.musician' => 'mus',
|
|
||||||
'application/vnd.oasis.opendocument.chart' => 'odc',
|
|
||||||
'application/vnd.oasis.opendocument.chart-template' => 'otc',
|
|
||||||
'application/vnd.oasis.opendocument.database' => 'odb',
|
|
||||||
'application/vnd.oasis.opendocument.formula' => 'odf',
|
|
||||||
'application/vnd.oasis.opendocument.formula-template' => 'odft',
|
|
||||||
'application/vnd.oasis.opendocument.graphics' => 'odg',
|
|
||||||
'application/vnd.oasis.opendocument.graphics-template' => 'otg',
|
|
||||||
'application/vnd.oasis.opendocument.image' => 'odi',
|
|
||||||
'application/vnd.oasis.opendocument.image-template' => 'oti',
|
|
||||||
'application/vnd.oasis.opendocument.presentation' => 'odp',
|
|
||||||
'application/vnd.oasis.opendocument.presentation-template' => 'otp',
|
|
||||||
'application/vnd.oasis.opendocument.spreadsheet' => 'ods',
|
|
||||||
'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots',
|
|
||||||
'application/vnd.oasis.opendocument.text' => 'odt',
|
|
||||||
'application/vnd.oasis.opendocument.text-master' => 'odm',
|
|
||||||
'application/vnd.oasis.opendocument.text-template' => 'ott',
|
|
||||||
'application/vnd.oasis.opendocument.text-web' => 'oth',
|
|
||||||
'application/vnd.olpc-sugar' => 'xo',
|
|
||||||
'application/vnd.oma.dd2+xml' => 'dd2',
|
|
||||||
'application/vnd.openofficeorg.extension' => 'oxt',
|
|
||||||
'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx',
|
|
||||||
'application/vnd.openxmlformats-officedocument.presentationml.slide' => 'sldx',
|
|
||||||
'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'ppsx',
|
|
||||||
'application/vnd.openxmlformats-officedocument.presentationml.template' => 'potx',
|
|
||||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx',
|
|
||||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'xltx',
|
|
||||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx',
|
|
||||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'dotx',
|
|
||||||
'application/vnd.pvi.ptid1' => 'ptid',
|
|
||||||
'application/vnd.quark.quarkxpress' => array(
|
|
||||||
'qxd',
|
|
||||||
'qxt',
|
|
||||||
'qwd',
|
|
||||||
'qwt',
|
|
||||||
'qxl',
|
|
||||||
'qxb'
|
|
||||||
),
|
|
||||||
'application/vnd.realvnc.bed' => 'bed',
|
|
||||||
'application/vnd.recordare.musicxml' => 'mxl',
|
|
||||||
'application/vnd.recordare.musicxml+xml' => 'musicxml',
|
|
||||||
'application/vnd.rig.cryptonote' => 'cryptonote',
|
|
||||||
'application/vnd.rim.cod' => 'cod',
|
|
||||||
'application/vnd.rn-realmedia' => 'rm',
|
|
||||||
'application/vnd.rn-realmedia-vbr' => 'rmvb',
|
|
||||||
'application/vnd.route66.link66+xml' => 'link66',
|
|
||||||
'application/vnd.sailingtracker.track' => 'st',
|
|
||||||
'application/vnd.seemail' => 'see',
|
|
||||||
'application/vnd.sema' => 'sema',
|
|
||||||
'application/vnd.semd' => 'semd',
|
|
||||||
'application/vnd.semf' => 'semf',
|
|
||||||
'application/vnd.shana.informed.formdata' => 'ifm',
|
|
||||||
'application/vnd.shana.informed.formtemplate' => 'itp',
|
|
||||||
'application/vnd.shana.informed.interchange' => 'iif',
|
|
||||||
'application/vnd.shana.informed.package' => 'ipk',
|
|
||||||
'application/vnd.simtech-mindmapper' => array('twd', 'twds'),
|
|
||||||
'application/vnd.smaf' => 'mmf',
|
|
||||||
'application/vnd.stepmania.stepchart' => 'sm',
|
|
||||||
'application/vnd.sun.xml.calc' => 'sxc',
|
|
||||||
'application/vnd.sun.xml.calc.template' => 'stc',
|
|
||||||
'application/vnd.sun.xml.draw' => 'sxd',
|
|
||||||
'application/vnd.sun.xml.draw.template' => 'std',
|
|
||||||
'application/vnd.sun.xml.impress' => 'sxi',
|
|
||||||
'application/vnd.sun.xml.impress.template' => 'sti',
|
|
||||||
'application/vnd.sun.xml.math' => 'sxm',
|
|
||||||
'application/vnd.sun.xml.writer' => 'sxw',
|
|
||||||
'application/vnd.sun.xml.writer.global' => 'sxg',
|
|
||||||
'application/vnd.sun.xml.writer.template' => 'stw',
|
|
||||||
'application/vnd.sus-calendar' => array('sus', 'susp'),
|
|
||||||
'application/vnd.svd' => 'svd',
|
|
||||||
'application/vnd.symbian.install' => array('sis', 'sisx'),
|
|
||||||
'application/vnd.syncml+xml' => 'xsm',
|
|
||||||
'application/vnd.syncml.dm+wbxml' => 'bdm',
|
|
||||||
'application/vnd.syncml.dm+xml' => 'xdm',
|
|
||||||
'application/vnd.tao.intent-module-archive' => 'tao',
|
|
||||||
'application/vnd.tcpdump.pcap' => array('pcap', 'cap', 'dmp'),
|
|
||||||
'application/vnd.tmobile-livetv' => 'tmo',
|
|
||||||
'application/vnd.trid.tpt' => 'tpt',
|
|
||||||
'application/vnd.triscape.mxs' => 'mxs',
|
|
||||||
'application/vnd.trueapp' => 'tra',
|
|
||||||
'application/vnd.ufdl' => array('ufd', 'ufdl'),
|
|
||||||
'application/vnd.uiq.theme' => 'utz',
|
|
||||||
'application/vnd.umajin' => 'umj',
|
|
||||||
'application/vnd.unity' => 'unityweb',
|
|
||||||
'application/vnd.uoml+xml' => 'uoml',
|
|
||||||
'application/vnd.vcx' => 'vcx',
|
|
||||||
'application/vnd.visio' => array('vsd', 'vst', 'vss', 'vsw'),
|
|
||||||
'application/vnd.visionary' => 'vis',
|
|
||||||
'application/vnd.vsf' => 'vsf',
|
|
||||||
'application/vnd.wap.wbxml' => 'wbxml',
|
|
||||||
'application/vnd.wap.wmlc' => 'wmlc',
|
|
||||||
'application/vnd.wap.wmlscriptc' => 'wmlsc',
|
|
||||||
'application/vnd.webturbo' => 'wtb',
|
|
||||||
'application/vnd.wolfram.player' => 'nbp',
|
|
||||||
'application/vnd.wordperfect' => 'wpd',
|
|
||||||
'application/vnd.wqd' => 'wqd',
|
|
||||||
'application/vnd.wt.stf' => 'stf',
|
|
||||||
'application/vnd.xara' => 'xar',
|
|
||||||
'application/vnd.xfdl' => 'xfdl',
|
|
||||||
'application/voicexml+xml' => 'vxml',
|
|
||||||
'application/widget' => 'wgt',
|
|
||||||
'application/winhlp' => 'hlp',
|
|
||||||
'application/wsdl+xml' => 'wsdl',
|
|
||||||
'application/wspolicy+xml' => 'wspolicy',
|
|
||||||
'application/x-7z-compressed' => '7z',
|
|
||||||
'application/x-bittorrent' => 'torrent',
|
|
||||||
'application/x-blorb' => array('blb', 'blorb'),
|
|
||||||
'application/x-bzip' => 'bz',
|
|
||||||
'application/x-cdlink' => 'vcd',
|
|
||||||
'application/x-cfs-compressed' => 'cfs',
|
|
||||||
'application/x-chat' => 'chat',
|
|
||||||
'application/x-chess-pgn' => 'pgn',
|
|
||||||
'application/x-conference' => 'nsc',
|
|
||||||
'application/x-cpio' => 'cpio',
|
|
||||||
'application/x-csh' => 'csh',
|
|
||||||
'application/x-debian-package' => array('deb', 'udeb'),
|
|
||||||
'application/x-dgc-compressed' => 'dgc',
|
|
||||||
'application/x-director' => array(
|
|
||||||
'dir',
|
|
||||||
'dcr',
|
|
||||||
'dxr',
|
|
||||||
'cst',
|
|
||||||
'cct',
|
|
||||||
'cxt',
|
|
||||||
'w3d',
|
|
||||||
'fgd',
|
|
||||||
'swa'
|
|
||||||
),
|
|
||||||
'application/x-font-ttf' => array('ttf', 'ttc'),
|
|
||||||
'application/x-font-type1' => array('pfa', 'pfb', 'pfm', 'afm'),
|
|
||||||
'application/x-font-woff' => 'woff',
|
|
||||||
'application/x-freearc' => 'arc',
|
|
||||||
'application/x-futuresplash' => 'spl',
|
|
||||||
'application/x-gca-compressed' => 'gca',
|
|
||||||
'application/x-glulx' => 'ulx',
|
|
||||||
'application/x-gnumeric' => 'gnumeric',
|
|
||||||
'application/x-gramps-xml' => 'gramps',
|
|
||||||
'application/x-gtar' => 'gtar',
|
|
||||||
'application/x-hdf' => 'hdf',
|
|
||||||
'application/x-install-instructions' => 'install',
|
|
||||||
'application/x-iso9660-image' => 'iso',
|
|
||||||
'application/x-java-jnlp-file' => 'jnlp',
|
|
||||||
'application/x-latex' => 'latex',
|
|
||||||
'application/x-lzh-compressed' => array('lzh', 'lha'),
|
|
||||||
'application/x-mie' => 'mie',
|
|
||||||
'application/x-mobipocket-ebook' => array('prc', 'mobi'),
|
|
||||||
'application/x-ms-application' => 'application',
|
|
||||||
'application/x-ms-shortcut' => 'lnk',
|
|
||||||
'application/x-ms-wmd' => 'wmd',
|
|
||||||
'application/x-ms-wmz' => 'wmz',
|
|
||||||
'application/x-ms-xbap' => 'xbap',
|
|
||||||
'application/x-msaccess' => 'mdb',
|
|
||||||
'application/x-msbinder' => 'obd',
|
|
||||||
'application/x-mscardfile' => 'crd',
|
|
||||||
'application/x-msclip' => 'clp',
|
|
||||||
'application/x-msdownload' => array('exe', 'dll', 'com', 'bat', 'msi'),
|
|
||||||
'application/x-msmediaview' => array(
|
|
||||||
'mvb',
|
|
||||||
'm13',
|
|
||||||
'm14'
|
|
||||||
),
|
|
||||||
'application/x-msmetafile' => array('wmf', 'wmz', 'emf', 'emz'),
|
|
||||||
'application/x-rar-compressed' => 'rar',
|
|
||||||
'application/x-research-info-systems' => 'ris',
|
|
||||||
'application/x-sh' => 'sh',
|
|
||||||
'application/x-shar' => 'shar',
|
|
||||||
'application/x-shockwave-flash' => 'swf',
|
|
||||||
'application/x-silverlight-app' => 'xap',
|
|
||||||
'application/x-sql' => 'sql',
|
|
||||||
'application/x-stuffit' => 'sit',
|
|
||||||
'application/x-stuffitx' => 'sitx',
|
|
||||||
'application/x-subrip' => 'srt',
|
|
||||||
'application/x-sv4cpio' => 'sv4cpio',
|
|
||||||
'application/x-sv4crc' => 'sv4crc',
|
|
||||||
'application/x-t3vm-image' => 't3',
|
|
||||||
'application/x-tads' => 'gam',
|
|
||||||
'application/x-tar' => 'tar',
|
|
||||||
'application/x-tcl' => 'tcl',
|
|
||||||
'application/x-tex' => 'tex',
|
|
||||||
'application/x-tex-tfm' => 'tfm',
|
|
||||||
'application/x-texinfo' => array('texinfo', 'texi'),
|
|
||||||
'application/x-tgif' => 'obj',
|
|
||||||
'application/x-ustar' => 'ustar',
|
|
||||||
'application/x-wais-source' => 'src',
|
|
||||||
'application/x-x509-ca-cert' => array('der', 'crt'),
|
|
||||||
'application/x-xfig' => 'fig',
|
|
||||||
'application/x-xliff+xml' => 'xlf',
|
|
||||||
'application/x-xpinstall' => 'xpi',
|
|
||||||
'application/x-xz' => 'xz',
|
|
||||||
'application/x-zmachine' => 'z1',
|
|
||||||
'application/xaml+xml' => 'xaml',
|
|
||||||
'application/xcap-diff+xml' => 'xdf',
|
|
||||||
'application/xenc+xml' => 'xenc',
|
|
||||||
'application/xhtml+xml' => array('xhtml', 'xht'),
|
|
||||||
'application/xml' => array('xml', 'xsl'),
|
|
||||||
'application/xml-dtd' => 'dtd',
|
|
||||||
'application/xop+xml' => 'xop',
|
|
||||||
'application/xproc+xml' => 'xpl',
|
|
||||||
'application/xslt+xml' => 'xslt',
|
|
||||||
'application/xspf+xml' => 'xspf',
|
|
||||||
'application/xv+xml' => array('mxml', 'xhvml', 'xvml', 'xvm'),
|
|
||||||
'application/yang' => 'yang',
|
|
||||||
'application/yin+xml' => 'yin',
|
|
||||||
'application/zip' => 'zip',
|
|
||||||
'audio/adpcm' => 'adp',
|
|
||||||
'audio/basic' => array('au', 'snd'),
|
|
||||||
'audio/midi' => array('mid', 'midi', 'kar', 'rmi'),
|
|
||||||
'audio/mp4' => 'mp4a',
|
|
||||||
'audio/mpeg' => array(
|
|
||||||
'mpga',
|
|
||||||
'mp2',
|
|
||||||
'mp2a',
|
|
||||||
'mp3',
|
|
||||||
'm2a',
|
|
||||||
'm3a'
|
|
||||||
),
|
|
||||||
'audio/ogg' => array('oga', 'ogg', 'spx'),
|
|
||||||
'audio/vnd.dece.audio' => array('uva', 'uvva'),
|
|
||||||
'audio/vnd.rip' => 'rip',
|
|
||||||
'audio/webm' => 'weba',
|
|
||||||
'audio/x-aac' => 'aac',
|
|
||||||
'audio/x-aiff' => array('aif', 'aiff', 'aifc'),
|
|
||||||
'audio/x-caf' => 'caf',
|
|
||||||
'audio/x-flac' => 'flac',
|
|
||||||
'audio/x-matroska' => 'mka',
|
|
||||||
'audio/x-mpegurl' => 'm3u',
|
|
||||||
'audio/x-ms-wax' => 'wax',
|
|
||||||
'audio/x-ms-wma' => 'wma',
|
|
||||||
'audio/x-pn-realaudio' => array('ram', 'ra'),
|
|
||||||
'audio/x-pn-realaudio-plugin' => 'rmp',
|
|
||||||
'audio/x-wav' => 'wav',
|
|
||||||
'audio/xm' => 'xm',
|
|
||||||
'image/bmp' => 'bmp',
|
|
||||||
'image/cgm' => 'cgm',
|
|
||||||
'image/g3fax' => 'g3',
|
|
||||||
'image/gif' => 'gif',
|
|
||||||
'image/ief' => 'ief',
|
|
||||||
'image/jpeg' => array('jpeg', 'jpg', 'jpe'),
|
|
||||||
'image/ktx' => 'ktx',
|
|
||||||
'image/png' => 'png',
|
|
||||||
'image/prs.btif' => 'btif',
|
|
||||||
'image/sgi' => 'sgi',
|
|
||||||
'image/svg+xml' => array('svg', 'svgz'),
|
|
||||||
'image/tiff' => array('tiff', 'tif'),
|
|
||||||
'image/vnd.adobe.photoshop' => 'psd',
|
|
||||||
'image/vnd.dece.graphic' => array('uvi', 'uvvi', 'uvg', 'uvvg'),
|
|
||||||
'image/vnd.dvb.subtitle' => 'sub',
|
|
||||||
'image/vnd.djvu' => array('djvu', 'djv'),
|
|
||||||
'image/vnd.dwg' => 'dwg',
|
|
||||||
'image/vnd.dxf' => 'dxf',
|
|
||||||
'image/vnd.fastbidsheet' => 'fbs',
|
|
||||||
'image/vnd.fpx' => 'fpx',
|
|
||||||
'image/vnd.fst' => 'fst',
|
|
||||||
'image/vnd.fujixerox.edmics-mmr' => 'mmr',
|
|
||||||
'image/vnd.fujixerox.edmics-rlc' => 'rlc',
|
|
||||||
'image/vnd.ms-modi' => 'mdi',
|
|
||||||
'image/vnd.ms-photo' => 'wdp',
|
|
||||||
'image/vnd.net-fpx' => 'npx',
|
|
||||||
'image/vnd.wap.wbmp' => 'wbmp',
|
|
||||||
'image/vnd.xiff' => 'xif',
|
|
||||||
'image/webp' => 'webp',
|
|
||||||
'image/x-3ds' => '3ds',
|
|
||||||
'image/x-cmu-raster' => 'ras',
|
|
||||||
'image/x-cmx' => 'cmx',
|
|
||||||
'image/x-freehand' => array('fh', 'fhc', 'fh4', 'fh5', 'fh7'),
|
|
||||||
'image/x-icon' => 'ico',
|
|
||||||
'image/x-mrsid-image' => 'sid',
|
|
||||||
'image/x-pcx' => 'pcx',
|
|
||||||
'image/x-pict' => array('pic', 'pct'),
|
|
||||||
'image/x-portable-anymap' => 'pnm',
|
|
||||||
'image/x-portable-bitmap' => 'pbm',
|
|
||||||
'image/x-portable-graymap' => 'pgm',
|
|
||||||
'image/x-portable-pixmap' => 'ppm',
|
|
||||||
'image/x-rgb' => 'rgb',
|
|
||||||
'image/x-tga' => 'tga',
|
|
||||||
'image/x-xbitmap' => 'xbm',
|
|
||||||
'image/x-xpixmap' => 'xpm',
|
|
||||||
'image/x-xwindowdump' => 'xwd',
|
|
||||||
'message/rfc822' => array('eml', 'mime'),
|
|
||||||
'model/iges' => array('igs', 'iges'),
|
|
||||||
'model/mesh' => array('msh', 'mesh', 'silo'),
|
|
||||||
'model/vnd.collada+xml' => 'dae',
|
|
||||||
'model/vnd.dwf' => 'dwf',
|
|
||||||
'model/vnd.gdl' => 'gdl',
|
|
||||||
'model/vnd.gtw' => 'gtw',
|
|
||||||
'model/vnd.mts' => 'mts',
|
|
||||||
'model/vnd.vtu' => 'vtu',
|
|
||||||
'model/vrml' => array('wrl', 'vrml'),
|
|
||||||
'model/x3d+binary' => 'x3db',
|
|
||||||
'model/x3d+vrml' => 'x3dv',
|
|
||||||
'model/x3d+xml' => 'x3d',
|
|
||||||
'text/cache-manifest' => 'appcache',
|
|
||||||
'text/calendar' => array('ics', 'ifb'),
|
|
||||||
'text/css' => 'css',
|
|
||||||
'text/csv' => 'csv',
|
|
||||||
'text/html' => array('html', 'htm'),
|
|
||||||
'text/n3' => 'n3',
|
|
||||||
'text/plain' => array(
|
|
||||||
'txt',
|
|
||||||
'text',
|
|
||||||
'conf',
|
|
||||||
'def',
|
|
||||||
'list',
|
|
||||||
'log',
|
|
||||||
'in'
|
|
||||||
),
|
|
||||||
'text/prs.lines.tag' => 'dsc',
|
|
||||||
'text/richtext' => 'rtx',
|
|
||||||
'text/sgml' => array('sgml', 'sgm'),
|
|
||||||
'text/tab-separated-values' => 'tsv',
|
|
||||||
'text/troff' => array(
|
|
||||||
't',
|
|
||||||
'tr',
|
|
||||||
'roff',
|
|
||||||
'man',
|
|
||||||
'me',
|
|
||||||
'ms'
|
|
||||||
),
|
|
||||||
'text/turtle' => 'ttl',
|
|
||||||
'text/uri-list' => array('uri', 'uris', 'urls'),
|
|
||||||
'text/vcard' => 'vcard',
|
|
||||||
'text/vnd.curl' => 'curl',
|
|
||||||
'text/vnd.curl.dcurl' => 'dcurl',
|
|
||||||
'text/vnd.curl.scurl' => 'scurl',
|
|
||||||
'text/vnd.curl.mcurl' => 'mcurl',
|
|
||||||
'text/vnd.dvb.subtitle' => 'sub',
|
|
||||||
'text/vnd.fly' => 'fly',
|
|
||||||
'text/vnd.fmi.flexstor' => 'flx',
|
|
||||||
'text/vnd.graphviz' => 'gv',
|
|
||||||
'text/vnd.in3d.3dml' => '3dml',
|
|
||||||
'text/vnd.in3d.spot' => 'spot',
|
|
||||||
'text/vnd.sun.j2me.app-descriptor' => 'jad',
|
|
||||||
'text/vnd.wap.wml' => 'wml',
|
|
||||||
'text/vnd.wap.wmlscript' => 'wmls',
|
|
||||||
'text/x-asm' => array('s', 'asm'),
|
|
||||||
'text/x-fortran' => array('f', 'for', 'f77', 'f90'),
|
|
||||||
'text/x-java-source' => 'java',
|
|
||||||
'text/x-opml' => 'opml',
|
|
||||||
'text/x-pascal' => array('p', 'pas'),
|
|
||||||
'text/x-nfo' => 'nfo',
|
|
||||||
'text/x-setext' => 'etx',
|
|
||||||
'text/x-sfv' => 'sfv',
|
|
||||||
'text/x-uuencode' => 'uu',
|
|
||||||
'text/x-vcalendar' => 'vcs',
|
|
||||||
'text/x-vcard' => 'vcf',
|
|
||||||
'video/3gpp' => '3gp',
|
|
||||||
'video/3gpp2' => '3g2',
|
|
||||||
'video/h261' => 'h261',
|
|
||||||
'video/h263' => 'h263',
|
|
||||||
'video/h264' => 'h264',
|
|
||||||
'video/jpeg' => 'jpgv',
|
|
||||||
'video/jpm' => array('jpm', 'jpgm'),
|
|
||||||
'video/mj2' => 'mj2',
|
|
||||||
'video/mp4' => 'mp4',
|
|
||||||
'video/mpeg' => array('mpeg', 'mpg', 'mpe', 'm1v', 'm2v'),
|
|
||||||
'video/ogg' => 'ogv',
|
|
||||||
'video/quicktime' => array('qt', 'mov'),
|
|
||||||
'video/vnd.dece.hd' => array('uvh', 'uvvh'),
|
|
||||||
'video/vnd.dece.mobile' => array('uvm', 'uvvm'),
|
|
||||||
'video/vnd.dece.pd' => array('uvp', 'uvvp'),
|
|
||||||
'video/vnd.dece.sd' => array('uvs', 'uvvs'),
|
|
||||||
'video/vnd.dece.video' => array('uvv', 'uvvv'),
|
|
||||||
'video/vnd.dvb.file' => 'dvb',
|
|
||||||
'video/vnd.fvt' => 'fvt',
|
|
||||||
'video/vnd.mpegurl' => array('mxu', 'm4u'),
|
|
||||||
'video/vnd.ms-playready.media.pyv' => 'pyv',
|
|
||||||
'video/vnd.uvvu.mp4' => array('uvu', 'uvvu'),
|
|
||||||
'video/vnd.vivo' => 'viv',
|
|
||||||
'video/webm' => 'webm',
|
|
||||||
'video/x-f4v' => 'f4v',
|
|
||||||
'video/x-fli' => 'fli',
|
|
||||||
'video/x-flv' => 'flv',
|
|
||||||
'video/x-m4v' => 'm4v',
|
|
||||||
'video/x-matroska' => array('mkv', 'mk3d', 'mks'),
|
|
||||||
'video/x-mng' => 'mng',
|
|
||||||
'video/x-ms-asf' => array('asf', 'asx'),
|
|
||||||
'video/x-ms-vob' => 'vob',
|
|
||||||
'video/x-ms-wm' => 'wm',
|
|
||||||
'video/x-ms-wmv' => 'wmv',
|
|
||||||
'video/x-ms-wmx' => 'wmx',
|
|
||||||
'video/x-ms-wvx' => 'wvx',
|
|
||||||
'video/x-msvideo' => 'avi',
|
|
||||||
'video/x-sgi-movie' => 'movie',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a random MIME type
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* @example 'video/avi'
|
|
||||||
*/
|
|
||||||
public static function mimeType()
|
|
||||||
{
|
|
||||||
return static::randomElement(array_keys(static::$mimeTypes));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a random file extension (without a dot)
|
|
||||||
*
|
|
||||||
* @example avi
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function fileExtension()
|
|
||||||
{
|
|
||||||
$random_extension = static::randomElement(array_values(static::$mimeTypes));
|
|
||||||
|
|
||||||
return is_array($random_extension) ? static::randomElement($random_extension) : $random_extension;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copy a random file from the source directory to the target directory and returns the filename/fullpath
|
|
||||||
*
|
|
||||||
* @param string $sourceDirectory The directory to look for random file taking
|
|
||||||
* @param string $targetDirectory
|
|
||||||
* @param boolean $fullPath Whether to have the full path or just the filename
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function file($sourceDirectory = '/tmp', $targetDirectory = '/tmp', $fullPath = true)
|
|
||||||
{
|
|
||||||
if (!is_dir($sourceDirectory)) {
|
|
||||||
throw new \InvalidArgumentException(sprintf('Source directory %s does not exist or is not a directory.', $sourceDirectory));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_dir($targetDirectory)) {
|
|
||||||
throw new \InvalidArgumentException(sprintf('Target directory %s does not exist or is not a directory.', $targetDirectory));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($sourceDirectory == $targetDirectory) {
|
|
||||||
throw new \InvalidArgumentException('Source and target directories must differ.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Drop . and .. and reset array keys
|
|
||||||
$files = array_filter(array_values(array_diff(scandir($sourceDirectory), array('.', '..'))), function ($file) use ($sourceDirectory) {
|
|
||||||
return is_file($sourceDirectory . DIRECTORY_SEPARATOR . $file) && is_readable($sourceDirectory . DIRECTORY_SEPARATOR . $file);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (empty($files)) {
|
|
||||||
throw new \InvalidArgumentException(sprintf('Source directory %s is empty.', $sourceDirectory));
|
|
||||||
}
|
|
||||||
|
|
||||||
$sourceFullPath = $sourceDirectory . DIRECTORY_SEPARATOR . static::randomElement($files);
|
|
||||||
|
|
||||||
$destinationFile = Uuid::uuid() . '.' . pathinfo($sourceFullPath, PATHINFO_EXTENSION);
|
|
||||||
$destinationFullPath = $targetDirectory . DIRECTORY_SEPARATOR . $destinationFile;
|
|
||||||
|
|
||||||
if (false === copy($sourceFullPath, $destinationFullPath)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $fullPath ? $destinationFullPath : $destinationFile;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,105 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Depends on image generation from http://lorempixel.com/
|
|
||||||
*/
|
|
||||||
class Image extends Base
|
|
||||||
{
|
|
||||||
protected static $categories = array(
|
|
||||||
'abstract', 'animals', 'business', 'cats', 'city', 'food', 'nightlife',
|
|
||||||
'fashion', 'people', 'nature', 'sports', 'technics', 'transport'
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate the URL that will return a random image
|
|
||||||
*
|
|
||||||
* Set randomize to false to remove the random GET parameter at the end of the url.
|
|
||||||
*
|
|
||||||
* @example 'http://lorempixel.com/640/480/?12345'
|
|
||||||
*
|
|
||||||
* @param integer $width
|
|
||||||
* @param integer $height
|
|
||||||
* @param string|null $category
|
|
||||||
* @param bool $randomize
|
|
||||||
* @param string|null $word
|
|
||||||
* @param bool $gray
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function imageUrl($width = 640, $height = 480, $category = null, $randomize = true, $word = null, $gray = false)
|
|
||||||
{
|
|
||||||
$baseUrl = "https://lorempixel.com/";
|
|
||||||
$url = "{$width}/{$height}/";
|
|
||||||
|
|
||||||
if ($gray) {
|
|
||||||
$url = "gray/" . $url;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($category) {
|
|
||||||
if (!in_array($category, static::$categories)) {
|
|
||||||
throw new \InvalidArgumentException(sprintf('Unknown image category "%s"', $category));
|
|
||||||
}
|
|
||||||
$url .= "{$category}/";
|
|
||||||
if ($word) {
|
|
||||||
$url .= "{$word}/";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($randomize) {
|
|
||||||
$url .= '?' . static::randomNumber(5, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $baseUrl . $url;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Download a remote random image to disk and return its location
|
|
||||||
*
|
|
||||||
* Requires curl, or allow_url_fopen to be on in php.ini.
|
|
||||||
*
|
|
||||||
* @example '/path/to/dir/13b73edae8443990be1aa8f1a483bc27.jpg'
|
|
||||||
*/
|
|
||||||
public static function image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null, $gray = false)
|
|
||||||
{
|
|
||||||
$dir = is_null($dir) ? sys_get_temp_dir() : $dir; // GNU/Linux / OS X / Windows compatible
|
|
||||||
// Validate directory path
|
|
||||||
if (!is_dir($dir) || !is_writable($dir)) {
|
|
||||||
throw new \InvalidArgumentException(sprintf('Cannot write to directory "%s"', $dir));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generate a random filename. Use the server address so that a file
|
|
||||||
// generated at the same time on a different server won't have a collision.
|
|
||||||
$name = md5(uniqid(empty($_SERVER['SERVER_ADDR']) ? '' : $_SERVER['SERVER_ADDR'], true));
|
|
||||||
$filename = $name .'.jpg';
|
|
||||||
$filepath = $dir . DIRECTORY_SEPARATOR . $filename;
|
|
||||||
|
|
||||||
$url = static::imageUrl($width, $height, $category, $randomize, $word, $gray);
|
|
||||||
|
|
||||||
// save file
|
|
||||||
if (function_exists('curl_exec')) {
|
|
||||||
// use cURL
|
|
||||||
$fp = fopen($filepath, 'w');
|
|
||||||
$ch = curl_init($url);
|
|
||||||
curl_setopt($ch, CURLOPT_FILE, $fp);
|
|
||||||
$success = curl_exec($ch) && curl_getinfo($ch, CURLINFO_HTTP_CODE) === 200;
|
|
||||||
fclose($fp);
|
|
||||||
curl_close($ch);
|
|
||||||
|
|
||||||
if (!$success) {
|
|
||||||
unlink($filepath);
|
|
||||||
|
|
||||||
// could not contact the distant URL or HTTP error - fail silently.
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} elseif (ini_get('allow_url_fopen')) {
|
|
||||||
// use remote fopen() via copy()
|
|
||||||
$success = copy($url, $filepath);
|
|
||||||
} else {
|
|
||||||
return new \RuntimeException('The image formatter downloads an image from a remote HTTP server. Therefore, it requires that PHP can request remote hosts, either via cURL or fopen()');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $fullPath ? $filepath : $filename;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,362 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
class Internet extends Base
|
|
||||||
{
|
|
||||||
protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'hotmail.com');
|
|
||||||
protected static $tld = array('com', 'com', 'com', 'com', 'com', 'com', 'biz', 'info', 'net', 'org');
|
|
||||||
|
|
||||||
protected static $userNameFormats = array(
|
|
||||||
'{{lastName}}.{{firstName}}',
|
|
||||||
'{{firstName}}.{{lastName}}',
|
|
||||||
'{{firstName}}##',
|
|
||||||
'?{{lastName}}',
|
|
||||||
);
|
|
||||||
protected static $emailFormats = array(
|
|
||||||
'{{userName}}@{{domainName}}',
|
|
||||||
'{{userName}}@{{freeEmailDomain}}',
|
|
||||||
);
|
|
||||||
protected static $urlFormats = array(
|
|
||||||
'http://www.{{domainName}}/',
|
|
||||||
'http://{{domainName}}/',
|
|
||||||
'http://www.{{domainName}}/{{slug}}',
|
|
||||||
'http://www.{{domainName}}/{{slug}}',
|
|
||||||
'https://www.{{domainName}}/{{slug}}',
|
|
||||||
'http://www.{{domainName}}/{{slug}}.html',
|
|
||||||
'http://{{domainName}}/{{slug}}',
|
|
||||||
'http://{{domainName}}/{{slug}}',
|
|
||||||
'http://{{domainName}}/{{slug}}.html',
|
|
||||||
'https://{{domainName}}/{{slug}}.html',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'jdoe@acme.biz'
|
|
||||||
*/
|
|
||||||
public function email()
|
|
||||||
{
|
|
||||||
$format = static::randomElement(static::$emailFormats);
|
|
||||||
|
|
||||||
return $this->generator->parse($format);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'jdoe@example.com'
|
|
||||||
*/
|
|
||||||
final public function safeEmail()
|
|
||||||
{
|
|
||||||
return preg_replace('/\s/u', '', $this->userName() . '@' . static::safeEmailDomain());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'jdoe@gmail.com'
|
|
||||||
*/
|
|
||||||
public function freeEmail()
|
|
||||||
{
|
|
||||||
return preg_replace('/\s/u', '', $this->userName() . '@' . static::freeEmailDomain());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'jdoe@dawson.com'
|
|
||||||
*/
|
|
||||||
public function companyEmail()
|
|
||||||
{
|
|
||||||
return preg_replace('/\s/u', '', $this->userName() . '@' . $this->domainName());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'gmail.com'
|
|
||||||
*/
|
|
||||||
public static function freeEmailDomain()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$freeEmailDomain);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'example.org'
|
|
||||||
*/
|
|
||||||
final public static function safeEmailDomain()
|
|
||||||
{
|
|
||||||
$domains = array(
|
|
||||||
'example.com',
|
|
||||||
'example.org',
|
|
||||||
'example.net'
|
|
||||||
);
|
|
||||||
|
|
||||||
return static::randomElement($domains);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @example 'jdoe'
|
|
||||||
*/
|
|
||||||
public function userName()
|
|
||||||
{
|
|
||||||
$format = static::randomElement(static::$userNameFormats);
|
|
||||||
$username = static::bothify($this->generator->parse($format));
|
|
||||||
|
|
||||||
$username = strtolower(static::transliterate($username));
|
|
||||||
|
|
||||||
// check if transliterate() didn't support the language and removed all letters
|
|
||||||
if (trim($username, '._') === '') {
|
|
||||||
throw new \Exception('userName failed with the selected locale. Try a different locale or activate the "intl" PHP extension.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// clean possible trailing dots from first/last names
|
|
||||||
$username = str_replace('..', '.', $username);
|
|
||||||
$username = rtrim($username, '.');
|
|
||||||
|
|
||||||
return $username;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @example 'fY4èHdZv68'
|
|
||||||
*/
|
|
||||||
public function password($minLength = 6, $maxLength = 20)
|
|
||||||
{
|
|
||||||
$pattern = str_repeat('*', $this->numberBetween($minLength, $maxLength));
|
|
||||||
|
|
||||||
return $this->asciify($pattern);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'tiramisu.com'
|
|
||||||
*/
|
|
||||||
public function domainName()
|
|
||||||
{
|
|
||||||
return $this->domainWord() . '.' . $this->tld();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'faber'
|
|
||||||
*/
|
|
||||||
public function domainWord()
|
|
||||||
{
|
|
||||||
$lastName = $this->generator->format('lastName');
|
|
||||||
|
|
||||||
$lastName = strtolower(static::transliterate($lastName));
|
|
||||||
|
|
||||||
// check if transliterate() didn't support the language and removed all letters
|
|
||||||
if (trim($lastName, '._') === '') {
|
|
||||||
throw new \Exception('domainWord failed with the selected locale. Try a different locale or activate the "intl" PHP extension.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// clean possible trailing dot from last name
|
|
||||||
$lastName = rtrim($lastName, '.');
|
|
||||||
|
|
||||||
return $lastName;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'com'
|
|
||||||
*/
|
|
||||||
public function tld()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$tld);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'http://www.runolfsdottir.com/'
|
|
||||||
*/
|
|
||||||
public function url()
|
|
||||||
{
|
|
||||||
$format = static::randomElement(static::$urlFormats);
|
|
||||||
|
|
||||||
return $this->generator->parse($format);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'aut-repellat-commodi-vel-itaque-nihil-id-saepe-nostrum'
|
|
||||||
*/
|
|
||||||
public function slug($nbWords = 6, $variableNbWords = true)
|
|
||||||
{
|
|
||||||
if ($nbWords <= 0) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
if ($variableNbWords) {
|
|
||||||
$nbWords = (int) ($nbWords * mt_rand(60, 140) / 100) + 1;
|
|
||||||
}
|
|
||||||
$words = $this->generator->words($nbWords);
|
|
||||||
|
|
||||||
return join('-', $words);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '237.149.115.38'
|
|
||||||
*/
|
|
||||||
public function ipv4()
|
|
||||||
{
|
|
||||||
return long2ip(mt_rand(0, 1) == 0 ? mt_rand(-2147483648, -2) : mt_rand(16777216, 2147483647));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '35cd:186d:3e23:2986:ef9f:5b41:42a4:e6f1'
|
|
||||||
*/
|
|
||||||
public function ipv6()
|
|
||||||
{
|
|
||||||
$res = array();
|
|
||||||
for ($i=0; $i < 8; $i++) {
|
|
||||||
$res []= dechex(mt_rand(0, "65535"));
|
|
||||||
}
|
|
||||||
|
|
||||||
return join(':', $res);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '10.1.1.17'
|
|
||||||
*/
|
|
||||||
public static function localIpv4()
|
|
||||||
{
|
|
||||||
if (static::numberBetween(0, 1) === 0) {
|
|
||||||
// 10.x.x.x range
|
|
||||||
return long2ip(static::numberBetween(ip2long("10.0.0.0"), ip2long("10.255.255.255")));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 192.168.x.x range
|
|
||||||
return long2ip(static::numberBetween(ip2long("192.168.0.0"), ip2long("192.168.255.255")));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '32:F1:39:2F:D6:18'
|
|
||||||
*/
|
|
||||||
public static function macAddress()
|
|
||||||
{
|
|
||||||
for ($i=0; $i<6; $i++) {
|
|
||||||
$mac[] = sprintf('%02X', static::numberBetween(0, 0xff));
|
|
||||||
}
|
|
||||||
$mac = implode(':', $mac);
|
|
||||||
|
|
||||||
return $mac;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static function transliterate($string)
|
|
||||||
{
|
|
||||||
if (0 === preg_match('/[^A-Za-z0-9_.]/', $string)) {
|
|
||||||
return $string;
|
|
||||||
}
|
|
||||||
|
|
||||||
$transId = 'Any-Latin; Latin-ASCII; NFD; [:Nonspacing Mark:] Remove; NFC;';
|
|
||||||
if (class_exists('Transliterator', false) && $transliterator = \Transliterator::create($transId)) {
|
|
||||||
$transString = $transliterator->transliterate($string);
|
|
||||||
} else {
|
|
||||||
$transString = static::toAscii($string);
|
|
||||||
}
|
|
||||||
|
|
||||||
return preg_replace('/[^A-Za-z0-9_.]/u', '', $transString);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static function toAscii($string)
|
|
||||||
{
|
|
||||||
static $arrayFrom, $arrayTo;
|
|
||||||
|
|
||||||
if (empty($arrayFrom)) {
|
|
||||||
$transliterationTable = array(
|
|
||||||
'IJ'=>'I', 'Ö'=>'O', 'Œ'=>'O', 'Ü'=>'U', 'ä'=>'a', 'æ'=>'a',
|
|
||||||
'ij'=>'i', 'ö'=>'o', 'œ'=>'o', 'ü'=>'u', 'ß'=>'s', 'ſ'=>'s',
|
|
||||||
'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A',
|
|
||||||
'Æ'=>'A', 'Ā'=>'A', 'Ą'=>'A', 'Ă'=>'A', 'Ç'=>'C', 'Ć'=>'C',
|
|
||||||
'Č'=>'C', 'Ĉ'=>'C', 'Ċ'=>'C', 'Ď'=>'D', 'Đ'=>'D', 'È'=>'E',
|
|
||||||
'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ē'=>'E', 'Ę'=>'E', 'Ě'=>'E',
|
|
||||||
'Ĕ'=>'E', 'Ė'=>'E', 'Ĝ'=>'G', 'Ğ'=>'G', 'Ġ'=>'G', 'Ģ'=>'G',
|
|
||||||
'Ĥ'=>'H', 'Ħ'=>'H', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I',
|
|
||||||
'Ī'=>'I', 'Ĩ'=>'I', 'Ĭ'=>'I', 'Į'=>'I', 'İ'=>'I', 'Ĵ'=>'J',
|
|
||||||
'Ķ'=>'K', 'Ľ'=>'K', 'Ĺ'=>'K', 'Ļ'=>'K', 'Ŀ'=>'K', 'Ł'=>'L',
|
|
||||||
'Ñ'=>'N', 'Ń'=>'N', 'Ň'=>'N', 'Ņ'=>'N', 'Ŋ'=>'N', 'Ò'=>'O',
|
|
||||||
'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ø'=>'O', 'Ō'=>'O', 'Ő'=>'O',
|
|
||||||
'Ŏ'=>'O', 'Ŕ'=>'R', 'Ř'=>'R', 'Ŗ'=>'R', 'Ś'=>'S', 'Ş'=>'S',
|
|
||||||
'Ŝ'=>'S', 'Ș'=>'S', 'Š'=>'S', 'Ť'=>'T', 'Ţ'=>'T', 'Ŧ'=>'T',
|
|
||||||
'Ț'=>'T', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ū'=>'U', 'Ů'=>'U',
|
|
||||||
'Ű'=>'U', 'Ŭ'=>'U', 'Ũ'=>'U', 'Ų'=>'U', 'Ŵ'=>'W', 'Ŷ'=>'Y',
|
|
||||||
'Ÿ'=>'Y', 'Ý'=>'Y', 'Ź'=>'Z', 'Ż'=>'Z', 'Ž'=>'Z', 'à'=>'a',
|
|
||||||
'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ā'=>'a', 'ą'=>'a', 'ă'=>'a',
|
|
||||||
'å'=>'a', 'ç'=>'c', 'ć'=>'c', 'č'=>'c', 'ĉ'=>'c', 'ċ'=>'c',
|
|
||||||
'ď'=>'d', 'đ'=>'d', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e',
|
|
||||||
'ē'=>'e', 'ę'=>'e', 'ě'=>'e', 'ĕ'=>'e', 'ė'=>'e', 'ƒ'=>'f',
|
|
||||||
'ĝ'=>'g', 'ğ'=>'g', 'ġ'=>'g', 'ģ'=>'g', 'ĥ'=>'h', 'ħ'=>'h',
|
|
||||||
'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ī'=>'i', 'ĩ'=>'i',
|
|
||||||
'ĭ'=>'i', 'į'=>'i', 'ı'=>'i', 'ĵ'=>'j', 'ķ'=>'k', 'ĸ'=>'k',
|
|
||||||
'ł'=>'l', 'ľ'=>'l', 'ĺ'=>'l', 'ļ'=>'l', 'ŀ'=>'l', 'ñ'=>'n',
|
|
||||||
'ń'=>'n', 'ň'=>'n', 'ņ'=>'n', 'ʼn'=>'n', 'ŋ'=>'n', 'ò'=>'o',
|
|
||||||
'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ø'=>'o', 'ō'=>'o', 'ő'=>'o',
|
|
||||||
'ŏ'=>'o', 'ŕ'=>'r', 'ř'=>'r', 'ŗ'=>'r', 'ś'=>'s', 'š'=>'s',
|
|
||||||
'ť'=>'t', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ū'=>'u', 'ů'=>'u',
|
|
||||||
'ű'=>'u', 'ŭ'=>'u', 'ũ'=>'u', 'ų'=>'u', 'ŵ'=>'w', 'ÿ'=>'y',
|
|
||||||
'ý'=>'y', 'ŷ'=>'y', 'ż'=>'z', 'ź'=>'z', 'ž'=>'z', 'Α'=>'A',
|
|
||||||
'Ά'=>'A', 'Ἀ'=>'A', 'Ἁ'=>'A', 'Ἂ'=>'A', 'Ἃ'=>'A', 'Ἄ'=>'A',
|
|
||||||
'Ἅ'=>'A', 'Ἆ'=>'A', 'Ἇ'=>'A', 'ᾈ'=>'A', 'ᾉ'=>'A', 'ᾊ'=>'A',
|
|
||||||
'ᾋ'=>'A', 'ᾌ'=>'A', 'ᾍ'=>'A', 'ᾎ'=>'A', 'ᾏ'=>'A', 'Ᾰ'=>'A',
|
|
||||||
'Ᾱ'=>'A', 'Ὰ'=>'A', 'ᾼ'=>'A', 'Β'=>'B', 'Γ'=>'G', 'Δ'=>'D',
|
|
||||||
'Ε'=>'E', 'Έ'=>'E', 'Ἐ'=>'E', 'Ἑ'=>'E', 'Ἒ'=>'E', 'Ἓ'=>'E',
|
|
||||||
'Ἔ'=>'E', 'Ἕ'=>'E', 'Ὲ'=>'E', 'Ζ'=>'Z', 'Η'=>'I', 'Ή'=>'I',
|
|
||||||
'Ἠ'=>'I', 'Ἡ'=>'I', 'Ἢ'=>'I', 'Ἣ'=>'I', 'Ἤ'=>'I', 'Ἥ'=>'I',
|
|
||||||
'Ἦ'=>'I', 'Ἧ'=>'I', 'ᾘ'=>'I', 'ᾙ'=>'I', 'ᾚ'=>'I', 'ᾛ'=>'I',
|
|
||||||
'ᾜ'=>'I', 'ᾝ'=>'I', 'ᾞ'=>'I', 'ᾟ'=>'I', 'Ὴ'=>'I', 'ῌ'=>'I',
|
|
||||||
'Θ'=>'T', 'Ι'=>'I', 'Ί'=>'I', 'Ϊ'=>'I', 'Ἰ'=>'I', 'Ἱ'=>'I',
|
|
||||||
'Ἲ'=>'I', 'Ἳ'=>'I', 'Ἴ'=>'I', 'Ἵ'=>'I', 'Ἶ'=>'I', 'Ἷ'=>'I',
|
|
||||||
'Ῐ'=>'I', 'Ῑ'=>'I', 'Ὶ'=>'I', 'Κ'=>'K', 'Λ'=>'L', 'Μ'=>'M',
|
|
||||||
'Ν'=>'N', 'Ξ'=>'K', 'Ο'=>'O', 'Ό'=>'O', 'Ὀ'=>'O', 'Ὁ'=>'O',
|
|
||||||
'Ὂ'=>'O', 'Ὃ'=>'O', 'Ὄ'=>'O', 'Ὅ'=>'O', 'Ὸ'=>'O', 'Π'=>'P',
|
|
||||||
'Ρ'=>'R', 'Ῥ'=>'R', 'Σ'=>'S', 'Τ'=>'T', 'Υ'=>'Y', 'Ύ'=>'Y',
|
|
||||||
'Ϋ'=>'Y', 'Ὑ'=>'Y', 'Ὓ'=>'Y', 'Ὕ'=>'Y', 'Ὗ'=>'Y', 'Ῠ'=>'Y',
|
|
||||||
'Ῡ'=>'Y', 'Ὺ'=>'Y', 'Φ'=>'F', 'Χ'=>'X', 'Ψ'=>'P', 'Ω'=>'O',
|
|
||||||
'Ώ'=>'O', 'Ὠ'=>'O', 'Ὡ'=>'O', 'Ὢ'=>'O', 'Ὣ'=>'O', 'Ὤ'=>'O',
|
|
||||||
'Ὥ'=>'O', 'Ὦ'=>'O', 'Ὧ'=>'O', 'ᾨ'=>'O', 'ᾩ'=>'O', 'ᾪ'=>'O',
|
|
||||||
'ᾫ'=>'O', 'ᾬ'=>'O', 'ᾭ'=>'O', 'ᾮ'=>'O', 'ᾯ'=>'O', 'Ὼ'=>'O',
|
|
||||||
'ῼ'=>'O', 'α'=>'a', 'ά'=>'a', 'ἀ'=>'a', 'ἁ'=>'a', 'ἂ'=>'a',
|
|
||||||
'ἃ'=>'a', 'ἄ'=>'a', 'ἅ'=>'a', 'ἆ'=>'a', 'ἇ'=>'a', 'ᾀ'=>'a',
|
|
||||||
'ᾁ'=>'a', 'ᾂ'=>'a', 'ᾃ'=>'a', 'ᾄ'=>'a', 'ᾅ'=>'a', 'ᾆ'=>'a',
|
|
||||||
'ᾇ'=>'a', 'ὰ'=>'a', 'ᾰ'=>'a', 'ᾱ'=>'a', 'ᾲ'=>'a', 'ᾳ'=>'a',
|
|
||||||
'ᾴ'=>'a', 'ᾶ'=>'a', 'ᾷ'=>'a', 'β'=>'b', 'γ'=>'g', 'δ'=>'d',
|
|
||||||
'ε'=>'e', 'έ'=>'e', 'ἐ'=>'e', 'ἑ'=>'e', 'ἒ'=>'e', 'ἓ'=>'e',
|
|
||||||
'ἔ'=>'e', 'ἕ'=>'e', 'ὲ'=>'e', 'ζ'=>'z', 'η'=>'i', 'ή'=>'i',
|
|
||||||
'ἠ'=>'i', 'ἡ'=>'i', 'ἢ'=>'i', 'ἣ'=>'i', 'ἤ'=>'i', 'ἥ'=>'i',
|
|
||||||
'ἦ'=>'i', 'ἧ'=>'i', 'ᾐ'=>'i', 'ᾑ'=>'i', 'ᾒ'=>'i', 'ᾓ'=>'i',
|
|
||||||
'ᾔ'=>'i', 'ᾕ'=>'i', 'ᾖ'=>'i', 'ᾗ'=>'i', 'ὴ'=>'i', 'ῂ'=>'i',
|
|
||||||
'ῃ'=>'i', 'ῄ'=>'i', 'ῆ'=>'i', 'ῇ'=>'i', 'θ'=>'t', 'ι'=>'i',
|
|
||||||
'ί'=>'i', 'ϊ'=>'i', 'ΐ'=>'i', 'ἰ'=>'i', 'ἱ'=>'i', 'ἲ'=>'i',
|
|
||||||
'ἳ'=>'i', 'ἴ'=>'i', 'ἵ'=>'i', 'ἶ'=>'i', 'ἷ'=>'i', 'ὶ'=>'i',
|
|
||||||
'ῐ'=>'i', 'ῑ'=>'i', 'ῒ'=>'i', 'ῖ'=>'i', 'ῗ'=>'i', 'κ'=>'k',
|
|
||||||
'λ'=>'l', 'μ'=>'m', 'ν'=>'n', 'ξ'=>'k', 'ο'=>'o', 'ό'=>'o',
|
|
||||||
'ὀ'=>'o', 'ὁ'=>'o', 'ὂ'=>'o', 'ὃ'=>'o', 'ὄ'=>'o', 'ὅ'=>'o',
|
|
||||||
'ὸ'=>'o', 'π'=>'p', 'ρ'=>'r', 'ῤ'=>'r', 'ῥ'=>'r', 'σ'=>'s',
|
|
||||||
'ς'=>'s', 'τ'=>'t', 'υ'=>'y', 'ύ'=>'y', 'ϋ'=>'y', 'ΰ'=>'y',
|
|
||||||
'ὐ'=>'y', 'ὑ'=>'y', 'ὒ'=>'y', 'ὓ'=>'y', 'ὔ'=>'y', 'ὕ'=>'y',
|
|
||||||
'ὖ'=>'y', 'ὗ'=>'y', 'ὺ'=>'y', 'ῠ'=>'y', 'ῡ'=>'y', 'ῢ'=>'y',
|
|
||||||
'ῦ'=>'y', 'ῧ'=>'y', 'φ'=>'f', 'χ'=>'x', 'ψ'=>'p', 'ω'=>'o',
|
|
||||||
'ώ'=>'o', 'ὠ'=>'o', 'ὡ'=>'o', 'ὢ'=>'o', 'ὣ'=>'o', 'ὤ'=>'o',
|
|
||||||
'ὥ'=>'o', 'ὦ'=>'o', 'ὧ'=>'o', 'ᾠ'=>'o', 'ᾡ'=>'o', 'ᾢ'=>'o',
|
|
||||||
'ᾣ'=>'o', 'ᾤ'=>'o', 'ᾥ'=>'o', 'ᾦ'=>'o', 'ᾧ'=>'o', 'ὼ'=>'o',
|
|
||||||
'ῲ'=>'o', 'ῳ'=>'o', 'ῴ'=>'o', 'ῶ'=>'o', 'ῷ'=>'o', 'А'=>'A',
|
|
||||||
'Б'=>'B', 'В'=>'V', 'Г'=>'G', 'Д'=>'D', 'Е'=>'E', 'Ё'=>'E',
|
|
||||||
'Ж'=>'Z', 'З'=>'Z', 'И'=>'I', 'Й'=>'I', 'К'=>'K', 'Л'=>'L',
|
|
||||||
'М'=>'M', 'Н'=>'N', 'О'=>'O', 'П'=>'P', 'Р'=>'R', 'С'=>'S',
|
|
||||||
'Т'=>'T', 'У'=>'U', 'Ф'=>'F', 'Х'=>'K', 'Ц'=>'T', 'Ч'=>'C',
|
|
||||||
'Ш'=>'S', 'Щ'=>'S', 'Ы'=>'Y', 'Э'=>'E', 'Ю'=>'Y', 'Я'=>'Y',
|
|
||||||
'а'=>'A', 'б'=>'B', 'в'=>'V', 'г'=>'G', 'д'=>'D', 'е'=>'E',
|
|
||||||
'ё'=>'E', 'ж'=>'Z', 'з'=>'Z', 'и'=>'I', 'й'=>'I', 'к'=>'K',
|
|
||||||
'л'=>'L', 'м'=>'M', 'н'=>'N', 'о'=>'O', 'п'=>'P', 'р'=>'R',
|
|
||||||
'с'=>'S', 'т'=>'T', 'у'=>'U', 'ф'=>'F', 'х'=>'K', 'ц'=>'T',
|
|
||||||
'ч'=>'C', 'ш'=>'S', 'щ'=>'S', 'ы'=>'Y', 'э'=>'E', 'ю'=>'Y',
|
|
||||||
'я'=>'Y', 'ð'=>'d', 'Ð'=>'D', 'þ'=>'t', 'Þ'=>'T', 'ა'=>'a',
|
|
||||||
'ბ'=>'b', 'გ'=>'g', 'დ'=>'d', 'ე'=>'e', 'ვ'=>'v', 'ზ'=>'z',
|
|
||||||
'თ'=>'t', 'ი'=>'i', 'კ'=>'k', 'ლ'=>'l', 'მ'=>'m', 'ნ'=>'n',
|
|
||||||
'ო'=>'o', 'პ'=>'p', 'ჟ'=>'z', 'რ'=>'r', 'ს'=>'s', 'ტ'=>'t',
|
|
||||||
'უ'=>'u', 'ფ'=>'p', 'ქ'=>'k', 'ღ'=>'g', 'ყ'=>'q', 'შ'=>'s',
|
|
||||||
'ჩ'=>'c', 'ც'=>'t', 'ძ'=>'d', 'წ'=>'t', 'ჭ'=>'c', 'ხ'=>'k',
|
|
||||||
'ჯ'=>'j', 'ჰ'=>'h', 'ţ'=>'t', 'ʼ'=>"'", '̧'=>'', 'ḩ'=>'h',
|
|
||||||
'‘'=>"'", '’'=>"'", 'ừ'=>'u', '/'=>'', 'ế'=>'e', 'ả'=>'a',
|
|
||||||
'ị'=>'i', 'ậ'=>'a', 'ệ'=>'e', 'ỉ'=>'i', 'ồ'=>'o', 'ề'=>'e',
|
|
||||||
'ơ'=>'o', 'ạ'=>'a', 'ẵ'=>'a', 'ư'=>'u', 'ằ'=>'a', 'ầ'=>'a',
|
|
||||||
'ḑ'=>'d', 'Ḩ'=>'H', 'Ḑ'=>'D', 'ș'=>'s', 'ț'=>'t', 'ộ'=>'o',
|
|
||||||
'ắ'=>'a', 'ş'=>'s', "'"=>'', 'ու'=>'u', 'ա'=>'a', 'բ'=>'b',
|
|
||||||
'գ'=>'g', 'դ'=>'d', 'ե'=>'e', 'զ'=>'z', 'է'=>'e', 'ը'=>'y',
|
|
||||||
'թ'=>'t', 'ժ'=>'zh', 'ի'=>'i', 'լ'=>'l', 'խ'=>'kh', 'ծ'=>'ts',
|
|
||||||
'կ'=>'k', 'հ'=>'h', 'ձ'=>'dz', 'ղ'=>'gh', 'ճ'=>'ch', 'մ'=>'m',
|
|
||||||
'յ'=>'y', 'ն'=>'n', 'շ'=>'sh', 'ո'=>'o', 'չ'=>'ch', 'պ'=>'p',
|
|
||||||
'ջ'=>'j', 'ռ'=>'r', 'ս'=>'s', 'վ'=>'v', 'տ'=>'t', 'ր'=>'r',
|
|
||||||
'ց'=>'ts', 'փ'=>'p', 'ք'=>'q', 'և'=>'ev', 'օ'=>'o', 'ֆ'=>'f',
|
|
||||||
);
|
|
||||||
$arrayFrom = array_keys($transliterationTable);
|
|
||||||
$arrayTo = array_values($transliterationTable);
|
|
||||||
}
|
|
||||||
|
|
||||||
return str_replace($arrayFrom, $arrayTo, $string);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,203 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
class Lorem extends Base
|
|
||||||
{
|
|
||||||
protected static $wordList = array(
|
|
||||||
'alias', 'consequatur', 'aut', 'perferendis', 'sit', 'voluptatem',
|
|
||||||
'accusantium', 'doloremque', 'aperiam', 'eaque','ipsa', 'quae', 'ab',
|
|
||||||
'illo', 'inventore', 'veritatis', 'et', 'quasi', 'architecto',
|
|
||||||
'beatae', 'vitae', 'dicta', 'sunt', 'explicabo', 'aspernatur', 'aut',
|
|
||||||
'odit', 'aut', 'fugit', 'sed', 'quia', 'consequuntur', 'magni',
|
|
||||||
'dolores', 'eos', 'qui', 'ratione', 'voluptatem', 'sequi', 'nesciunt',
|
|
||||||
'neque', 'dolorem', 'ipsum', 'quia', 'dolor', 'sit', 'amet',
|
|
||||||
'consectetur', 'adipisci', 'velit', 'sed', 'quia', 'non', 'numquam',
|
|
||||||
'eius', 'modi', 'tempora', 'incidunt', 'ut', 'labore', 'et', 'dolore',
|
|
||||||
'magnam', 'aliquam', 'quaerat', 'voluptatem', 'ut', 'enim', 'ad',
|
|
||||||
'minima', 'veniam', 'quis', 'nostrum', 'exercitationem', 'ullam',
|
|
||||||
'corporis', 'nemo', 'enim', 'ipsam', 'voluptatem', 'quia', 'voluptas',
|
|
||||||
'sit', 'suscipit', 'laboriosam', 'nisi', 'ut', 'aliquid', 'ex', 'ea',
|
|
||||||
'commodi', 'consequatur', 'quis', 'autem', 'vel', 'eum', 'iure',
|
|
||||||
'reprehenderit', 'qui', 'in', 'ea', 'voluptate', 'velit', 'esse',
|
|
||||||
'quam', 'nihil', 'molestiae', 'et', 'iusto', 'odio', 'dignissimos',
|
|
||||||
'ducimus', 'qui', 'blanditiis', 'praesentium', 'laudantium', 'totam',
|
|
||||||
'rem', 'voluptatum', 'deleniti', 'atque', 'corrupti', 'quos',
|
|
||||||
'dolores', 'et', 'quas', 'molestias', 'excepturi', 'sint',
|
|
||||||
'occaecati', 'cupiditate', 'non', 'provident', 'sed', 'ut',
|
|
||||||
'perspiciatis', 'unde', 'omnis', 'iste', 'natus', 'error',
|
|
||||||
'similique', 'sunt', 'in', 'culpa', 'qui', 'officia', 'deserunt',
|
|
||||||
'mollitia', 'animi', 'id', 'est', 'laborum', 'et', 'dolorum', 'fuga',
|
|
||||||
'et', 'harum', 'quidem', 'rerum', 'facilis', 'est', 'et', 'expedita',
|
|
||||||
'distinctio', 'nam', 'libero', 'tempore', 'cum', 'soluta', 'nobis',
|
|
||||||
'est', 'eligendi', 'optio', 'cumque', 'nihil', 'impedit', 'quo',
|
|
||||||
'porro', 'quisquam', 'est', 'qui', 'minus', 'id', 'quod', 'maxime',
|
|
||||||
'placeat', 'facere', 'possimus', 'omnis', 'voluptas', 'assumenda',
|
|
||||||
'est', 'omnis', 'dolor', 'repellendus', 'temporibus', 'autem',
|
|
||||||
'quibusdam', 'et', 'aut', 'consequatur', 'vel', 'illum', 'qui',
|
|
||||||
'dolorem', 'eum', 'fugiat', 'quo', 'voluptas', 'nulla', 'pariatur',
|
|
||||||
'at', 'vero', 'eos', 'et', 'accusamus', 'officiis', 'debitis', 'aut',
|
|
||||||
'rerum', 'necessitatibus', 'saepe', 'eveniet', 'ut', 'et',
|
|
||||||
'voluptates', 'repudiandae', 'sint', 'et', 'molestiae', 'non',
|
|
||||||
'recusandae', 'itaque', 'earum', 'rerum', 'hic', 'tenetur', 'a',
|
|
||||||
'sapiente', 'delectus', 'ut', 'aut', 'reiciendis', 'voluptatibus',
|
|
||||||
'maiores', 'doloribus', 'asperiores', 'repellat'
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'Lorem'
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function word()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$wordList);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate an array of random words
|
|
||||||
*
|
|
||||||
* @example array('Lorem', 'ipsum', 'dolor')
|
|
||||||
* @param integer $nb how many words to return
|
|
||||||
* @param bool $asText if true the sentences are returned as one string
|
|
||||||
* @return array|string
|
|
||||||
*/
|
|
||||||
public static function words($nb = 3, $asText = false)
|
|
||||||
{
|
|
||||||
$words = array();
|
|
||||||
for ($i=0; $i < $nb; $i++) {
|
|
||||||
$words []= static::word();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $asText ? implode(' ', $words) : $words;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a random sentence
|
|
||||||
*
|
|
||||||
* @example 'Lorem ipsum dolor sit amet.'
|
|
||||||
* @param integer $nbWords around how many words the sentence should contain
|
|
||||||
* @param boolean $variableNbWords set to false if you want exactly $nbWords returned,
|
|
||||||
* otherwise $nbWords may vary by +/-40% with a minimum of 1
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function sentence($nbWords = 6, $variableNbWords = true)
|
|
||||||
{
|
|
||||||
if ($nbWords <= 0) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
if ($variableNbWords) {
|
|
||||||
$nbWords = self::randomizeNbElements($nbWords);
|
|
||||||
}
|
|
||||||
|
|
||||||
$words = static::words($nbWords);
|
|
||||||
$words[0] = ucwords($words[0]);
|
|
||||||
|
|
||||||
return implode(' ', $words) . '.';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate an array of sentences
|
|
||||||
*
|
|
||||||
* @example array('Lorem ipsum dolor sit amet.', 'Consectetur adipisicing eli.')
|
|
||||||
* @param integer $nb how many sentences to return
|
|
||||||
* @param bool $asText if true the sentences are returned as one string
|
|
||||||
* @return array|string
|
|
||||||
*/
|
|
||||||
public static function sentences($nb = 3, $asText = false)
|
|
||||||
{
|
|
||||||
$sentences = array();
|
|
||||||
for ($i=0; $i < $nb; $i++) {
|
|
||||||
$sentences []= static::sentence();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $asText ? implode(' ', $sentences) : $sentences;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a single paragraph
|
|
||||||
*
|
|
||||||
* @example 'Sapiente sunt omnis. Ut pariatur ad autem ducimus et. Voluptas rem voluptas sint modi dolorem amet.'
|
|
||||||
* @param integer $nbSentences around how many sentences the paragraph should contain
|
|
||||||
* @param boolean $variableNbSentences set to false if you want exactly $nbSentences returned,
|
|
||||||
* otherwise $nbSentences may vary by +/-40% with a minimum of 1
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function paragraph($nbSentences = 3, $variableNbSentences = true)
|
|
||||||
{
|
|
||||||
if ($nbSentences <= 0) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
if ($variableNbSentences) {
|
|
||||||
$nbSentences = self::randomizeNbElements($nbSentences);
|
|
||||||
}
|
|
||||||
|
|
||||||
return implode(' ', static::sentences($nbSentences));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate an array of paragraphs
|
|
||||||
*
|
|
||||||
* @example array($paragraph1, $paragraph2, $paragraph3)
|
|
||||||
* @param integer $nb how many paragraphs to return
|
|
||||||
* @param bool $asText if true the paragraphs are returned as one string, separated by two newlines
|
|
||||||
* @return array|string
|
|
||||||
*/
|
|
||||||
public static function paragraphs($nb = 3, $asText = false)
|
|
||||||
{
|
|
||||||
$paragraphs = array();
|
|
||||||
for ($i=0; $i < $nb; $i++) {
|
|
||||||
$paragraphs []= static::paragraph();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $asText ? implode("\n\n", $paragraphs) : $paragraphs;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a text string.
|
|
||||||
* Depending on the $maxNbChars, returns a string made of words, sentences, or paragraphs.
|
|
||||||
*
|
|
||||||
* @example 'Sapiente sunt omnis. Ut pariatur ad autem ducimus et. Voluptas rem voluptas sint modi dolorem amet.'
|
|
||||||
*
|
|
||||||
* @param integer $maxNbChars Maximum number of characters the text should contain (minimum 5)
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function text($maxNbChars = 200)
|
|
||||||
{
|
|
||||||
if ($maxNbChars < 5) {
|
|
||||||
throw new \InvalidArgumentException('text() can only generate text of at least 5 characters');
|
|
||||||
}
|
|
||||||
|
|
||||||
$type = ($maxNbChars < 25) ? 'word' : (($maxNbChars < 100) ? 'sentence' : 'paragraph');
|
|
||||||
|
|
||||||
$text = array();
|
|
||||||
while (empty($text)) {
|
|
||||||
$size = 0;
|
|
||||||
|
|
||||||
// until $maxNbChars is reached
|
|
||||||
while ($size < $maxNbChars) {
|
|
||||||
$word = ($size ? ' ' : '') . static::$type();
|
|
||||||
$text[] = $word;
|
|
||||||
|
|
||||||
$size += strlen($word);
|
|
||||||
}
|
|
||||||
|
|
||||||
array_pop($text);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($type === 'word') {
|
|
||||||
// capitalize first letter
|
|
||||||
$text[0] = ucwords($text[0]);
|
|
||||||
|
|
||||||
// end sentence with full stop
|
|
||||||
$text[count($text) - 1] .= '.';
|
|
||||||
}
|
|
||||||
|
|
||||||
return implode('', $text);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static function randomizeNbElements($nbElements)
|
|
||||||
{
|
|
||||||
return (int) ($nbElements * mt_rand(60, 140) / 100) + 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,323 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
class Miscellaneous extends Base
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @link https://en.wikipedia.org/wiki/Emoji#Unicode_blocks
|
|
||||||
* On date of 2017-03-26
|
|
||||||
*
|
|
||||||
* U+1F600 - U+1F637 as their UTF-8 Pairings
|
|
||||||
*/
|
|
||||||
protected static $emoji = array(
|
|
||||||
'\uD83D\uDE00', '\uD83D\uDE01', '\uD83D\uDE02', '\uD83D\uDE03',
|
|
||||||
'\uD83D\uDE04', '\uD83D\uDE05', '\uD83D\uDE06', '\uD83D\uDE07',
|
|
||||||
'\uD83D\uDE08', '\uD83D\uDE09', '\uD83D\uDE0A', '\uD83D\uDE0B',
|
|
||||||
'\uD83D\uDE0C', '\uD83D\uDE0D', '\uD83D\uDE0E', '\uD83D\uDE0F',
|
|
||||||
'\uD83D\uDE10', '\uD83D\uDE11', '\uD83D\uDE12', '\uD83D\uDE13',
|
|
||||||
'\uD83D\uDE14', '\uD83D\uDE15', '\uD83D\uDE16', '\uD83D\uDE17',
|
|
||||||
'\uD83D\uDE18', '\uD83D\uDE19', '\uD83D\uDE1A', '\uD83D\uDE1B',
|
|
||||||
'\uD83D\uDE1C', '\uD83D\uDE1D', '\uD83D\uDE1E', '\uD83D\uDE1F',
|
|
||||||
'\uD83D\uDE20', '\uD83D\uDE21', '\uD83D\uDE22', '\uD83D\uDE23',
|
|
||||||
'\uD83D\uDE24', '\uD83D\uDE25', '\uD83D\uDE26', '\uD83D\uDE27',
|
|
||||||
'\uD83D\uDE28', '\uD83D\uDE29', '\uD83D\uDE2A', '\uD83D\uDE2B',
|
|
||||||
'\uD83D\uDE2C', '\uD83D\uDE2D', '\uD83D\uDE2E', '\uD83D\uDE2F',
|
|
||||||
'\uD83D\uDE30', '\uD83D\uDE31', '\uD83D\uDE32', '\uD83D\uDE33',
|
|
||||||
'\uD83D\uDE34', '\uD83D\uDE35', '\uD83D\uDE36', '\uD83D\uDE37',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
|
|
||||||
* On date of 2016-04-22
|
|
||||||
*/
|
|
||||||
protected static $languageCode = array(
|
|
||||||
'aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av',
|
|
||||||
'ay', 'az', 'ba', 'be', 'bg', 'bh', 'bi', 'bm', 'bn', 'bo',
|
|
||||||
'br', 'bs', 'ca', 'ce', 'ch', 'co', 'cr', 'cs', 'cu', 'cv',
|
|
||||||
'cy', 'da', 'de', 'dv', 'dz', 'ee', 'el', 'en', 'eo', 'es',
|
|
||||||
'et', 'eu', 'fa', 'ff', 'fi', 'fj', 'fo', 'fr', 'fy', 'ga',
|
|
||||||
'gd', 'gl', 'gn', 'gu', 'gv', 'ha', 'he', 'hi', 'ho', 'hr',
|
|
||||||
'ht', 'hu', 'hy', 'hz', 'ia', 'id', 'ie', 'ig', 'ii', 'ik',
|
|
||||||
'io', 'is', 'it', 'iu', 'ja', 'jv', 'ka', 'kg', 'ki', 'kj',
|
|
||||||
'kk', 'kl', 'km', 'kn', 'ko', 'kr', 'ks', 'ku', 'kv', 'kw',
|
|
||||||
'ky', 'la', 'lb', 'lg', 'li', 'ln', 'lo', 'lt', 'lu', 'lv',
|
|
||||||
'mg', 'mh', 'mi', 'mk', 'ml', 'mn', 'mr', 'ms', 'mt', 'my',
|
|
||||||
'na', 'nb', 'nd', 'ne', 'ng', 'nl', 'nn', 'no', 'nr', 'nv',
|
|
||||||
'ny', 'oc', 'oj', 'om', 'or', 'os', 'pa', 'pi', 'pl', 'ps',
|
|
||||||
'pt', 'qu', 'rm', 'rn', 'ro', 'ru', 'rw', 'sa', 'sc', 'sd',
|
|
||||||
'se', 'sg', 'si', 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr',
|
|
||||||
'ss', 'st', 'su', 'sv', 'sw', 'ta', 'te', 'tg', 'th', 'ti',
|
|
||||||
'tk', 'tl', 'tn', 'to', 'tr', 'ts', 'tt', 'tw', 'ty', 'ug',
|
|
||||||
'uk', 'ur', 'uz', 've', 'vi', 'vo', 'wa', 'wo', 'xh', 'yi',
|
|
||||||
'yo', 'za', 'zh', 'zu',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
||||||
* On date of 2014-10-19
|
|
||||||
*/
|
|
||||||
protected static $countryCode = array(
|
|
||||||
'AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR',
|
|
||||||
'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE',
|
|
||||||
'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ',
|
|
||||||
'BR', 'BS', 'BT', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF',
|
|
||||||
'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU',
|
|
||||||
'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO',
|
|
||||||
'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ',
|
|
||||||
'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG',
|
|
||||||
'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT',
|
|
||||||
'GU', 'GW', 'GY', 'HK', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE',
|
|
||||||
'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM',
|
|
||||||
'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR',
|
|
||||||
'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS',
|
|
||||||
'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG',
|
|
||||||
'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS',
|
|
||||||
'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE',
|
|
||||||
'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM',
|
|
||||||
'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR',
|
|
||||||
'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW',
|
|
||||||
'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK',
|
|
||||||
'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY',
|
|
||||||
'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM',
|
|
||||||
'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM',
|
|
||||||
'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU',
|
|
||||||
'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
|
|
||||||
* On date of 2014-10-19
|
|
||||||
*/
|
|
||||||
protected static $countryISOAlpha3 = array(
|
|
||||||
'ABW', 'AFG', 'AGO', 'AIA', 'ALA', 'ALB', 'AND', 'ARE', 'ARG', 'ARM',
|
|
||||||
'ASM', 'ATA', 'ATF', 'ATG', 'AUS', 'AUT', 'AZE', 'BDI', 'BEL', 'BEN',
|
|
||||||
'BES', 'BFA', 'BGD', 'BGR', 'BHR', 'BHS', 'BIH', 'BLM', 'BLR', 'BLZ',
|
|
||||||
'BMU', 'BOL', 'BRA', 'BRB', 'BRN', 'BTN', 'BVT', 'BWA', 'CAF', 'CAN',
|
|
||||||
'CCK', 'CHE', 'CHL', 'CHN', 'CIV', 'CMR', 'COD', 'COG', 'COK', 'COL',
|
|
||||||
'COM', 'CPV', 'CRI', 'CUB', 'CUW', 'CXR', 'CYM', 'CYP', 'CZE', 'DEU',
|
|
||||||
'DJI', 'DMA', 'DNK', 'DOM', 'DZA', 'ECU', 'EGY', 'ERI', 'ESH', 'ESP',
|
|
||||||
'EST', 'ETH', 'FIN', 'FJI', 'FLK', 'FRA', 'FRO', 'FSM', 'GAB', 'GBR',
|
|
||||||
'GEO', 'GGY', 'GHA', 'GIB', 'GIN', 'GLP', 'GMB', 'GNB', 'GNQ', 'GRC',
|
|
||||||
'GRD', 'GRL', 'GTM', 'GUF', 'GUM', 'GUY', 'HKG', 'HMD', 'HND', 'HRV',
|
|
||||||
'HTI', 'HUN', 'IDN', 'IMN', 'IND', 'IOT', 'IRL', 'IRN', 'IRQ', 'ISL',
|
|
||||||
'ISR', 'ITA', 'JAM', 'JEY', 'JOR', 'JPN', 'KAZ', 'KEN', 'KGZ', 'KHM',
|
|
||||||
'KIR', 'KNA', 'KOR', 'KWT', 'LAO', 'LBN', 'LBR', 'LBY', 'LCA', 'LIE',
|
|
||||||
'LKA', 'LSO', 'LTU', 'LUX', 'LVA', 'MAC', 'MAF', 'MAR', 'MCO', 'MDA',
|
|
||||||
'MDG', 'MDV', 'MEX', 'MHL', 'MKD', 'MLI', 'MLT', 'MMR', 'MNE', 'MNG',
|
|
||||||
'MNP', 'MOZ', 'MRT', 'MSR', 'MTQ', 'MUS', 'MWI', 'MYS', 'MYT', 'NAM',
|
|
||||||
'NCL', 'NER', 'NFK', 'NGA', 'NIC', 'NIU', 'NLD', 'NOR', 'NPL', 'NRU',
|
|
||||||
'NZL', 'OMN', 'PAK', 'PAN', 'PCN', 'PER', 'PHL', 'PLW', 'PNG', 'POL',
|
|
||||||
'PRI', 'PRK', 'PRT', 'PRY', 'PSE', 'PYF', 'QAT', 'REU', 'ROU', 'RUS',
|
|
||||||
'RWA', 'SAU', 'SDN', 'SEN', 'SGP', 'SGS', 'SHN', 'SJM', 'SLB', 'SLE',
|
|
||||||
'SLV', 'SMR', 'SOM', 'SPM', 'SRB', 'SSD', 'STP', 'SUR', 'SVK', 'SVN',
|
|
||||||
'SWE', 'SWZ', 'SXM', 'SYC', 'SYR', 'TCA', 'TCD', 'TGO', 'THA', 'TJK',
|
|
||||||
'TKL', 'TKM', 'TLS', 'TON', 'TTO', 'TUN', 'TUR', 'TUV', 'TWN', 'TZA',
|
|
||||||
'UGA', 'UKR', 'UMI', 'URY', 'USA', 'UZB', 'VAT', 'VCT', 'VEN', 'VGB',
|
|
||||||
'VIR', 'VNM', 'VUT', 'WLF', 'WSM', 'YEM', 'ZAF', 'ZMB', 'ZWE',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $localeData = array(
|
|
||||||
'aa_DJ', 'aa_ER', 'aa_ET',
|
|
||||||
'af_NA', 'af_ZA', 'ak_GH',
|
|
||||||
'am_ET', 'ar_AE', 'ar_BH', 'ar_DZ',
|
|
||||||
'ar_EG', 'ar_IQ', 'ar_JO', 'ar_KW', 'ar_LB',
|
|
||||||
'ar_LY', 'ar_MA', 'ar_OM', 'ar_QA', 'ar_SA',
|
|
||||||
'ar_SD', 'ar_SY', 'ar_TN', 'ar_YE',
|
|
||||||
'as_IN', 'az_AZ', 'be_BY',
|
|
||||||
'bg_BG', 'bn_BD', 'bn_IN',
|
|
||||||
'bo_CN', 'bo_IN', 'bs_BA',
|
|
||||||
'byn_ER', 'ca_ES',
|
|
||||||
'cch_NG', 'cs_CZ',
|
|
||||||
'cy_GB', 'da_DK', 'de_AT',
|
|
||||||
'de_BE', 'de_CH', 'de_DE', 'de_LI', 'de_LU',
|
|
||||||
'dv_MV', 'dz_BT',
|
|
||||||
'ee_GH', 'ee_TG', 'el_CY', 'el_GR',
|
|
||||||
'en_AS', 'en_AU', 'en_BE', 'en_BW',
|
|
||||||
'en_BZ', 'en_CA', 'en_GB', 'en_GU', 'en_HK',
|
|
||||||
'en_IE', 'en_IN', 'en_JM', 'en_MH', 'en_MP',
|
|
||||||
'en_MT', 'en_NA', 'en_NZ', 'en_PH', 'en_PK',
|
|
||||||
'en_SG', 'en_TT', 'en_UM', 'en_US', 'en_VI',
|
|
||||||
'en_ZA', 'en_ZW', 'es_AR',
|
|
||||||
'es_BO', 'es_CL', 'es_CO', 'es_CR', 'es_DO',
|
|
||||||
'es_EC', 'es_ES', 'es_GT', 'es_HN', 'es_MX',
|
|
||||||
'es_NI', 'es_PA', 'es_PE', 'es_PR', 'es_PY',
|
|
||||||
'es_SV', 'es_US', 'es_UY', 'es_VE',
|
|
||||||
'et_EE', 'eu_ES', 'fa_AF',
|
|
||||||
'fa_IR', 'fi_FI', 'fil_PH',
|
|
||||||
'fo_FO', 'fr_BE', 'fr_CA',
|
|
||||||
'fr_CH', 'fr_FR', 'fr_LU', 'fr_MC', 'fr_SN',
|
|
||||||
'fur_IT', 'ga_IE',
|
|
||||||
'gaa_GH', 'gez_ER', 'gez_ET',
|
|
||||||
'gl_ES', 'gsw_CH', 'gu_IN',
|
|
||||||
'gv_GB', 'ha_GH', 'ha_NE',
|
|
||||||
'ha_NG', 'ha_SD', 'haw_US',
|
|
||||||
'he_IL', 'hi_IN', 'hr_HR',
|
|
||||||
'hu_HU', 'hy_AM',
|
|
||||||
'id_ID', 'ig_NG',
|
|
||||||
'ii_CN', 'is_IS',
|
|
||||||
'it_CH', 'it_IT',
|
|
||||||
'ja_JP', 'ka_GE', 'kaj_NG',
|
|
||||||
'kam_KE', 'kcg_NG',
|
|
||||||
'kfo_CI', 'kk_KZ', 'kl_GL',
|
|
||||||
'km_KH', 'kn_IN',
|
|
||||||
'ko_KR', 'kok_IN', 'kpe_GN',
|
|
||||||
'kpe_LR', 'ku_IQ', 'ku_IR', 'ku_SY',
|
|
||||||
'ku_TR', 'kw_GB', 'ky_KG',
|
|
||||||
'ln_CD', 'ln_CG', 'lo_LA',
|
|
||||||
'lt_LT', 'lv_LV',
|
|
||||||
'mk_MK', 'ml_IN', 'mn_CN',
|
|
||||||
'mn_MN', 'mr_IN',
|
|
||||||
'ms_BN', 'ms_MY', 'mt_MT',
|
|
||||||
'my_MM', 'nb_NO', 'nds_DE',
|
|
||||||
'ne_IN', 'ne_NP', 'nl_BE',
|
|
||||||
'nl_NL', 'nn_NO',
|
|
||||||
'nr_ZA', 'nso_ZA', 'ny_MW',
|
|
||||||
'oc_FR', 'om_ET', 'om_KE',
|
|
||||||
'or_IN', 'pa_IN', 'pa_PK',
|
|
||||||
'pl_PL', 'ps_AF',
|
|
||||||
'pt_BR', 'pt_PT', 'ro_MD', 'ro_RO',
|
|
||||||
'ru_RU', 'ru_UA', 'rw_RW',
|
|
||||||
'sa_IN', 'se_FI', 'se_NO',
|
|
||||||
'sh_BA', 'sh_CS', 'sh_YU',
|
|
||||||
'si_LK', 'sid_ET', 'sk_SK',
|
|
||||||
'sl_SI', 'so_DJ', 'so_ET',
|
|
||||||
'so_KE', 'so_SO', 'sq_AL',
|
|
||||||
'sr_BA', 'sr_CS', 'sr_ME', 'sr_RS', 'sr_YU',
|
|
||||||
'ss_SZ', 'ss_ZA', 'st_LS',
|
|
||||||
'st_ZA', 'sv_FI', 'sv_SE',
|
|
||||||
'sw_KE', 'sw_TZ', 'syr_SY',
|
|
||||||
'ta_IN', 'te_IN', 'tg_TJ',
|
|
||||||
'th_TH', 'ti_ER', 'ti_ET',
|
|
||||||
'tig_ER', 'tn_ZA',
|
|
||||||
'to_TO', 'tr_TR',
|
|
||||||
'trv_TW', 'ts_ZA', 'tt_RU',
|
|
||||||
'ug_CN', 'uk_UA',
|
|
||||||
'ur_IN', 'ur_PK', 'uz_AF', 'uz_UZ',
|
|
||||||
've_ZA', 'vi_VN',
|
|
||||||
'wal_ET', 'wo_SN', 'xh_ZA',
|
|
||||||
'yo_NG', 'zh_CN', 'zh_HK',
|
|
||||||
'zh_MO', 'zh_SG', 'zh_TW', 'zu_ZA',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link https://en.wikipedia.org/wiki/ISO_4217
|
|
||||||
* On date of 2019-09-27
|
|
||||||
*
|
|
||||||
* With the following exceptions:
|
|
||||||
* SVC has been replaced by the USD in 2001: https://en.wikipedia.org/wiki/Salvadoran_col%C3%B3n
|
|
||||||
* ZWL has been suspended since 2009: https://en.wikipedia.org/wiki/Zimbabwean_dollar
|
|
||||||
*/
|
|
||||||
protected static $currencyCode = array(
|
|
||||||
'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN',
|
|
||||||
'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BRL',
|
|
||||||
'BSD', 'BTN', 'BWP', 'BYN', 'BZD', 'CAD', 'CDF', 'CHF', 'CLP', 'CNY',
|
|
||||||
'COP', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD',
|
|
||||||
'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GHS', 'GIP',
|
|
||||||
'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR',
|
|
||||||
'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS',
|
|
||||||
'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR',
|
|
||||||
'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP',
|
|
||||||
'MRU', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO',
|
|
||||||
'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN',
|
|
||||||
'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG',
|
|
||||||
'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STN', 'SYP', 'SZL',
|
|
||||||
'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH',
|
|
||||||
'UGX', 'USD', 'UYU', 'UZS', 'VES', 'VND', 'VUV', 'WST', 'XAF', 'XCD',
|
|
||||||
'XOF', 'XPF', 'YER', 'ZAR', 'ZMW',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return a boolean, true or false.
|
|
||||||
*
|
|
||||||
* @param int $chanceOfGettingTrue Between 0 (always get false) and 100 (always get true)
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*
|
|
||||||
* @example true
|
|
||||||
*/
|
|
||||||
public static function boolean($chanceOfGettingTrue = 50)
|
|
||||||
{
|
|
||||||
return mt_rand(1, 100) <= $chanceOfGettingTrue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'cfcd208495d565ef66e7dff9f98764da'
|
|
||||||
*/
|
|
||||||
public static function md5()
|
|
||||||
{
|
|
||||||
return md5(mt_rand());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'b5d86317c2a144cd04d0d7c03b2b02666fafadf2'
|
|
||||||
*/
|
|
||||||
public static function sha1()
|
|
||||||
{
|
|
||||||
return sha1(mt_rand());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '85086017559ccc40638fcde2fecaf295e0de7ca51b7517b6aebeaaf75b4d4654'
|
|
||||||
*/
|
|
||||||
public static function sha256()
|
|
||||||
{
|
|
||||||
return hash('sha256', mt_rand());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'fr_FR'
|
|
||||||
*/
|
|
||||||
public static function locale()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$localeData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'FR'
|
|
||||||
*
|
|
||||||
* @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
||||||
*/
|
|
||||||
public static function countryCode()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$countryCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'FRA'
|
|
||||||
*
|
|
||||||
* @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
|
|
||||||
*/
|
|
||||||
public static function countryISOAlpha3()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$countryISOAlpha3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'fr'
|
|
||||||
*/
|
|
||||||
public static function languageCode()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$languageCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'EUR'
|
|
||||||
*
|
|
||||||
* @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
||||||
*/
|
|
||||||
public static function currencyCode()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$currencyCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an encoded Unicode Character between U+1F600 and U+1F637.
|
|
||||||
*
|
|
||||||
* @link https://en.wikipedia.org/wiki/Emoji#Unicode_blocks
|
|
||||||
*/
|
|
||||||
public static function emoji()
|
|
||||||
{
|
|
||||||
return json_decode('"' . static::randomElement(static::$emoji) . '"');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,286 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
use Faker\Calculator\Iban;
|
|
||||||
use Faker\Calculator\Luhn;
|
|
||||||
|
|
||||||
class Payment extends Base
|
|
||||||
{
|
|
||||||
public static $expirationDateFormat = "m/y";
|
|
||||||
|
|
||||||
protected static $cardVendors = array(
|
|
||||||
'Visa', 'Visa', 'Visa', 'Visa', 'Visa',
|
|
||||||
'MasterCard', 'MasterCard', 'MasterCard', 'MasterCard', 'MasterCard',
|
|
||||||
'American Express', 'Discover Card', 'Visa Retired'
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array List of card brand masks for generating valid credit card numbers
|
|
||||||
* @see https://en.wikipedia.org/wiki/Payment_card_number Reference for existing prefixes
|
|
||||||
* @see https://www.mastercard.us/en-us/issuers/get-support/2-series-bin-expansion.html MasterCard 2017 2-Series BIN Expansion
|
|
||||||
*/
|
|
||||||
protected static $cardParams = array(
|
|
||||||
'Visa' => array(
|
|
||||||
"4539###########",
|
|
||||||
"4556###########",
|
|
||||||
"4916###########",
|
|
||||||
"4532###########",
|
|
||||||
"4929###########",
|
|
||||||
"40240071#######",
|
|
||||||
"4485###########",
|
|
||||||
"4716###########",
|
|
||||||
"4##############"
|
|
||||||
),
|
|
||||||
'Visa Retired' => array(
|
|
||||||
"4539########",
|
|
||||||
"4556########",
|
|
||||||
"4916########",
|
|
||||||
"4532########",
|
|
||||||
"4929########",
|
|
||||||
"40240071####",
|
|
||||||
"4485########",
|
|
||||||
"4716########",
|
|
||||||
"4###########",
|
|
||||||
),
|
|
||||||
'MasterCard' => array(
|
|
||||||
"2221###########",
|
|
||||||
"23#############",
|
|
||||||
"24#############",
|
|
||||||
"25#############",
|
|
||||||
"26#############",
|
|
||||||
"2720###########",
|
|
||||||
"51#############",
|
|
||||||
"52#############",
|
|
||||||
"53#############",
|
|
||||||
"54#############",
|
|
||||||
"55#############"
|
|
||||||
),
|
|
||||||
'American Express' => array(
|
|
||||||
"34############",
|
|
||||||
"37############"
|
|
||||||
),
|
|
||||||
'Discover Card' => array(
|
|
||||||
"6011###########"
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array list of IBAN formats, source: @link https://www.swift.com/standards/data-standards/iban
|
|
||||||
*/
|
|
||||||
protected static $ibanFormats = array(
|
|
||||||
'AD' => array(array('n', 4), array('n', 4), array('c', 12)),
|
|
||||||
'AE' => array(array('n', 3), array('n', 16)),
|
|
||||||
'AL' => array(array('n', 8), array('c', 16)),
|
|
||||||
'AT' => array(array('n', 5), array('n', 11)),
|
|
||||||
'AZ' => array(array('a', 4), array('c', 20)),
|
|
||||||
'BA' => array(array('n', 3), array('n', 3), array('n', 8), array('n', 2)),
|
|
||||||
'BE' => array(array('n', 3), array('n', 7), array('n', 2)),
|
|
||||||
'BG' => array(array('a', 4), array('n', 4), array('n', 2), array('c', 8)),
|
|
||||||
'BH' => array(array('a', 4), array('c', 14)),
|
|
||||||
'BR' => array(array('n', 8), array('n', 5), array('n', 10), array('a', 1), array('c', 1)),
|
|
||||||
'CH' => array(array('n', 5), array('c', 12)),
|
|
||||||
'CR' => array(array('n', 3), array('n', 14)),
|
|
||||||
'CY' => array(array('n', 3), array('n', 5), array('c', 16)),
|
|
||||||
'CZ' => array(array('n', 4), array('n', 6), array('n', 10)),
|
|
||||||
'DE' => array(array('n', 8), array('n', 10)),
|
|
||||||
'DK' => array(array('n', 4), array('n', 9), array('n', 1)),
|
|
||||||
'DO' => array(array('c', 4), array('n', 20)),
|
|
||||||
'EE' => array(array('n', 2), array('n', 2), array('n', 11), array('n', 1)),
|
|
||||||
'ES' => array(array('n', 4), array('n', 4), array('n', 1), array('n', 1), array('n', 10)),
|
|
||||||
'FI' => array(array('n', 6), array('n', 7), array('n', 1)),
|
|
||||||
'FR' => array(array('n', 5), array('n', 5), array('c', 11), array('n', 2)),
|
|
||||||
'GB' => array(array('a', 4), array('n', 6), array('n', 8)),
|
|
||||||
'GE' => array(array('a', 2), array('n', 16)),
|
|
||||||
'GI' => array(array('a', 4), array('c', 15)),
|
|
||||||
'GR' => array(array('n', 3), array('n', 4), array('c', 16)),
|
|
||||||
'GT' => array(array('c', 4), array('c', 20)),
|
|
||||||
'HR' => array(array('n', 7), array('n', 10)),
|
|
||||||
'HU' => array(array('n', 3), array('n', 4), array('n', 1), array('n', 15), array('n', 1)),
|
|
||||||
'IE' => array(array('a', 4), array('n', 6), array('n', 8)),
|
|
||||||
'IL' => array(array('n', 3), array('n', 3), array('n', 13)),
|
|
||||||
'IS' => array(array('n', 4), array('n', 2), array('n', 6), array('n', 10)),
|
|
||||||
'IT' => array(array('a', 1), array('n', 5), array('n', 5), array('c', 12)),
|
|
||||||
'KW' => array(array('a', 4), array('n', 22)),
|
|
||||||
'KZ' => array(array('n', 3), array('c', 13)),
|
|
||||||
'LB' => array(array('n', 4), array('c', 20)),
|
|
||||||
'LI' => array(array('n', 5), array('c', 12)),
|
|
||||||
'LT' => array(array('n', 5), array('n', 11)),
|
|
||||||
'LU' => array(array('n', 3), array('c', 13)),
|
|
||||||
'LV' => array(array('a', 4), array('c', 13)),
|
|
||||||
'MC' => array(array('n', 5), array('n', 5), array('c', 11), array('n', 2)),
|
|
||||||
'MD' => array(array('c', 2), array('c', 18)),
|
|
||||||
'ME' => array(array('n', 3), array('n', 13), array('n', 2)),
|
|
||||||
'MK' => array(array('n', 3), array('c', 10), array('n', 2)),
|
|
||||||
'MR' => array(array('n', 5), array('n', 5), array('n', 11), array('n', 2)),
|
|
||||||
'MT' => array(array('a', 4), array('n', 5), array('c', 18)),
|
|
||||||
'MU' => array(array('a', 4), array('n', 2), array('n', 2), array('n', 12), array('n', 3), array('a', 3)),
|
|
||||||
'NL' => array(array('a', 4), array('n', 10)),
|
|
||||||
'NO' => array(array('n', 4), array('n', 6), array('n', 1)),
|
|
||||||
'PK' => array(array('a', 4), array('c', 16)),
|
|
||||||
'PL' => array(array('n', 8), array('n', 16)),
|
|
||||||
'PS' => array(array('a', 4), array('c', 21)),
|
|
||||||
'PT' => array(array('n', 4), array('n', 4), array('n', 11), array('n', 2)),
|
|
||||||
'RO' => array(array('a', 4), array('c', 16)),
|
|
||||||
'RS' => array(array('n', 3), array('n', 13), array('n', 2)),
|
|
||||||
'SA' => array(array('n', 2), array('c', 18)),
|
|
||||||
'SE' => array(array('n', 3), array('n', 16), array('n', 1)),
|
|
||||||
'SI' => array(array('n', 5), array('n', 8), array('n', 2)),
|
|
||||||
'SK' => array(array('n', 4), array('n', 6), array('n', 10)),
|
|
||||||
'SM' => array(array('a', 1), array('n', 5), array('n', 5), array('c', 12)),
|
|
||||||
'TN' => array(array('n', 2), array('n', 3), array('n', 13), array('n', 2)),
|
|
||||||
'TR' => array(array('n', 5), array('n', 1), array('c', 16)),
|
|
||||||
'VG' => array(array('a', 4), array('n', 16)),
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string Returns a credit card vendor name
|
|
||||||
*
|
|
||||||
* @example 'MasterCard'
|
|
||||||
*/
|
|
||||||
public static function creditCardType()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$cardVendors);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the String of a credit card number.
|
|
||||||
*
|
|
||||||
* @param string $type Supporting any of 'Visa', 'MasterCard', 'American Express', and 'Discover'
|
|
||||||
* @param boolean $formatted Set to true if the output string should contain one separator every 4 digits
|
|
||||||
* @param string $separator Separator string for formatting card number. Defaults to dash (-).
|
|
||||||
* @return string
|
|
||||||
*
|
|
||||||
* @example '4485480221084675'
|
|
||||||
*/
|
|
||||||
public static function creditCardNumber($type = null, $formatted = false, $separator = '-')
|
|
||||||
{
|
|
||||||
if (is_null($type)) {
|
|
||||||
$type = static::creditCardType();
|
|
||||||
}
|
|
||||||
$mask = static::randomElement(static::$cardParams[$type]);
|
|
||||||
|
|
||||||
$number = static::numerify($mask);
|
|
||||||
$number .= Luhn::computeCheckDigit($number);
|
|
||||||
|
|
||||||
if ($formatted) {
|
|
||||||
$p1 = substr($number, 0, 4);
|
|
||||||
$p2 = substr($number, 4, 4);
|
|
||||||
$p3 = substr($number, 8, 4);
|
|
||||||
$p4 = substr($number, 12);
|
|
||||||
$number = $p1 . $separator . $p2 . $separator . $p3 . $separator . $p4;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param boolean $valid True (by default) to get a valid expiration date, false to get a maybe valid date
|
|
||||||
* @return \DateTime
|
|
||||||
* @example 04/13
|
|
||||||
*/
|
|
||||||
public function creditCardExpirationDate($valid = true)
|
|
||||||
{
|
|
||||||
if ($valid) {
|
|
||||||
return $this->generator->dateTimeBetween('now', '36 months');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->generator->dateTimeBetween('-36 months', '36 months');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param boolean $valid True (by default) to get a valid expiration date, false to get a maybe valid date
|
|
||||||
* @param string $expirationDateFormat
|
|
||||||
* @return string
|
|
||||||
* @example '04/13'
|
|
||||||
*/
|
|
||||||
public function creditCardExpirationDateString($valid = true, $expirationDateFormat = null)
|
|
||||||
{
|
|
||||||
return $this->creditCardExpirationDate($valid)->format(is_null($expirationDateFormat) ? static::$expirationDateFormat : $expirationDateFormat);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param boolean $valid True (by default) to get a valid expiration date, false to get a maybe valid date
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function creditCardDetails($valid = true)
|
|
||||||
{
|
|
||||||
$type = static::creditCardType();
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'type' => $type,
|
|
||||||
'number' => static::creditCardNumber($type),
|
|
||||||
'name' => $this->generator->name(),
|
|
||||||
'expirationDate' => $this->creditCardExpirationDateString($valid)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* International Bank Account Number (IBAN)
|
|
||||||
*
|
|
||||||
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
|
|
||||||
* @param string $countryCode ISO 3166-1 alpha-2 country code
|
|
||||||
* @param string $prefix for generating bank account number of a specific bank
|
|
||||||
* @param integer $length total length without country code and 2 check digits
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function iban($countryCode = null, $prefix = '', $length = null)
|
|
||||||
{
|
|
||||||
$countryCode = is_null($countryCode) ? self::randomKey(self::$ibanFormats) : strtoupper($countryCode);
|
|
||||||
|
|
||||||
$format = !isset(static::$ibanFormats[$countryCode]) ? null : static::$ibanFormats[$countryCode];
|
|
||||||
if ($length === null) {
|
|
||||||
if ($format === null) {
|
|
||||||
$length = 24;
|
|
||||||
} else {
|
|
||||||
$length = 0;
|
|
||||||
foreach ($format as $part) {
|
|
||||||
list($class, $groupCount) = $part;
|
|
||||||
$length += $groupCount;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($format === null) {
|
|
||||||
$format = array(array('n', $length));
|
|
||||||
}
|
|
||||||
|
|
||||||
$expandedFormat = '';
|
|
||||||
foreach ($format as $item) {
|
|
||||||
list($class, $length) = $item;
|
|
||||||
$expandedFormat .= str_repeat($class, $length);
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = $prefix;
|
|
||||||
$expandedFormat = substr($expandedFormat, strlen($result));
|
|
||||||
foreach (str_split($expandedFormat) as $class) {
|
|
||||||
switch ($class) {
|
|
||||||
default:
|
|
||||||
case 'c':
|
|
||||||
$result .= mt_rand(0, 100) <= 50 ? static::randomDigit() : strtoupper(static::randomLetter());
|
|
||||||
break;
|
|
||||||
case 'a':
|
|
||||||
$result .= strtoupper(static::randomLetter());
|
|
||||||
break;
|
|
||||||
case 'n':
|
|
||||||
$result .= static::randomDigit();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$checksum = Iban::checksum($countryCode . '00' . $result);
|
|
||||||
|
|
||||||
return $countryCode . $checksum . $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the String of a SWIFT/BIC number
|
|
||||||
*
|
|
||||||
* @example 'RZTIAT22263'
|
|
||||||
* @link http://en.wikipedia.org/wiki/ISO_9362
|
|
||||||
* @return string Swift/Bic number
|
|
||||||
*/
|
|
||||||
public static function swiftBicNumber()
|
|
||||||
{
|
|
||||||
return self::regexify("^([A-Z]){4}([A-Z]){2}([0-9A-Z]){2}([0-9A-Z]{3})?$");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,126 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
class Person extends Base
|
|
||||||
{
|
|
||||||
const GENDER_MALE = 'male';
|
|
||||||
const GENDER_FEMALE = 'female';
|
|
||||||
|
|
||||||
protected static $titleFormat = array(
|
|
||||||
'{{titleMale}}',
|
|
||||||
'{{titleFemale}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $firstNameFormat = array(
|
|
||||||
'{{firstNameMale}}',
|
|
||||||
'{{firstNameFemale}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $maleNameFormats = array(
|
|
||||||
'{{firstNameMale}} {{lastName}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $femaleNameFormats = array(
|
|
||||||
'{{firstNameFemale}} {{lastName}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $firstNameMale = array(
|
|
||||||
'John',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $firstNameFemale = array(
|
|
||||||
'Jane',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $lastName = array('Doe');
|
|
||||||
|
|
||||||
protected static $titleMale = array('Mr.', 'Dr.', 'Prof.');
|
|
||||||
|
|
||||||
protected static $titleFemale = array('Mrs.', 'Ms.', 'Miss', 'Dr.', 'Prof.');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string|null $gender 'male', 'female' or null for any
|
|
||||||
* @return string
|
|
||||||
* @example 'John Doe'
|
|
||||||
*/
|
|
||||||
public function name($gender = null)
|
|
||||||
{
|
|
||||||
if ($gender === static::GENDER_MALE) {
|
|
||||||
$format = static::randomElement(static::$maleNameFormats);
|
|
||||||
} elseif ($gender === static::GENDER_FEMALE) {
|
|
||||||
$format = static::randomElement(static::$femaleNameFormats);
|
|
||||||
} else {
|
|
||||||
$format = static::randomElement(array_merge(static::$maleNameFormats, static::$femaleNameFormats));
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->generator->parse($format);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string|null $gender 'male', 'female' or null for any
|
|
||||||
* @return string
|
|
||||||
* @example 'John'
|
|
||||||
*/
|
|
||||||
public function firstName($gender = null)
|
|
||||||
{
|
|
||||||
if ($gender === static::GENDER_MALE) {
|
|
||||||
return static::firstNameMale();
|
|
||||||
} elseif ($gender === static::GENDER_FEMALE) {
|
|
||||||
return static::firstNameFemale();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->generator->parse(static::randomElement(static::$firstNameFormat));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function firstNameMale()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$firstNameMale);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function firstNameFemale()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$firstNameFemale);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'Doe'
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function lastName()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$lastName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'Mrs.'
|
|
||||||
* @param string|null $gender 'male', 'female' or null for any
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function title($gender = null)
|
|
||||||
{
|
|
||||||
if ($gender === static::GENDER_MALE) {
|
|
||||||
return static::titleMale();
|
|
||||||
} elseif ($gender === static::GENDER_FEMALE) {
|
|
||||||
return static::titleFemale();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->generator->parse(static::randomElement(static::$titleFormat));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'Mr.'
|
|
||||||
*/
|
|
||||||
public static function titleMale()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$titleMale);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'Mrs.'
|
|
||||||
*/
|
|
||||||
public static function titleFemale()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$titleFemale);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
use Faker\Calculator\Luhn;
|
|
||||||
|
|
||||||
class PhoneNumber extends Base
|
|
||||||
{
|
|
||||||
protected static $formats = array('###-###-###');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example '555-123-546'
|
|
||||||
*/
|
|
||||||
public function phoneNumber()
|
|
||||||
{
|
|
||||||
return static::numerify($this->generator->parse(static::randomElement(static::$formats)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example +27113456789
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function e164PhoneNumber()
|
|
||||||
{
|
|
||||||
$formats = array('+%############');
|
|
||||||
return static::numerify($this->generator->parse(static::randomElement($formats)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* International Mobile Equipment Identity (IMEI)
|
|
||||||
*
|
|
||||||
* @link http://en.wikipedia.org/wiki/International_Mobile_Station_Equipment_Identity
|
|
||||||
* @link http://imei-number.com/imei-validation-check/
|
|
||||||
* @example '720084494799532'
|
|
||||||
* @return int $imei
|
|
||||||
*/
|
|
||||||
public function imei()
|
|
||||||
{
|
|
||||||
$imei = (string) static::numerify('##############');
|
|
||||||
$imei .= Luhn::computeCheckDigit($imei);
|
|
||||||
return $imei;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,141 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
abstract class Text extends Base
|
|
||||||
{
|
|
||||||
protected static $baseText = '';
|
|
||||||
protected static $separator = ' ';
|
|
||||||
protected static $separatorLen = 1;
|
|
||||||
protected $explodedText;
|
|
||||||
protected $consecutiveWords = array();
|
|
||||||
protected static $textStartsWithUppercase = true;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a text string by the Markov chain algorithm.
|
|
||||||
*
|
|
||||||
* Depending on the $maxNbChars, returns a random valid looking text. The algorithm
|
|
||||||
* generates a weighted table with the specified number of words as the index and the
|
|
||||||
* possible following words as the value.
|
|
||||||
*
|
|
||||||
* @example 'Alice, swallowing down her flamingo, and began by taking the little golden key'
|
|
||||||
* @param integer $maxNbChars Maximum number of characters the text should contain (minimum: 10)
|
|
||||||
* @param integer $indexSize Determines how many words are considered for the generation of the next word.
|
|
||||||
* The minimum is 1, and it produces a higher level of randomness, although the
|
|
||||||
* generated text usually doesn't make sense. Higher index sizes (up to 5)
|
|
||||||
* produce more correct text, at the price of less randomness.
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function realText($maxNbChars = 200, $indexSize = 2)
|
|
||||||
{
|
|
||||||
if ($maxNbChars < 10) {
|
|
||||||
throw new \InvalidArgumentException('maxNbChars must be at least 10');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($indexSize < 1) {
|
|
||||||
throw new \InvalidArgumentException('indexSize must be at least 1');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($indexSize > 5) {
|
|
||||||
throw new \InvalidArgumentException('indexSize must be at most 5');
|
|
||||||
}
|
|
||||||
|
|
||||||
$words = $this->getConsecutiveWords($indexSize);
|
|
||||||
$result = array();
|
|
||||||
$resultLength = 0;
|
|
||||||
// take a random starting point
|
|
||||||
$next = static::randomKey($words);
|
|
||||||
while ($resultLength < $maxNbChars && isset($words[$next])) {
|
|
||||||
// fetch a random word to append
|
|
||||||
$word = static::randomElement($words[$next]);
|
|
||||||
|
|
||||||
// calculate next index
|
|
||||||
$currentWords = static::explode($next);
|
|
||||||
$currentWords[] = $word;
|
|
||||||
array_shift($currentWords);
|
|
||||||
$next = static::implode($currentWords);
|
|
||||||
|
|
||||||
// ensure text starts with an uppercase letter
|
|
||||||
if ($resultLength == 0 && !static::validStart($word)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// append the element
|
|
||||||
$result[] = $word;
|
|
||||||
$resultLength += static::strlen($word) + static::$separatorLen;
|
|
||||||
}
|
|
||||||
|
|
||||||
// remove the element that caused the text to overflow
|
|
||||||
array_pop($result);
|
|
||||||
|
|
||||||
// build result
|
|
||||||
$result = static::implode($result);
|
|
||||||
|
|
||||||
return static::appendEnd($result);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getConsecutiveWords($indexSize)
|
|
||||||
{
|
|
||||||
if (!isset($this->consecutiveWords[$indexSize])) {
|
|
||||||
$parts = $this->getExplodedText();
|
|
||||||
$words = array();
|
|
||||||
$index = array();
|
|
||||||
for ($i = 0; $i < $indexSize; $i++) {
|
|
||||||
$index[] = array_shift($parts);
|
|
||||||
}
|
|
||||||
|
|
||||||
for ($i = 0, $count = count($parts); $i < $count; $i++) {
|
|
||||||
$stringIndex = static::implode($index);
|
|
||||||
if (!isset($words[$stringIndex])) {
|
|
||||||
$words[$stringIndex] = array();
|
|
||||||
}
|
|
||||||
$word = $parts[$i];
|
|
||||||
$words[$stringIndex][] = $word;
|
|
||||||
array_shift($index);
|
|
||||||
$index[] = $word;
|
|
||||||
}
|
|
||||||
// cache look up words for performance
|
|
||||||
$this->consecutiveWords[$indexSize] = $words;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->consecutiveWords[$indexSize];
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getExplodedText()
|
|
||||||
{
|
|
||||||
if ($this->explodedText === null) {
|
|
||||||
$this->explodedText = static::explode(preg_replace('/\s+/u', ' ', static::$baseText));
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->explodedText;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static function explode($text)
|
|
||||||
{
|
|
||||||
return explode(static::$separator, $text);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static function implode($words)
|
|
||||||
{
|
|
||||||
return implode(static::$separator, $words);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static function strlen($text)
|
|
||||||
{
|
|
||||||
return function_exists('mb_strlen') ? mb_strlen($text, 'UTF-8') : strlen($text);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static function validStart($word)
|
|
||||||
{
|
|
||||||
$isValid = true;
|
|
||||||
if (static::$textStartsWithUppercase) {
|
|
||||||
$isValid = preg_match('/^\p{Lu}/u', $word);
|
|
||||||
}
|
|
||||||
return $isValid;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static function appendEnd($text)
|
|
||||||
{
|
|
||||||
return preg_replace("/([ ,-:;\x{2013}\x{2014}]+$)/us", '', $text).'.';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,165 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
class UserAgent extends Base
|
|
||||||
{
|
|
||||||
protected static $userAgents = array('firefox', 'chrome', 'internetExplorer', 'opera', 'safari');
|
|
||||||
|
|
||||||
protected static $windowsPlatformTokens = array(
|
|
||||||
'Windows NT 6.2', 'Windows NT 6.1', 'Windows NT 6.0', 'Windows NT 5.2', 'Windows NT 5.1',
|
|
||||||
'Windows NT 5.01', 'Windows NT 5.0', 'Windows NT 4.0', 'Windows 98; Win 9x 4.90', 'Windows 98',
|
|
||||||
'Windows 95', 'Windows CE'
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Possible processors on Linux
|
|
||||||
*/
|
|
||||||
protected static $linuxProcessor = array('i686', 'x86_64');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Mac processors (it also added U;)
|
|
||||||
*/
|
|
||||||
protected static $macProcessor = array('Intel', 'PPC', 'U; Intel', 'U; PPC');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add as many languages as you like.
|
|
||||||
*/
|
|
||||||
protected static $lang = array('en-US', 'sl-SI');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate mac processor
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function macProcessor()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$macProcessor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate linux processor
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function linuxProcessor()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$linuxProcessor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a random user agent
|
|
||||||
*
|
|
||||||
* @example 'Mozilla/5.0 (Windows CE) AppleWebKit/5350 (KHTML, like Gecko) Chrome/13.0.888.0 Safari/5350'
|
|
||||||
*/
|
|
||||||
public static function userAgent()
|
|
||||||
{
|
|
||||||
$userAgentName = static::randomElement(static::$userAgents);
|
|
||||||
|
|
||||||
return static::$userAgentName();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate Chrome user agent
|
|
||||||
*
|
|
||||||
* @example 'Mozilla/5.0 (Macintosh; PPC Mac OS X 10_6_5) AppleWebKit/5312 (KHTML, like Gecko) Chrome/14.0.894.0 Safari/5312'
|
|
||||||
*/
|
|
||||||
public static function chrome()
|
|
||||||
{
|
|
||||||
$saf = mt_rand(531, 536) . mt_rand(0, 2);
|
|
||||||
|
|
||||||
$platforms = array(
|
|
||||||
'(' . static::linuxPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Chrome/" . mt_rand(36, 40) . '.0.' . mt_rand(800, 899) . ".0 Mobile Safari/$saf",
|
|
||||||
'(' . static::windowsPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Chrome/" . mt_rand(36, 40) . '.0.' . mt_rand(800, 899) . ".0 Mobile Safari/$saf",
|
|
||||||
'(' . static::macPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Chrome/" . mt_rand(36, 40) . '.0.' . mt_rand(800, 899) . ".0 Mobile Safari/$saf"
|
|
||||||
);
|
|
||||||
|
|
||||||
return 'Mozilla/5.0 ' . static::randomElement($platforms);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate Firefox user agent
|
|
||||||
*
|
|
||||||
* @example 'Mozilla/5.0 (X11; Linuxi686; rv:7.0) Gecko/20101231 Firefox/3.6'
|
|
||||||
*/
|
|
||||||
public static function firefox()
|
|
||||||
{
|
|
||||||
$ver = 'Gecko/' . date('Ymd', mt_rand(strtotime('2010-1-1'), time())) . ' Firefox/' . mt_rand(35, 37) . '.0';
|
|
||||||
|
|
||||||
$platforms = array(
|
|
||||||
'(' . static::windowsPlatformToken() . '; ' . static::randomElement(static::$lang) . '; rv:1.9.' . mt_rand(0, 2) . '.20) ' . $ver,
|
|
||||||
'(' . static::linuxPlatformToken() . '; rv:' . mt_rand(5, 7) . '.0) ' . $ver,
|
|
||||||
'(' . static::macPlatformToken() . ' rv:' . mt_rand(2, 6) . '.0) ' . $ver
|
|
||||||
);
|
|
||||||
|
|
||||||
return "Mozilla/5.0 " . static::randomElement($platforms);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate Safari user agent
|
|
||||||
*
|
|
||||||
* @example 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_7_1 rv:3.0; en-US) AppleWebKit/534.11.3 (KHTML, like Gecko) Version/4.0 Safari/534.11.3'
|
|
||||||
*/
|
|
||||||
public static function safari()
|
|
||||||
{
|
|
||||||
$saf = mt_rand(531, 535) . '.' . mt_rand(1, 50) . '.' . mt_rand(1, 7);
|
|
||||||
if (mt_rand(0, 1) == 0) {
|
|
||||||
$ver = mt_rand(4, 5) . '.' . mt_rand(0, 1);
|
|
||||||
} else {
|
|
||||||
$ver = mt_rand(4, 5) . '.0.' . mt_rand(1, 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
$mobileDevices = array(
|
|
||||||
'iPhone; CPU iPhone OS',
|
|
||||||
'iPad; CPU OS'
|
|
||||||
);
|
|
||||||
|
|
||||||
$platforms = array(
|
|
||||||
'(Windows; U; ' . static::windowsPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Version/$ver Safari/$saf",
|
|
||||||
'(' . static::macPlatformToken() . ' rv:' . mt_rand(2, 6) . '.0; ' . static::randomElement(static::$lang) . ") AppleWebKit/$saf (KHTML, like Gecko) Version/$ver Safari/$saf",
|
|
||||||
'(' . static::randomElement($mobileDevices) . ' ' . mt_rand(7, 8) . '_' . mt_rand(0, 2) . '_' . mt_rand(1, 2) . ' like Mac OS X; ' . static::randomElement(static::$lang) . ") AppleWebKit/$saf (KHTML, like Gecko) Version/" . mt_rand(3, 4) . ".0.5 Mobile/8B" . mt_rand(111, 119) . " Safari/6$saf",
|
|
||||||
);
|
|
||||||
|
|
||||||
return "Mozilla/5.0 " . static::randomElement($platforms);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate Opera user agent
|
|
||||||
*
|
|
||||||
* @example 'Opera/8.25 (Windows NT 5.1; en-US) Presto/2.9.188 Version/10.00'
|
|
||||||
*/
|
|
||||||
public static function opera()
|
|
||||||
{
|
|
||||||
$platforms = array(
|
|
||||||
'(' . static::linuxPlatformToken() . '; ' . static::randomElement(static::$lang) . ') Presto/2.' . mt_rand(8, 12) . '.' . mt_rand(160, 355) . ' Version/' . mt_rand(10, 12) . '.00',
|
|
||||||
'(' . static::windowsPlatformToken() . '; ' . static::randomElement(static::$lang) . ') Presto/2.' . mt_rand(8, 12) . '.' . mt_rand(160, 355) . ' Version/' . mt_rand(10, 12) . '.00'
|
|
||||||
);
|
|
||||||
|
|
||||||
return "Opera/" . mt_rand(8, 9) . '.' . mt_rand(10, 99) . ' ' . static::randomElement($platforms);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate Internet Explorer user agent
|
|
||||||
*
|
|
||||||
* @example 'Mozilla/5.0 (compatible; MSIE 7.0; Windows 98; Win 9x 4.90; Trident/3.0)'
|
|
||||||
*/
|
|
||||||
public static function internetExplorer()
|
|
||||||
{
|
|
||||||
return 'Mozilla/5.0 (compatible; MSIE ' . mt_rand(5, 11) . '.0; ' . static::windowsPlatformToken() . '; Trident/' . mt_rand(3, 5) . '.' . mt_rand(0, 1) . ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function windowsPlatformToken()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$windowsPlatformTokens);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function macPlatformToken()
|
|
||||||
{
|
|
||||||
return 'Macintosh; ' . static::randomElement(static::$macProcessor) . ' Mac OS X 10_' . mt_rand(5, 8) . '_' . mt_rand(0, 9);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function linuxPlatformToken()
|
|
||||||
{
|
|
||||||
return 'X11; Linux ' . static::randomElement(static::$linuxProcessor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider;
|
|
||||||
|
|
||||||
class Uuid extends Base
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Generate name based md5 UUID (version 3).
|
|
||||||
* @example '7e57d004-2b97-0e7a-b45f-5387367791cd'
|
|
||||||
*/
|
|
||||||
public static function uuid()
|
|
||||||
{
|
|
||||||
// fix for compatibility with 32bit architecture; each mt_rand call is restricted to 32bit
|
|
||||||
// two such calls will cause 64bits of randomness regardless of architecture
|
|
||||||
$seed = mt_rand(0, 2147483647) . '#' . mt_rand(0, 2147483647);
|
|
||||||
|
|
||||||
// Hash the seed and convert to a byte array
|
|
||||||
$val = md5($seed, true);
|
|
||||||
$byte = array_values(unpack('C16', $val));
|
|
||||||
|
|
||||||
// extract fields from byte array
|
|
||||||
$tLo = ($byte[0] << 24) | ($byte[1] << 16) | ($byte[2] << 8) | $byte[3];
|
|
||||||
$tMi = ($byte[4] << 8) | $byte[5];
|
|
||||||
$tHi = ($byte[6] << 8) | $byte[7];
|
|
||||||
$csLo = $byte[9];
|
|
||||||
$csHi = $byte[8] & 0x3f | (1 << 7);
|
|
||||||
|
|
||||||
// correct byte order for big edian architecture
|
|
||||||
if (pack('L', 0x6162797A) == pack('N', 0x6162797A)) {
|
|
||||||
$tLo = (($tLo & 0x000000ff) << 24) | (($tLo & 0x0000ff00) << 8)
|
|
||||||
| (($tLo & 0x00ff0000) >> 8) | (($tLo & 0xff000000) >> 24);
|
|
||||||
$tMi = (($tMi & 0x00ff) << 8) | (($tMi & 0xff00) >> 8);
|
|
||||||
$tHi = (($tHi & 0x00ff) << 8) | (($tHi & 0xff00) >> 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
// apply version number
|
|
||||||
$tHi &= 0x0fff;
|
|
||||||
$tHi |= (3 << 12);
|
|
||||||
|
|
||||||
// cast to string
|
|
||||||
$uuid = sprintf(
|
|
||||||
'%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x',
|
|
||||||
$tLo,
|
|
||||||
$tMi,
|
|
||||||
$tHi,
|
|
||||||
$csHi,
|
|
||||||
$csLo,
|
|
||||||
$byte[10],
|
|
||||||
$byte[11],
|
|
||||||
$byte[12],
|
|
||||||
$byte[13],
|
|
||||||
$byte[14],
|
|
||||||
$byte[15]
|
|
||||||
);
|
|
||||||
|
|
||||||
return $uuid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,152 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider\ar_JO;
|
|
||||||
|
|
||||||
class Address extends \Faker\Provider\Address
|
|
||||||
{
|
|
||||||
protected static $streetPrefix = array('شارع');
|
|
||||||
|
|
||||||
protected static $cityPrefix = array('شمال', 'شرق', 'غرب', 'جنوب', 'وسط', );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link http://ar.wikipedia.org/wiki/%D9%85%D9%84%D8%AD%D9%82:%D9%82%D8%A7%D8%A6%D9%85%D8%A9_%D9%85%D8%AF%D9%86_%D8%A7%D9%84%D8%A3%D8%B1%D8%AF%D9%86
|
|
||||||
*/
|
|
||||||
protected static $cityName = array(
|
|
||||||
'اربد', 'أبو نصير', 'الجبيهه', 'الحصن', 'الرصيفة', 'الرمثا', 'الزرقاء', 'السلط', 'الشهيد عزمي', 'الصريح', 'الضليل', 'الطفيلة', 'العقبة', 'القويسمة', 'الكرك', 'المشارع', 'المفرق', 'الهاشمية', 'ام قصير', 'ايدون',
|
|
||||||
'بيت راس',
|
|
||||||
'تلاع العلي',
|
|
||||||
'جرش',
|
|
||||||
'ساكب', 'سحاب',
|
|
||||||
'شفا بدران',
|
|
||||||
'صويلح',
|
|
||||||
'عمان', 'عنجره', 'عين الباشا',
|
|
||||||
'غور الصافي',
|
|
||||||
'كريمه', 'كفرنجه',
|
|
||||||
'مادبا', 'مخيم البقعه', 'مخيم حطين', 'مرج الحمام', 'معان',
|
|
||||||
'ناعور',
|
|
||||||
'وادي السير',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $buildingNumber = array('#####', '####', '##');
|
|
||||||
|
|
||||||
protected static $postcode = array('#####', '#####-####');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link http://ar.wikipedia.org/wiki/%D9%85%D9%84%D8%AD%D9%82:%D9%82%D8%A7%D8%A6%D9%85%D8%A9_%D8%A7%D9%84%D9%88%D9%84%D8%A7%D9%8A%D8%A7%D8%AA_%D8%A7%D9%84%D8%A3%D9%85%D8%B1%D9%8A%D9%83%D9%8A%D8%A9_%D8%AD%D8%B3%D8%A8_%D8%A7%D9%84%D9%85%D8%B3%D8%A7%D8%AD%D8%A9
|
|
||||||
*/
|
|
||||||
protected static $state = array(
|
|
||||||
'آيوا', 'أركنساس', 'أريزونا', 'ألاباما', 'ألاسكا', 'أوريغون', 'أوكلاهوما', 'أوهايو', 'أيداهو', 'إلينوي', 'إنديانا', 'الاباما', 'الجزر العذراء الأمريكية',
|
|
||||||
'بنس يلفانيا', 'بورتو ريكو',
|
|
||||||
'تكساس', 'تينيسي',
|
|
||||||
'جزر ماريانا الشمالية', 'جورجيا',
|
|
||||||
'داكوتا الجنوبية', 'داكوتا الشمالية', 'ديلاوير', 'رود آيلاند',
|
|
||||||
'ساموا الأمريكية',
|
|
||||||
'غوام',
|
|
||||||
'فرجينيا الغربية', 'فلوريدا', 'فيرجينيا', 'فيرجينيا الغربية', 'فيرمونت',
|
|
||||||
'كارولاينا الجنوبية', 'كارولاينا الشمالية','كارولينا الشمالية', 'كاليفورنيا', 'كانساس', 'كنتاكي', 'كولورادو', 'كونيتيكت',
|
|
||||||
'لويزيانا',
|
|
||||||
'ماريلاند', 'ماساتشوستس', 'ماين', 'مسيسيبي', 'مونتانا', 'ميريلاند', 'ميزوري', 'ميشيغان', 'مين', 'مينيسوتا',
|
|
||||||
'نبراسكا', 'نيفادا', 'نيو جيرسي', 'نيو ميكسيكو', 'نيوهامشير', 'نيويورك',
|
|
||||||
'هاواي',
|
|
||||||
'واشنطن', 'وايومنغ', 'ويسكنسن', 'يوتا',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $stateAbbr = array(
|
|
||||||
'AK', 'AL', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DC', 'DE', 'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA', 'MD', 'ME', 'MI', 'MN', 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ', 'NM', 'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VA', 'VT', 'WA', 'WI', 'WV', 'WY'
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link http://www.nationsonline.org/oneworld/countrynames_arabic.htm
|
|
||||||
*/
|
|
||||||
protected static $country = array(
|
|
||||||
'الكاريبي', 'أمريكا الوسطى', 'أنتيجوا وبربودا', 'أنجولا', 'أنجويلا', 'أندورا', 'اندونيسيا', 'أورجواي', 'أوروبا', 'أوزبكستان', 'أوغندا', 'أوقيانوسيا', 'أوقيانوسيا النائية', 'أوكرانيا', 'ايران', 'أيرلندا', 'أيسلندا', 'ايطاليا',
|
|
||||||
'بابوا غينيا الجديدة', 'باراجواي', 'باكستان', 'بالاو', 'بتسوانا', 'بتكايرن', 'بربادوس', 'برمودا', 'بروناي', 'بلجيكا', 'بلغاريا', 'بليز', 'بنجلاديش', 'بنما', 'بنين', 'بوتان', 'بورتوريكو', 'بوركينا فاسو', 'بوروندي', 'بولندا', 'بوليفيا', 'بولينيزيا', 'بولينيزيا الفرنسية', 'بيرو',
|
|
||||||
'تانزانيا', 'تايلند', 'تايوان', 'تركمانستان', 'تركيا', 'ترينيداد وتوباغو', 'تشاد', 'توجو', 'توفالو', 'توكيلو', 'تونجا', 'تونس', 'تيمور الشرقية',
|
|
||||||
'جامايكا', 'جبل طارق', 'جرينادا', 'جرينلاند', 'جزر الأنتيل الهولندية', 'جزر الترك وجايكوس', 'جزر القمر', 'جزر الكايمن', 'جزر المارشال', 'جزر الملديف', 'جزر الولايات المتحدة البعيدة الصغيرة', 'جزر أولان', 'جزر سليمان', 'جزر فارو', 'جزر فرجين الأمريكية', 'جزر فرجين البريطانية', 'جزر فوكلاند', 'جزر كوك', 'جزر كوكوس', 'جزر ماريانا الشمالية', 'جزر والس وفوتونا', 'جزيرة الكريسماس', 'جزيرة بوفيه', 'جزيرة مان', 'جزيرة نورفوك', 'جزيرة هيرد وماكدونالد', 'جمهورية افريقيا الوسطى', 'جمهورية التشيك', 'جمهورية الدومينيك', 'جمهورية الكونغو الديمقراطية', 'جمهورية جنوب افريقيا', 'جنوب آسيا', 'جنوب أوروبا', 'جنوب شرق آسيا', 'جنوب وسط آسيا', 'جواتيمالا', 'جوادلوب', 'جوام', 'جورجيا', 'جورجيا الجنوبية وجزر ساندويتش الجنوبية', 'جيبوتي', 'جيرسي',
|
|
||||||
'دومينيكا',
|
|
||||||
'رواندا', 'روسيا', 'روسيا البيضاء', 'رومانيا', 'روينيون',
|
|
||||||
'زامبيا', 'زيمبابوي',
|
|
||||||
'ساحل العاج', 'ساموا', 'ساموا الأمريكية', 'سانت بيير وميكولون', 'سانت فنسنت وغرنادين', 'سانت كيتس ونيفيس', 'سانت لوسيا', 'سانت مارتين', 'سانت هيلنا', 'سان مارينو', 'ساو تومي وبرينسيبي', 'سريلانكا', 'سفالبارد وجان مايان', 'سلوفاكيا', 'سلوفينيا', 'سنغافورة', 'سوازيلاند', 'سوريا', 'سورينام', 'سويسرا', 'سيراليون', 'سيشل',
|
|
||||||
'شرق آسيا', 'شرق افريقيا', 'شرق أوروبا', 'شمال افريقيا', 'شمال أمريكا', 'شمال أوروبا', 'شيلي',
|
|
||||||
'صربيا', 'صربيا والجبل الأسود',
|
|
||||||
'طاجكستان',
|
|
||||||
'عمان',
|
|
||||||
'غامبيا', 'غانا', 'غرب آسيا', 'غرب افريقيا', 'غرب أوروبا', 'غويانا', 'غيانا', 'غينيا', 'غينيا الاستوائية', 'غينيا بيساو',
|
|
||||||
'فانواتو', 'فرنسا', 'فلسطين', 'فنزويلا', 'فنلندا', 'فيتنام', 'فيجي',
|
|
||||||
'قبرص', 'قرغيزستان', 'قطر',
|
|
||||||
'كازاخستان', 'كاليدونيا الجديدة', 'كرواتيا', 'كمبوديا', 'كندا', 'كوبا', 'كوريا الجنوبية', 'كوريا الشمالية', 'كوستاريكا', 'كولومبيا', 'كومنولث الدول المستقلة', 'كيريباتي', 'كينيا',
|
|
||||||
'لاتفيا', 'لاوس', 'لبنان', 'لوكسمبورج', 'ليبيا', 'ليبيريا', 'ليتوانيا', 'ليختنشتاين', 'ليسوتو',
|
|
||||||
'مارتينيك', 'ماكاو الصينية', 'مالطا', 'مالي', 'ماليزيا', 'مايوت', 'مدغشقر', 'مصر', 'مقدونيا', 'ملاوي', 'منغوليا', 'موريتانيا', 'موريشيوس', 'موزمبيق', 'مولدافيا', 'موناكو', 'مونتسرات', 'ميانمار', 'ميكرونيزيا', 'ميلانيزيا',
|
|
||||||
'ناميبيا', 'نورو', 'نيبال', 'نيجيريا', 'نيكاراجوا', 'نيوزيلاندا', 'نيوي',
|
|
||||||
'هايتي', 'هندوراس', 'هولندا', 'هونج كونج الصينية',
|
|
||||||
'وسط آسيا', 'وسط افريقيا',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $cityFormats = array(
|
|
||||||
'{{cityPrefix}} {{cityName}}',
|
|
||||||
'{{cityName}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $streetNameFormats = array(
|
|
||||||
'{{streetPrefix}} {{firstName}} {{lastName}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $streetAddressFormats = array(
|
|
||||||
'{{buildingNumber}} {{streetName}}',
|
|
||||||
'{{buildingNumber}} {{streetName}} {{secondaryAddress}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $addressFormats = array(
|
|
||||||
"{{streetAddress}}\n{{city}}",
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $secondaryAddressFormats = array('شقة رقم. ##', 'بناية رقم ##');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'شرق'
|
|
||||||
*/
|
|
||||||
public static function cityPrefix()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$cityPrefix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'عمان'
|
|
||||||
*/
|
|
||||||
public static function cityName()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$cityName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'شارع'
|
|
||||||
*/
|
|
||||||
public static function streetPrefix()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$streetPrefix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'شقة رقم. 350'
|
|
||||||
*/
|
|
||||||
public static function secondaryAddress()
|
|
||||||
{
|
|
||||||
return static::numerify(static::randomElement(static::$secondaryAddressFormats));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'كاليفورنيا'
|
|
||||||
*/
|
|
||||||
public static function state()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$state);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'CA'
|
|
||||||
*/
|
|
||||||
public static function stateAbbr()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$stateAbbr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider\ar_JO;
|
|
||||||
|
|
||||||
class Company extends \Faker\Provider\Company
|
|
||||||
{
|
|
||||||
protected static $formats = array(
|
|
||||||
'{{lastName}} {{companySuffix}}',
|
|
||||||
'{{companyPrefix}} {{lastName}} {{companySuffix}}',
|
|
||||||
'{{companyPrefix}} {{lastName}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $bsWords = array(
|
|
||||||
array()
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $catchPhraseWords = array(
|
|
||||||
array('الخدمات','الحلول','الانظمة'),
|
|
||||||
array(
|
|
||||||
'الذهبية','الذكية','المتطورة','المتقدمة', 'الدولية', 'المتخصصه', 'السريعة',
|
|
||||||
'المثلى', 'الابداعية', 'المتكاملة', 'المتغيرة', 'المثالية'
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $companyPrefix = array('شركة','مؤسسة','مجموعة','مكتب','أكاديمية','معرض');
|
|
||||||
|
|
||||||
protected static $companySuffix = array('وأولاده', 'للمساهمة المحدودة', ' ذ.م.م', 'مساهمة عامة', 'وشركائه');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'مؤسسة'
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function companyPrefix()
|
|
||||||
{
|
|
||||||
return static::randomElement(self::$companyPrefix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'Robust full-range hub'
|
|
||||||
*/
|
|
||||||
public function catchPhrase()
|
|
||||||
{
|
|
||||||
$result = array();
|
|
||||||
foreach (static::$catchPhraseWords as &$word) {
|
|
||||||
$result[] = static::randomElement($word);
|
|
||||||
}
|
|
||||||
|
|
||||||
return join(' ', $result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'integrate extensible convergence'
|
|
||||||
*/
|
|
||||||
public function bs()
|
|
||||||
{
|
|
||||||
$result = array();
|
|
||||||
foreach (static::$bsWords as &$word) {
|
|
||||||
$result[] = static::randomElement($word);
|
|
||||||
}
|
|
||||||
|
|
||||||
return join(' ', $result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider\ar_JO;
|
|
||||||
|
|
||||||
class Internet extends \Faker\Provider\Internet
|
|
||||||
{
|
|
||||||
protected static $userNameFormats = array(
|
|
||||||
'{{lastNameAscii}}.{{firstNameAscii}}',
|
|
||||||
'{{firstNameAscii}}.{{lastNameAscii}}',
|
|
||||||
'{{firstNameAscii}}##',
|
|
||||||
'?{{lastNameAscii}}',
|
|
||||||
);
|
|
||||||
protected static $safeEmailTld = array(
|
|
||||||
'com', 'jo', 'me', 'net', 'org',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $tld = array(
|
|
||||||
'biz', 'com', 'info', 'jo', 'net', 'org',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $lastNameAscii = array(
|
|
||||||
'abbad', 'abbadi', 'abbas', 'abulebbeh', 'flefel', 'hadi', 'hamad', 'hasan', 'jabri', 'kanaan', 'karam', 'maanee', 'melhem', 'nimry', 'obaisi', 'qasem', 'qawasmee', 'rabee', 'rashwani', 'shami', 'zaloum',
|
|
||||||
);
|
|
||||||
protected static $firstNameAscii = array(
|
|
||||||
'abd', 'abdullah', 'ahmad', 'akram', 'amr', 'bashar', 'bilal', 'fadi', 'ibrahim', 'khaled', 'layth', 'mohammad', 'mutaz', 'omar', 'osama', 'rami', 'saleem', 'samer', 'sami', 'yazan',
|
|
||||||
);
|
|
||||||
|
|
||||||
public static function lastNameAscii()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$lastNameAscii);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function firstNameAscii()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$firstNameAscii);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'ahmad.abbadi'
|
|
||||||
*/
|
|
||||||
public function userName()
|
|
||||||
{
|
|
||||||
$format = static::randomElement(static::$userNameFormats);
|
|
||||||
|
|
||||||
return static::bothify($this->generator->parse($format));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'wewebit.jo'
|
|
||||||
*/
|
|
||||||
public function domainName()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$lastNameAscii) . '.' . $this->tld();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,108 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider\ar_JO;
|
|
||||||
|
|
||||||
class Person extends \Faker\Provider\Person
|
|
||||||
{
|
|
||||||
protected static $maleNameFormats = array(
|
|
||||||
'{{firstNameMale}} {{lastName}}',
|
|
||||||
'{{firstNameMale}} {{lastName}}',
|
|
||||||
'{{firstNameMale}} {{lastName}}',
|
|
||||||
'{{firstNameMale}} {{lastName}}',
|
|
||||||
'{{titleMale}} {{firstNameMale}} {{lastName}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $femaleNameFormats = array(
|
|
||||||
'{{firstNameFemale}} {{lastName}}',
|
|
||||||
'{{firstNameFemale}} {{lastName}}',
|
|
||||||
'{{firstNameFemale}} {{lastName}}',
|
|
||||||
'{{firstNameFemale}} {{lastName}}',
|
|
||||||
'{{titleFemale}} {{firstNameFemale}} {{lastName}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link http://muslim-names.us/
|
|
||||||
*/
|
|
||||||
protected static $firstNameMale = array(
|
|
||||||
'آدم', 'أبراهيم', 'أبو بكر', 'أحمد', 'أدهم', 'أسامة', 'أسعد', 'أسيد', 'أشرف', 'أكثم', 'أكرم', 'أمجد', 'أمين', 'أنتوني', 'أنزور', 'أنس', 'أنمار', 'أنور', 'أواس', 'أوس', 'أيمن', 'أيهم', 'أيوب', 'إبراهيم', 'إسلام', 'إسماعيل', 'إلياس', 'إياد', 'إيهاب', 'ابان', 'ابراهام', 'ابراهيم', 'ابراهيم محمد', 'اثير', 'احسان', 'احمد', 'ادريس', 'ادم', 'ادهم', 'اديب', 'ارام', 'ازاد', 'ازد', 'اسامة', 'اسحاق', 'اسحق', 'اسعد', 'اسلام', 'اسماعيل', 'اسيد', 'اشراف', 'اشرف', 'اصلان', 'اكثم', 'اكرم', 'البراء', 'البشر', 'البطوش', 'الحارث', 'الحسين', 'الحمزه', 'الطفيل', 'العزم', 'الليث', 'المؤمن بالله', 'المثنى', 'المستبد', 'المعتز', 'المعتز بالله', 'المعتصم بالله', 'المنتصر بالله', 'المنصور', 'الياس', 'اليمان', 'امجد', 'امل', 'امير', 'امين', 'اندرو', 'انس', 'انور', 'انيس', 'اوس', 'اوسم', 'اوهان', 'اويس', 'اياد', 'اياد الدين', 'اياس', 'ايسر', 'ايليا', 'ايمن', 'ايهاب', 'ايهم', 'ايوب',
|
|
||||||
'باجس', 'باسل', 'باسم', 'باندي', 'باهر', 'بدر', 'بدوان', 'براء', 'برنابا', 'برهان', 'بسام', 'بشار', 'بشارة', 'بشر', 'بشير', 'بطرس', 'بكر', 'بلال', 'بليغ', 'بندر', 'بهاء', 'بهاء الدين', 'بيتر',
|
|
||||||
'تامر', 'تحسين', 'تركي', 'تشارلي', 'تقي الدين', 'توفيق', 'تيسير', 'تيمور',
|
|
||||||
'ثائر', 'ثامر',
|
|
||||||
'جابر', 'جاد', 'جاسر', 'جاسم', 'جاك', 'جباغ', 'جبر', 'جبرائي', 'جبير', 'جراح', 'جريس', 'جعفر', 'جلال', 'جلال الدين', 'جمال', 'جمزه', 'جميل', 'جهاد', 'جواد', 'جودت', 'جورج', 'جوزيف',
|
|
||||||
'حابس', 'حاتم', 'حارث', 'حارثه', 'حازم', 'حازم محمد', 'حافظ', 'حاكم', 'حالد', 'حامد', 'حبيب', 'حذيفة', 'حذيفه', 'حسام', 'حسام الدين', 'حسان', 'حسن', 'حسني', 'حسين', 'حكم', 'حكمت', 'حلمي', 'حماده', 'حمد', 'حمدالله', 'حمدان', 'حمدي', 'حمزة', 'حمزه', 'حمود', 'حمودة', 'حموده', 'حميد', 'حنا', 'خالد',
|
|
||||||
'خضر', 'خلدون', 'خلف', 'خليفة', 'خليفه', 'خليل', 'خميس', 'خير الدين', 'خيرالله', 'خيري',
|
|
||||||
'دانتي', 'داني', 'دانيال', 'داود', 'داوود',
|
|
||||||
'ذياب', 'ذيب',
|
|
||||||
'رأفت', 'رؤوف', 'رئاد', 'رائد', 'رائف', 'راجح', 'راجي', 'راشد', 'راضي', 'راغب', 'رافت', 'رافع', 'رافي', 'راكان', 'رامان', 'رامز', 'رامي', 'رامين', 'ربيع', 'رجا', 'رجائي', 'رجب', 'رداد', 'رزق', 'رسلان', 'رسلان الدين', 'رشاد', 'رشبد', 'رشيد', 'رضا', 'رضوان', 'رعد', 'رغد', 'رغيد', 'ركان', 'رماح', 'رمزي', 'رمضان', 'رهاب', 'رواد', 'روحي', 'روزا', 'روني', 'رياض', 'ريان', 'ريتشارد', 'ريمون',
|
|
||||||
'زاهر', 'زاهي', 'زايد', 'زبد', 'زخريا', 'زكريا', 'زكي', 'زمام', 'زهدي', 'زهير', 'زياد', 'زيد', 'زيدان', 'زيدون', 'زين', 'زين العابدين', 'سائد', 'سابا', 'ساري', 'سالم', 'سامح', 'سامر', 'سامي', 'ساهر', 'سدير', 'سركيس', 'سرمد', 'سري', 'سعد', 'سعدي', 'سعود', 'سعيد', 'سفيان', 'سكوت', 'سلام', 'سلطان', 'سلمان', 'سليم', 'سليمان', 'سمؤل', 'سمعان', 'سميح', 'سمير', 'سنان', 'سند', 'سهام الدين', 'سهل', 'سهم', 'سيف', 'سيف الاسلام', 'سيف الدين', 'سيمون',
|
|
||||||
'شادي', 'شارلي', 'شافع', 'شاكر', 'شامان', 'شامل', 'شاهر', 'شحادة', 'شحاده', 'شربف', 'شرحبيل', 'شريف', 'شكري', 'شهاب', 'شهم', 'شوان', 'شوقي', 'شوكت',
|
|
||||||
'صادق', 'صافي', 'صالح', 'صبحي', 'صبره', 'صبري', 'صخر', 'صدام', 'صدقي', 'صفاء', 'صفوان', 'صقر', 'صلاح', 'صلاح الدين', 'صليبا', 'صهيب',
|
|
||||||
'ضرار', 'ضرغام', 'ضياء', 'ضياء الدين',
|
|
||||||
'طارق', 'طالب', 'طاهر', 'طلال', 'طه',
|
|
||||||
'عادل', 'عاصم', 'عاطف', 'عامر', 'عايد', 'عبادة', 'عباده', 'عباس', 'عبد', 'عبد الباري', 'عبد الحافظ', 'عبد الحكيم', 'عبد الحليم', 'عبد الحميد', 'عبد الحي', 'عبد الرحمان', 'عبد الرحمن', 'عبد الرحيم', 'عبد الرزاق', 'عبد السلام', 'عبد السميع', 'عبد العزيز', 'عبد العفو', 'عبد الغني', 'عبد الفتاح', 'عبد القادر', 'عبد الكريم', 'عبد اللطيف', 'عبد الله', 'عبد المجيد', 'عبد المولى', 'عبد الناصر', 'عبد الهادي', 'عبد ربه', 'عبداالله', 'عبدالاله', 'عبدالباسط', 'عبدالجليل', 'عبدالجواد', 'عبدالحليم', 'عبدالحميد', 'عبدالرؤوف', 'عبدالرحمن', 'عبدالرحيم', 'عبدالرزاق', 'عبدالسلام', 'عبدالعزيز', 'عبدالفتاح', 'عبدالقادر', 'عبدالكريم', 'عبداللطيف', 'عبدالله', 'عبدالمجيد', 'عبدالمطلب', 'عبدالمعطي', 'عبدالمهيمن', 'عبدالناصر', 'عبدالهادي', 'عبدالوهاب', 'عبدربه', 'عبده', 'عبود', 'عبيدالله', 'عبيدة', 'عتيبه', 'عثمان', 'عدب', 'عدلي', 'عدنان', 'عدوان', 'عدى', 'عدي', 'عرار', 'عربي', 'عرفات', 'عرفة', 'عرمان', 'عروة', 'عريق', 'عرين', 'عز الدين', 'عزالدين', 'عزام', 'عزت', 'عزمي', 'عزيز', 'عصام', 'عصمت', 'عطا', 'عطاالله', 'عطيه', 'عقل', 'علاء', 'علاء الدين', 'علي', 'عليان', 'عماد', 'عماد الدين', 'عمادالدين', 'عمار', 'عمر', 'عمراسامة', 'عمران', 'عمرو', 'عملا', 'عميد', 'عناد', 'عنان', 'عواد', 'عودة', 'عوده', 'عوض', 'عوف', 'عون', 'عوني', 'عيد', 'عيدالله', 'عيسى',
|
|
||||||
'غازي', 'غالب', 'غانم', 'غدير', 'غسان', 'غيث',
|
|
||||||
'فؤاد', 'فؤاس', 'فائق', 'فاخر', 'فادي', 'فارس', 'فاروق', 'فاضل', 'فايز', 'فتحي', 'فجر', 'فخرى', 'فخري', 'فرأس', 'فراس', 'فرح', 'فريد', 'فكتور', 'فلاح', 'فندي', 'فهد', 'فهمي', 'فواز', 'فوزي', 'فيصل', 'فيليب',
|
|
||||||
'قارس', 'قاسم', 'قبلان', 'قتاده', 'قتيبة', 'قتيبه', 'قصي', 'قيس',
|
|
||||||
'كاسترو', 'كاظم', 'كامل', 'كايد', 'كرم', 'كريم', 'كفاح', 'كمال', 'كنان',
|
|
||||||
'لؤي', 'لؤي الدين', 'لبيب', 'لطف', 'لطفي', 'لورنس', 'لويس', 'ليث', 'ليث الدين', 'ليليان',
|
|
||||||
'مأمون', 'مؤتمن', 'مؤثر', 'مؤمن', 'مؤنس', 'مؤيد', 'ماجد', 'مارتن', 'مارسيل', 'مازن', 'مالك', 'مامون', 'ماهر', 'مبارك', 'مثنى', 'مجاهد', 'مجد', 'مجدي', 'مجمد', 'محسن', 'محمد ', 'محمود', 'محي', 'محي الدين', 'مختار', 'مخلص', 'مدحت', 'مدين', 'مراد', 'مرشد', 'مرهف', 'مروان', 'مسعد', 'مسعود', 'مسلم', 'مشاري', 'مشعل', 'مشهور', 'مشيل', 'مصباح', 'مصطغى', 'مصطفى', 'مصطفي', 'مصطلفى', 'مصعب', 'مضر', 'مطيع', 'مظفر', 'مظهر', 'معاد', 'معاذ', 'معاوية', 'معاويه', 'معتز', 'معتصم', 'معمر', 'معن', 'معنصم', 'معويه', 'معين', 'مفدي', 'مفلح', 'مقداد', 'مكين', 'ملهم', 'ممدوح', 'مناف', 'منتصر', 'منح', 'منذر', 'منصف', 'منصور', 'منقذ', 'منير', 'مهاب', 'مهدي', 'مهران', 'مهند', 'موسى', 'موفق', 'مياس', 'ميسم', 'ميشيل', 'ميلاد', 'مينا',
|
|
||||||
'نائل', 'ناجي', 'نادر', 'نارت', 'ناصر', 'ناهض', 'نايف', 'نبراس', 'نبيل', 'نتانت', 'نجاتي', 'نجيب', 'نديم', 'نزار', 'نزال', 'نزيه', 'نسيم', 'نشات', 'نصار', 'نصر', 'نصري', 'نصوح', 'نضال', 'نظام', 'نعمان', 'نعمة', 'نعيم', 'نقولا', 'نمر', 'نهاد', 'نهار', 'نواف', 'نور', 'نور الدين', 'نورالدين', 'نورس', 'نوفان',
|
|
||||||
'هادي', 'هارون', 'هاشم', 'هاكان', 'هانى', 'هاني', 'هذال', 'هشام', 'هلال', 'همام', 'هملر', 'هناء', 'هيثم',
|
|
||||||
'وائل', 'واثق', 'واصف', 'وجدي', 'وجيه', 'وحيد', 'وديع', 'ورد', 'وسام', 'وسام الدين', 'وسن', 'وسيم', 'وصفي', 'وضاح', 'وعد', 'وفاء', 'وليد', 'وهيب',
|
|
||||||
'ياسر', 'ياسين', 'يامن', 'يحيى', 'يزن', 'يزيد', 'يسار', 'يشار', 'يعرب', 'يعقوب', 'يمان', 'ينال', 'يوسف', 'يونس',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link http://muslim-names.us/
|
|
||||||
*/
|
|
||||||
protected static $firstNameFemale = array(
|
|
||||||
'آثار', 'آلاء', 'آناء', 'آية', 'أبرار', 'أحلام', 'أروى', 'أريج', 'أسماء', 'أسيل', 'أصاله', 'أفنان', 'ألاء', 'أماني', 'أمل', 'أميرة', 'أنسام', 'أنطوانيت', 'أنوار', 'أيات', 'أية', 'أيناس', 'أيه', 'ؤقهسفغ', 'إباء', 'إخلاص', 'إسراء', 'إسلام', 'إكرام', 'إنعام', 'إيمان', 'إيناس', 'ابتهاج', 'ابتهال', 'ابرار', 'ابراهيم', 'اتيان', 'احسان', 'احلام', 'احمد', 'اخلاص', 'ارجوان', 'اروى', 'اريج', 'ازهار', 'اسامة', 'اسحار', 'اسرا', 'اسراء', 'اسرار', 'اسلام', 'اسما', 'اسماء', 'اسمهان', 'اسمى', 'اسيل', 'اشراق', 'اصالة', 'اعتدال', 'افراح', 'افنان', 'افيا', 'اكرام', 'الاء', 'العنود', 'الهام', 'اليان', 'اليزابيث', 'امال', 'اماندا', 'اماني', 'امل', 'امنه', 'اميرة', 'اميليا', 'امينة', 'اناهيد', 'انتظار', 'انجليكا', 'انعام', 'انوار', 'اويس', 'ايات', 'ايام', 'اية', 'ايفا', 'ايفان', 'ايفون', 'ايمان', 'ايناس', 'ايه',
|
|
||||||
'باسمة', 'باميلا', 'بان', 'بانا', 'بتول', 'بثينه', 'بدور', 'براء', 'براءة', 'برديس', 'بروين', 'بسمة', 'بشائر', 'بشرى', 'بلسم', 'بلقيس', 'بنان', 'بهجه', 'بيا', 'بيان', 'بيداء', 'بيسان',
|
|
||||||
'تالا', 'تالة', 'تالين', 'تامر', 'تانيا ماريا', 'تحرير', 'تسنيم', 'تغريد', 'تقوى', 'تقى', 'تمارا', 'تماضر', 'تمام', 'تهاني', 'تولين',
|
|
||||||
'ثريا',
|
|
||||||
'جاسمن', 'جالا', 'جلنار', 'جمانا', 'جمانة', 'جميلة', 'جنى', 'جهاد', 'جوانا', 'جود', 'جورجيت', 'جوسيت', 'جولييت', 'جيانا', 'جيسيكا',
|
|
||||||
'حبيبة', 'حسناء', 'حصه', 'حلا', 'حليمة', 'حنان', 'حنين', 'حياة',
|
|
||||||
'ختام', 'خديجه', 'خلود', 'خولة',
|
|
||||||
'دارين', 'داليا', 'دالية', 'دانا', 'دانا كريستيل جميلة', 'دانة', 'دانية', 'دانييل', 'دبنا', 'دعاء', 'دعد', 'دلال', 'دنى', 'دنيا', 'دولا', 'ديالا', 'ديان', 'ديانا', 'ديما', 'دينا',
|
|
||||||
'رؤى', 'رؤيه', 'رابعة', 'راغدة', 'راما', 'رانا', 'راندي', 'رانيا', 'راوية', 'راية', 'ربا', 'رباب', 'ربى', 'رجاء', 'رحمة', 'رحمه', 'ردينة', 'رزان', 'رشا', 'رغد', 'رغدة', 'رفاعية', 'رفاه', 'رقية', 'رقيه', 'رلى', 'رمال', 'رنا', 'رناد', 'رند', 'رنده', 'رنيم', 'رنين', 'رهام', 'رهف', 'رواء', 'روان', 'روبينا', 'روتانا', 'روحية', 'رودا', 'روزان', 'روزانا', 'روزين', 'رولى', 'روند', 'رويدة', 'ريان', 'ريتا', 'ريم', 'ريما', 'ريمان', 'ريناتا', 'ريناد', 'ريهام',
|
|
||||||
'زكية', 'زمان', 'زها', 'زهرة', 'زين', 'زينا', 'زينات', 'زينب', 'زينة', 'ساجدة', 'ساجده', 'سارة', 'سارين', 'سالي', 'ساندرا', 'ساندي', 'سباتا', 'سجى', 'سحر', 'سدين', 'سرى', 'سرين', 'سعاد', 'سكينة', 'سلام', 'سلسبيل', 'سلمى', 'سلوى', 'سما', 'سماح', 'سماره', 'سمر', 'سمية', 'سميره', 'سميه', 'سناء', 'سنابل', 'سندس', 'سنريت', 'سنن', 'سها', 'سهاد', 'سهام', 'سهر', 'سهى', 'سهير', 'سهيله', 'سوار', 'سوزان', 'سوزانا', 'سوسن', 'سيرين', 'سيرينا', 'سيلفا', 'سيلين', 'سيما',
|
|
||||||
'شدى', 'شذا', 'شذى', 'شروق', 'شريفة', 'شرين', 'شريهان', 'شفاء', 'شهد', 'شهناز', 'شيرين', 'شيماء',
|
|
||||||
'صابرين', 'صالح', 'صبا', 'صباح', 'صباحت', 'صبرين', 'صحر', 'صفا', 'صفاء', 'صفية', 'صمود',
|
|
||||||
'ضحى', 'ضياء',
|
|
||||||
'عائشة', 'عاليا', 'عالية', 'عايشة', 'عبلة', 'عبير', 'عدله', 'عرين', 'عزة', 'عزيزة', 'عفاف', 'علا', 'علياء', 'عنود', 'عهد',
|
|
||||||
'غادة', 'غدير', 'غرام', 'غزل', 'غصون', 'غفران', 'غنى', 'غيد', 'غيداء', 'غيده', 'غيفار',
|
|
||||||
'فاتن', 'فادية', 'فاديه', 'فاطمة', 'فايزة', 'فتحية', 'فتحيه', 'فتنه', 'فداء', 'فدوى', 'فدى', 'فرح', 'فريال', 'فريدة', 'فوزية', 'فيروز', 'فيفيان',
|
|
||||||
'قمر',
|
|
||||||
'كاترين', 'كاتيا', 'كارلا', 'كرستينا', 'كريستين', 'كريستينا', 'كلوديت', 'كلودين', 'كوثر', 'كيان',
|
|
||||||
'لارا', 'لاري', 'لانا', 'لبنا', 'لجين', 'لطيفة', 'لمى', 'لميس', 'لنا', 'لورا', 'لورينا', 'لوسانا', 'لوسينا', 'لونا', 'ليان', 'ليدا', 'ليلى', 'ليليان', 'لين', 'لينا', 'لينة', 'ليندا', 'لينه',
|
|
||||||
'مادلين', 'ماري', 'ماريا', 'ماريان', 'مارينا', 'مايا', 'مجد', 'مجدولين', 'محبوبة', 'مديحة', 'مرام', 'مرح', 'مروة', 'مريام', 'مريانا', 'مريم', 'مسعدة', 'مشيرة', 'معالي', 'ملاك', 'ملك', 'منار', 'منال', 'منى', 'مها', 'مهتاب', 'مي', 'ميادة', 'مياده', 'ميار', 'ميان', 'ميرا', 'ميرال', 'ميران', 'ميرفت', 'ميرنا', 'ميريت', 'ميس', 'ميسا', 'ميساء', 'ميسر', 'ميسره', 'ميسم', 'ميسون', 'ميلاء', 'ميناس',
|
|
||||||
'نائله', 'ناتاشا', 'ناتالي', 'ناديا', 'نادية', 'نادين', 'ناديه', 'ناردين', 'ناريمان', 'نانسي', 'نبال', 'نبراس', 'نبيله', 'نجاة', 'نجاح', 'نجلاء', 'نجوان', 'نجود', 'نجوى', 'نداء', 'ندى', 'ندين', 'نرمين', 'نزميه', 'نسرين', 'نسيمة', 'نعمت', 'نعمه', 'نهاد', 'نهى', 'نهيدة', 'نوال', 'نور', 'نور الهدى', 'نورا', 'نوران', 'نيروز', 'نيفين',
|
|
||||||
'هادلين', 'هازار', 'هالة', 'هانيا', 'هايدي', 'هبة', 'هدايه', 'هدى', 'هديل', 'هزار', 'هلا', 'هلين', 'هنا', 'هناء', 'هنادا', 'هنادي', 'هند', 'هيا', 'هيفا', 'هيفاء', 'هيلين',
|
|
||||||
'وئام', 'وجدان', 'وداد', 'ورود', 'وسام', 'وسن', 'وسيم', 'وعد', 'وفاء', 'ولاء',
|
|
||||||
'ىمنة', 'يارا', 'ياسمين', 'يافا', 'يسرى', 'ينان', 'ﻟﻮﺗﺸﻴﺎ',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $lastName = array(
|
|
||||||
'آلهامي', 'أبو الرب', 'ابو رحمة', 'ابو سعده', 'ابو يوسف', 'ابوالحاج', 'الامام', 'البتراء', 'البلبيسي', 'الترابين', 'التلهوني', 'الجبارات', 'الجرَّاح', 'الجوابره', 'الجوالدة', 'الحجايا', 'الحوراني', 'الدعجة', 'الردايدة', 'الرشدان', 'الرفاعي', 'الروابدة', 'الروسان', 'الريماوي', 'الزعبية', 'الزوربا', 'السحاقات', 'السحيمات', 'السراج', 'السعد', 'السلطية', 'السيوف', 'الشامي', 'الشريدة', 'الشريف', 'الشطناوي', 'الشمالي', 'الصرايرة', 'الصمادي', 'الصنات', 'الضمور', 'الطباع', 'الطراونة', 'الطويسات', 'الطويل', 'العدوان', 'العضيبات', 'العلامي', 'العمري', 'العمرية', 'العناسوة', 'العنانبه', 'الغريب', 'الفاخوري', 'الفاعوري', 'الفناطسة', 'القطيشات', 'الكردي', 'الكركي', 'المبيضين', 'المجالي', 'المحاميد', 'المساعيد', 'المشاهره', 'المصري', 'المعشر', 'المواجدة', 'المومنى', 'المومنية', 'النسور', 'النشاشيبي', 'النعيمات', 'الهلسة', 'الوشاح',
|
|
||||||
'بني حسن', 'بني صقر',
|
|
||||||
'سحاب',
|
|
||||||
'شمر',
|
|
||||||
'ضميدات',
|
|
||||||
'طلفاح',
|
|
||||||
'عابدين', 'عباد', 'عجلون', 'عقلة', 'عناسوة',
|
|
||||||
'مطير', 'معاني',
|
|
||||||
'وادي',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $titleMale = array('السيد', 'الأستاذ', 'الدكتور', 'المهندس');
|
|
||||||
protected static $titleFemale = array('السيدة', 'الآنسة', 'الدكتورة', 'المهندسة');
|
|
||||||
private static $prefix = array('أ.', 'د.', 'أ.د', 'م.');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'أ.'
|
|
||||||
*/
|
|
||||||
public static function prefix()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$prefix);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,146 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider\ar_SA;
|
|
||||||
|
|
||||||
class Address extends \Faker\Provider\Address
|
|
||||||
{
|
|
||||||
protected static $streetPrefix = array('شارع', 'طريق', 'ممر');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link https://ar.wikipedia.org/wiki/%D9%82%D8%A7%D8%A6%D9%85%D8%A9_%D9%85%D8%AF%D9%86_%D8%A7%D9%84%D8%B3%D8%B9%D9%88%D8%AF%D9%8A%D8%A9
|
|
||||||
*/
|
|
||||||
protected static $cityName = array(
|
|
||||||
'الرياض', 'جدة', 'مكة', 'المدينة المنورة', 'تبوك', 'الدمام', 'الأحساء', 'القطيف', 'خميس مشيط', 'المظيلف', 'الهفوف',
|
|
||||||
'المبرز', 'الطائف', 'نجران', 'حفر الباطن', 'الجبيل', 'ضباء', 'الخرج', 'الثقبة', 'ينبع البحر', 'الخبر', 'عرعر', 'الحوية',
|
|
||||||
'عنيزة', 'سكاكا', 'جيزان', 'القريات', 'الظهران', 'الزلفي', 'الباحة', 'الرس', 'وادي الدواسر', 'بيشة', 'سيهات', 'شرورة',
|
|
||||||
'الدوادمي', 'الأفلاج',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link https://ar.wikipedia.org/wiki/%D8%A7%D9%84%D8%AA%D9%82%D8%B3%D9%8A%D9%85_%D8%A7%D9%84%D8%A5%D8%AF%D8%A7%D8%B1%D9%8A_%D9%84%D9%84%D9%85%D9%85%D9%84%D9%83%D8%A9_%D8%A7%D9%84%D8%B9%D8%B1%D8%A8%D9%8A%D8%A9_%D8%A7%D9%84%D8%B3%D8%B9%D9%88%D8%AF%D9%8A%D8%A9
|
|
||||||
*/
|
|
||||||
protected static $subdivisions = array(
|
|
||||||
'منطقة الرياض', 'منطقة القصيم',
|
|
||||||
'منطقة مكة المكرمة', 'منطقة المدينة المنورة',
|
|
||||||
'منطقة حائل', 'منطقة الجوف', 'منطقة تبوك', 'منطقة الحدود الشمالية',
|
|
||||||
'منطقة عسير', 'منطقة جازان', 'منطقة نجران', 'منطقة الباحة',
|
|
||||||
'المنطقة الشرقية',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link https://ar.wikipedia.org/wiki/%D9%82%D8%A7%D8%A6%D9%85%D8%A9_%D9%85%D8%AD%D8%A7%D9%81%D8%B8%D8%A7%D8%AA_%D8%A7%D9%84%D8%B3%D8%B9%D9%88%D8%AF%D9%8A%D8%A9
|
|
||||||
*/
|
|
||||||
protected static $governorates = array(
|
|
||||||
'الرياض', 'الدرعية', 'الخرج', 'الدوادمي', 'المجمعة', 'القويعية', 'الأفلاج', 'وادي الدواسر', 'الزلفي', 'شقراء', 'حوطة بني تميم', 'عفيف', 'الغاط', 'السليل', 'ضرما', 'المزاحمية', 'رماح', 'ثادق', 'حريملاء', 'الحريق', 'مرات',
|
|
||||||
'مكة المكرمة', 'جدة', 'الطائف', 'القنفذة', 'الليث', 'رابغ', 'خليص', 'الخرمة', 'رنية', 'تربة', 'الجموم', 'الكامل', 'المويه', 'ميسان', 'أضم', 'العرضيات', 'بحرة',
|
|
||||||
'المدينة المنورة', 'ينبع', 'العلا', 'مهد الذهب', 'الحناكية', 'بدر', 'خيبر', 'العيص', 'وادي الفرع',
|
|
||||||
'بريدة', 'عنيزة', 'الرس', 'المذنب', 'البكيرية', 'البدائع', 'الأسياح', 'النبهانية', 'الشماسية', 'عيون الجواء', 'رياض الخبراء', 'عقلة الصقور', 'ضرية',
|
|
||||||
'الدمام', 'الأحساء', 'حفر الباطن', 'الجبيل', 'القطيف', 'الخبر', 'الخفجي', 'رأس تنورة', 'بقيق', 'النعيرية', 'قرية العليا', 'العديد',
|
|
||||||
'أبها', 'خميس مشيط', 'بيشة', 'النماص', 'محايل عسير', 'ظهران الجنوب', 'تثليث', 'سراة عبيدة', 'رجال ألمع', 'بلقرن', 'أحد رفيدة', 'المجاردة', 'البرك', 'بارق', 'تنومة', 'طريب',
|
|
||||||
'تبوك', 'الوجه', 'ضبا', 'تيماء', 'أملج', 'حقل', 'البدع',
|
|
||||||
'حائل', 'بقعاء', 'الغزالة', 'الشنان', 'الحائط', 'السليمي', 'الشملي', 'موقق', 'سميراء',
|
|
||||||
'عرعر', 'رفحاء', 'طريف', 'العويقيلة',
|
|
||||||
'جازان', 'صبيا', 'أبو عريش', 'صامطة', 'بيش', 'الدرب', 'الحرث', 'ضمد', 'الريث', 'جزر فرسان', 'الدائر', 'العارضة', 'أحد المسارحة', 'العيدابي', 'فيفاء', 'الطوال', 'هروب',
|
|
||||||
'نجران', 'شرورة', 'حبونا', 'بدر الجنوب', 'يدمه', 'ثار', 'خباش', 'الخرخير',
|
|
||||||
'الباحة', 'بلجرشي', 'المندق', 'المخواة', 'قلوة', 'العقيق', 'القرى', 'غامد الزناد', 'الحجرة', 'بني حسن',
|
|
||||||
'سكاكا', 'القريات', 'دومة الجندل', 'طبرجل'
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $buildingNumber = array('#####', '####', '##');
|
|
||||||
|
|
||||||
protected static $postcode = array('#####', '#####-####');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link http://www.nationsonline.org/oneworld/countrynames_arabic.htm
|
|
||||||
*/
|
|
||||||
protected static $country = array(
|
|
||||||
'الكاريبي', 'أمريكا الوسطى', 'أنتيجوا وبربودا', 'أنجولا', 'أنجويلا', 'أندورا', 'اندونيسيا', 'أورجواي', 'أوروبا', 'أوزبكستان', 'أوغندا', 'أوقيانوسيا', 'أوقيانوسيا النائية', 'أوكرانيا', 'ايران', 'أيرلندا', 'أيسلندا', 'ايطاليا',
|
|
||||||
'بابوا غينيا الجديدة', 'باراجواي', 'باكستان', 'بالاو', 'بتسوانا', 'بتكايرن', 'بربادوس', 'برمودا', 'بروناي', 'بلجيكا', 'بلغاريا', 'بليز', 'بنجلاديش', 'بنما', 'بنين', 'بوتان', 'بورتوريكو', 'بوركينا فاسو', 'بوروندي', 'بولندا', 'بوليفيا', 'بولينيزيا', 'بولينيزيا الفرنسية', 'بيرو',
|
|
||||||
'تانزانيا', 'تايلند', 'تايوان', 'تركمانستان', 'تركيا', 'ترينيداد وتوباغو', 'تشاد', 'توجو', 'توفالو', 'توكيلو', 'تونجا', 'تونس', 'تيمور الشرقية',
|
|
||||||
'جامايكا', 'جبل طارق', 'جرينادا', 'جرينلاند', 'جزر الأنتيل الهولندية', 'جزر الترك وجايكوس', 'جزر القمر', 'جزر الكايمن', 'جزر المارشال', 'جزر الملديف', 'جزر الولايات المتحدة البعيدة الصغيرة', 'جزر أولان', 'جزر سليمان', 'جزر فارو', 'جزر فرجين الأمريكية', 'جزر فرجين البريطانية', 'جزر فوكلاند', 'جزر كوك', 'جزر كوكوس', 'جزر ماريانا الشمالية', 'جزر والس وفوتونا', 'جزيرة الكريسماس', 'جزيرة بوفيه', 'جزيرة مان', 'جزيرة نورفوك', 'جزيرة هيرد وماكدونالد', 'جمهورية افريقيا الوسطى', 'جمهورية التشيك', 'جمهورية الدومينيك', 'جمهورية الكونغو الديمقراطية', 'جمهورية جنوب افريقيا', 'جنوب آسيا', 'جنوب أوروبا', 'جنوب شرق آسيا', 'جنوب وسط آسيا', 'جواتيمالا', 'جوادلوب', 'جوام', 'جورجيا', 'جورجيا الجنوبية وجزر ساندويتش الجنوبية', 'جيبوتي', 'جيرسي',
|
|
||||||
'دومينيكا',
|
|
||||||
'رواندا', 'روسيا', 'روسيا البيضاء', 'رومانيا', 'روينيون',
|
|
||||||
'زامبيا', 'زيمبابوي',
|
|
||||||
'ساحل العاج', 'ساموا', 'ساموا الأمريكية', 'سانت بيير وميكولون', 'سانت فنسنت وغرنادين', 'سانت كيتس ونيفيس', 'سانت لوسيا', 'سانت مارتين', 'سانت هيلنا', 'سان مارينو', 'ساو تومي وبرينسيبي', 'سريلانكا', 'سفالبارد وجان مايان', 'سلوفاكيا', 'سلوفينيا', 'سنغافورة', 'سوازيلاند', 'سوريا', 'سورينام', 'سويسرا', 'سيراليون', 'سيشل',
|
|
||||||
'شرق آسيا', 'شرق افريقيا', 'شرق أوروبا', 'شمال افريقيا', 'شمال أمريكا', 'شمال أوروبا', 'شيلي',
|
|
||||||
'صربيا', 'صربيا والجبل الأسود',
|
|
||||||
'طاجكستان',
|
|
||||||
'عمان',
|
|
||||||
'غامبيا', 'غانا', 'غرب آسيا', 'غرب افريقيا', 'غرب أوروبا', 'غويانا', 'غيانا', 'غينيا', 'غينيا الاستوائية', 'غينيا بيساو',
|
|
||||||
'فانواتو', 'فرنسا', 'فلسطين', 'فنزويلا', 'فنلندا', 'فيتنام', 'فيجي',
|
|
||||||
'قبرص', 'قرغيزستان', 'قطر',
|
|
||||||
'كازاخستان', 'كاليدونيا الجديدة', 'كرواتيا', 'كمبوديا', 'كندا', 'كوبا', 'كوريا الجنوبية', 'كوريا الشمالية', 'كوستاريكا', 'كولومبيا', 'كومنولث الدول المستقلة', 'كيريباتي', 'كينيا',
|
|
||||||
'لاتفيا', 'لاوس', 'لبنان', 'لوكسمبورج', 'ليبيا', 'ليبيريا', 'ليتوانيا', 'ليختنشتاين', 'ليسوتو',
|
|
||||||
'مارتينيك', 'ماكاو الصينية', 'مالطا', 'مالي', 'ماليزيا', 'مايوت', 'مدغشقر', 'مصر', 'مقدونيا', 'ملاوي', 'منغوليا', 'موريتانيا', 'موريشيوس', 'موزمبيق', 'مولدافيا', 'موناكو', 'مونتسرات', 'ميانمار', 'ميكرونيزيا', 'ميلانيزيا',
|
|
||||||
'ناميبيا', 'نورو', 'نيبال', 'نيجيريا', 'نيكاراجوا', 'نيوزيلاندا', 'نيوي',
|
|
||||||
'هايتي', 'هندوراس', 'هولندا', 'هونج كونج الصينية',
|
|
||||||
'وسط آسيا', 'وسط افريقيا',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $cityFormats = array(
|
|
||||||
'{{cityName}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $streetNameFormats = array(
|
|
||||||
'{{streetPrefix}} {{firstName}} {{lastName}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $streetAddressFormats = array(
|
|
||||||
'{{buildingNumber}} {{streetName}}',
|
|
||||||
'{{buildingNumber}} {{streetName}} {{secondaryAddress}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $addressFormats = array(
|
|
||||||
"{{streetAddress}}\n{{city}}",
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $secondaryAddressFormats = array('شقة رقم. ##', 'عمارة رقم ##');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'شرق'
|
|
||||||
*/
|
|
||||||
public static function cityPrefix()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$cityPrefix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'الرياض'
|
|
||||||
*/
|
|
||||||
public static function cityName()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$cityName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'شارع'
|
|
||||||
*/
|
|
||||||
public static function streetPrefix()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$streetPrefix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'شقة رقم. 350'
|
|
||||||
*/
|
|
||||||
public static function secondaryAddress()
|
|
||||||
{
|
|
||||||
return static::numerify(static::randomElement(static::$secondaryAddressFormats));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'منطقة الرياض'
|
|
||||||
*/
|
|
||||||
public static function subdivision()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$subdivisions);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'منطقة الرياض'
|
|
||||||
*/
|
|
||||||
public static function governorate()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$governorates);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider\ar_SA;
|
|
||||||
|
|
||||||
use Faker\Calculator\Luhn;
|
|
||||||
|
|
||||||
class Company extends \Faker\Provider\Company
|
|
||||||
{
|
|
||||||
protected static $formats = array(
|
|
||||||
'{{lastName}} {{companySuffix}}',
|
|
||||||
'{{companyPrefix}} {{lastName}} {{companySuffix}}',
|
|
||||||
'{{companyPrefix}} {{lastName}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $bsWords = array(
|
|
||||||
array()
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $catchPhraseWords = array(
|
|
||||||
array('الخدمات','الحلول','الانظمة'),
|
|
||||||
array(
|
|
||||||
'الذهبية','الذكية','المتطورة','المتقدمة', 'الدولية', 'المتخصصه', 'السريعة',
|
|
||||||
'المثلى', 'الابداعية', 'المتكاملة', 'المتغيرة', 'المثالية'
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $companyPrefix = array('شركة', 'مؤسسة', 'مجموعة', 'مكتب', 'أكاديمية', 'معرض');
|
|
||||||
|
|
||||||
protected static $companySuffix = array('وأولاده', 'للمساهمة المحدودة', ' ذ.م.م', 'مساهمة عامة', 'وشركائه');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'مؤسسة'
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function companyPrefix()
|
|
||||||
{
|
|
||||||
return static::randomElement(self::$companyPrefix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'الحلول المتقدمة'
|
|
||||||
*/
|
|
||||||
public function catchPhrase()
|
|
||||||
{
|
|
||||||
$result = array();
|
|
||||||
foreach (static::$catchPhraseWords as &$word) {
|
|
||||||
$result[] = static::randomElement($word);
|
|
||||||
}
|
|
||||||
|
|
||||||
return join(' ', $result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'integrate extensible convergence'
|
|
||||||
*/
|
|
||||||
public function bs()
|
|
||||||
{
|
|
||||||
$result = array();
|
|
||||||
foreach (static::$bsWords as &$word) {
|
|
||||||
$result[] = static::randomElement($word);
|
|
||||||
}
|
|
||||||
|
|
||||||
return join(' ', $result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* example 7001010101
|
|
||||||
**/
|
|
||||||
public static function companyIdNumber()
|
|
||||||
{
|
|
||||||
$partialValue = static::numerify(700 . str_repeat('#', 6));
|
|
||||||
return Luhn::generateLuhnNumber($partialValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider\ar_SA;
|
|
||||||
|
|
||||||
class Internet extends \Faker\Provider\Internet
|
|
||||||
{
|
|
||||||
protected static $userNameFormats = array(
|
|
||||||
'{{lastNameAscii}}.{{firstNameAscii}}',
|
|
||||||
'{{firstNameAscii}}.{{lastNameAscii}}',
|
|
||||||
'{{firstNameAscii}}##',
|
|
||||||
'?{{lastNameAscii}}',
|
|
||||||
);
|
|
||||||
protected static $safeEmailTld = array(
|
|
||||||
'com', 'jo', 'me', 'net', 'org',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $tld = array(
|
|
||||||
'biz', 'com', 'info', 'sa', 'net', 'org',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $lastNameAscii = array(
|
|
||||||
'abbad', 'abbadi', 'abbas', 'abulebbeh', 'flefel', 'hadi', 'hamad', 'hasan', 'jabri', 'kanaan', 'karam', 'maanee', 'melhem', 'nimry', 'obaisi', 'qasem', 'qawasmee', 'rabee', 'rashwani', 'shami', 'zaloum',
|
|
||||||
);
|
|
||||||
protected static $firstNameAscii = array(
|
|
||||||
'abd', 'abdullah', 'ahmad', 'akram', 'amr', 'bashar', 'bilal', 'fadi', 'ibrahim', 'khaled', 'layth', 'mohammad', 'mutaz', 'omar', 'osama', 'rami', 'saleem', 'samer', 'sami', 'yazan',
|
|
||||||
);
|
|
||||||
|
|
||||||
public static function lastNameAscii()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$lastNameAscii);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function firstNameAscii()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$firstNameAscii);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'ahmad.abbadi'
|
|
||||||
*/
|
|
||||||
public function userName()
|
|
||||||
{
|
|
||||||
$format = static::randomElement(static::$userNameFormats);
|
|
||||||
|
|
||||||
return static::bothify($this->generator->parse($format));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'wewebit.jo'
|
|
||||||
*/
|
|
||||||
public function domainName()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$lastNameAscii) . '.' . $this->tld();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,118 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider\ar_SA;
|
|
||||||
|
|
||||||
use Faker\Calculator\Luhn;
|
|
||||||
|
|
||||||
class Person extends \Faker\Provider\Person
|
|
||||||
{
|
|
||||||
protected static $maleNameFormats = array(
|
|
||||||
'{{firstNameMale}} {{lastName}}',
|
|
||||||
'{{firstNameMale}} {{lastName}}',
|
|
||||||
'{{firstNameMale}} {{lastName}}',
|
|
||||||
'{{firstNameMale}} {{firstNameMale}} {{lastName}}',
|
|
||||||
'{{firstNameMale}} {{firstNameMale}} {{firstNameMale}} {{lastName}}',
|
|
||||||
'{{titleFemale}} {{firstNameFemale}} {{lastName}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $femaleNameFormats = array(
|
|
||||||
'{{firstNameFemale}} {{lastName}}',
|
|
||||||
'{{firstNameFemale}} {{lastName}}',
|
|
||||||
'{{firstNameFemale}} {{lastName}}',
|
|
||||||
'{{firstNameFemale}} {{lastName}}',
|
|
||||||
'{{firstNameFemale}} {{firstNameMale}} {{lastName}}',
|
|
||||||
'{{firstNameFemale}} {{firstNameMale}} {{firstNameMale}} {{lastName}}',
|
|
||||||
'{{titleFemale}} {{firstNameFemale}} {{lastName}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link http://muslim-names.us/
|
|
||||||
*/
|
|
||||||
protected static $firstNameMale = array(
|
|
||||||
|
|
||||||
'آدم', 'أبراهيم', 'أحمد', 'أدهم', 'أسامة', 'أسعد', 'أشرف', 'أكثم', 'أكرم', 'أمجد', 'أمين', 'أنس', 'أنور', 'أواس', 'أوس', 'أيمن', 'أيهم', 'أيوب', 'إبراهيم', 'إسلام', 'إسماعيل', 'إلياس', 'إياد', 'إيهاب', 'ابان', 'ابراهيم', 'اثير', 'احسان', 'احمد', 'ادريس', 'ادم', 'ادهم', 'اديب', 'اسامة',
|
|
||||||
'اسحاق', 'اسحق', 'اسعد', 'اسلام', 'اسماعيل', 'اسيد', 'اشراف', 'اشرف', 'اصلان', 'اكثم', 'اكرم', 'البراء', 'البشر', 'الحارث', 'الحسين', 'الطفيل', 'العزم', 'الليث', 'المثنى', 'المنصور', 'الياس', 'اليمان', 'امجد', 'امير', 'امين', 'أنس', 'انور', 'انيس', 'اوس', 'اوسم', 'اويس', 'اياد', 'اياس',
|
|
||||||
'ايسر', 'ايمن', 'ايهم', 'ايوب', 'باسل', 'باسم', 'باهر', 'بدر', 'بدوان', 'براء', 'برهان', 'بسام', 'بشار', 'بشر', 'بشير', 'بكر', 'بلال', 'بليغ', 'بندر', 'بهاء', 'تركي', 'توفيق', 'ثامر', 'جابر', 'جاسر', 'جاسم', 'جبر', 'جبير', 'جراح', 'جريس', 'جعفر', 'جلال', 'جمال', 'جمزه', 'جميل', 'جهاد',
|
|
||||||
'جواد', 'حابس', 'حاتم', 'حارث', 'حازم', 'حافظ', 'حاكم', 'حامد', 'حبيب', 'حذيفة', 'حسام', 'حسان', 'حسن', 'حسني', 'حسين', 'حكم', 'حمد', 'حمدالله', 'حمدان', 'حمدي', 'حمزة', 'حمود', 'حميد', 'خالد', 'خضر', 'خلدون', 'خلف', 'خليفة', 'خليل', 'خميس', 'داوود', 'ذياب', 'ذيب', 'رأفت', 'رؤوف', 'رئاد',
|
|
||||||
'رائد', 'رائف', 'راجح', 'راجي', 'راشد', 'راضي', 'راغب', 'رافت', 'رافع', 'رافي', 'راكان', 'رامان', 'رامز', 'رامي', 'رامين', 'ربيع', 'رجا', 'رجائي', 'رجب', 'رداد', 'رزق', 'رسلان', 'رشاد', 'رشيد', 'رضا', 'رضوان', 'رعد', 'رغد', 'رغيد', 'ركان', 'رماح', 'رياض', 'ريان', 'زاهر', 'زاهي', 'زايد',
|
|
||||||
'زكريا', 'زمام', 'زهير', 'زياد', 'زيد', 'زيدان', 'زيدون', 'زين', 'زين العابدين', 'سائد', 'ساري', 'سالم', 'سامح', 'سامر', 'سامي', 'ساهر', 'سدير', 'سرمد', 'سري', 'سعد', 'سعود', 'سعيد', 'سفيان', 'سكوت', 'سلام', 'سلطان', 'سلمان', 'سليم', 'سليمان', 'سمعان', 'سميح', 'سنان', 'سند', 'سهل', 'سهم',
|
|
||||||
'سيف', 'شادي', 'شافع', 'شاكر', 'شامل', 'شاهر', 'شرحبيل', 'شريف', 'شهاب', 'شهم', 'شوان', 'صادق', 'صافي', 'صالح', 'صخر', 'صدام', 'صفاء', 'صفوان', 'صقر', 'صلاح', 'صلاح الدين', 'صهيب', 'ضرار', 'ضرغام', 'ضياء', 'ضياء الدين’, ', 'طارق', 'طالب', 'طاهر', 'طلال', 'طه', 'عادل', 'عاصم', 'عاطف',
|
|
||||||
'عامر', 'عايد', 'عبادة', 'عباس', 'عبد الباري', 'عبد الحافظ', 'عبد الحكيم', 'عبد الحليم', 'عبد الحميد', 'عبد الحي', 'عبد الرحمان', 'عبد الرحمن', 'عبد الرحيم', 'عبد الرزاق', 'عبد السلام', 'عبد السميع', 'عبد العزيز', 'عبد العفو', 'عبد الغني', 'عبد الفتاح', 'عبد القادر', 'عبد الكريم',
|
|
||||||
'عبد اللطيف', 'عبد الله', 'عبد المجيد', 'عبد المولى', 'عبد الناصر', 'عبد الهادي', 'عبد ربه', 'عبداالله', 'عبدالاله', 'عبدالباسط', 'عبدالجليل', 'عبدالجواد', 'عبدالحليم', 'عبدالحميد', 'عبدالرؤوف', 'عبدالرحمن', 'عبدالرحيم', 'عبدالرزاق', 'عبدالسلام', 'عبدالعزيز', 'عبدالفتاح', 'عبدالقادر',
|
|
||||||
'عبدالكريم', 'عبداللطيف', 'عبدالله', 'عبدالمجيد', 'عبدالمطلب', 'عبدالمعطي', 'عبدالمهيمن', 'عبدالناصر', 'عبدالهادي', 'عبدالوهاب', 'عبيدالله', 'عبيدة', 'عتيبه', 'عثمان', 'عدب', 'عدلي', 'عدنان', 'عدوان', 'عدي', 'عرار', 'عرمان', 'عروة', 'عريق', 'عرين', 'عز الدين', 'عزالدين', 'عزام', 'عزت',
|
|
||||||
'عزمي', 'عزيز', 'عصام', 'عقل', 'علاء', 'علي', 'عليان', 'عماد', 'عمار', 'عمر', 'عمران', 'عمرو', 'عملا', 'عميد', 'عناد', 'عنان', 'عواد', 'عودة', 'عوده', 'عوض', 'عوف', 'عون', 'عوني', 'عيد', 'عيدالله', 'عيسى', 'غازي', 'غالب', 'غانم', 'غدير', 'غسان', 'غيث', 'فؤاد', 'فائق', 'فاخر', 'فادي',
|
|
||||||
'فارس', 'فاروق', 'فاضل', 'فايز', 'فتحي', 'فجر', 'فراس', 'فرح', 'فريد', 'فلاح', 'فهد', 'فهمي', 'فواز', 'فوزي', 'فيصل', 'قارس', 'قاسم', 'قبلان', 'قتاده', 'قتيبة', 'قصي', 'قيس', 'كاظم', 'كامل', 'كايد', 'كرم', 'كريم', 'كفاح', 'كمال', 'كنان', 'لؤي', 'لبيب', 'لطف', 'لطفي', 'ليث', 'مأمون', 'مؤثر',
|
|
||||||
'مؤمن', 'مؤنس', 'مؤيد', 'ماجد', 'مازن', 'مالك', 'مامون', 'ماهر', 'مبارك', 'مثنى', 'مجاهد', 'مجد', 'مجدي', 'محسن', 'محمد ', 'محمود', 'محي', 'مختار', 'مخلص', 'مدحت', 'مدين', 'مراد', 'مرشد', 'مرهف', 'مروان', 'مسعد', 'مسعود', 'مسلم', 'مشاري', 'مشعل', 'مشهور', 'مصباح', 'مصطفى', 'مصطفي', 'مصعب',
|
|
||||||
'مضر', 'مطيع', 'مظفر', 'مظهر', 'معاذ', 'معاوية', 'معتز', 'معتصم', 'معمر', 'معن', 'معين', 'مفدي', 'مفلح', 'مقداد', 'ملهم', 'ممدوح', 'مناف', 'منتصر', 'منح', 'منذر', 'منصف', 'منصور', 'منير', 'مهاب', 'مهدي', 'مهران', 'مهند', 'موسى', 'موفق', 'نائل', 'ناجي', 'نادر', 'ناصر', 'ناهض', 'نايف',
|
|
||||||
'نبراس', 'نبيل', 'نجيب', 'نديم', 'نزار', 'نزال', 'نزيه', 'نسيم', 'نشات', 'نصار', 'نصر', 'نصري', 'نصوح', 'نضال', 'نظام', 'نعمان', 'نعمة', 'نعيم', 'نقولا', 'نمر', 'نهاد', 'نهار', 'نواف', 'نورس', 'نوفان', 'هادي', 'هارون', 'هاشم', 'هانى', 'هاني', 'هذال', 'هشام', 'هلال', 'همام', 'هيثم', 'وائل',
|
|
||||||
'واثق', 'واصف', 'وجدي', 'وجيه', 'وحيد', 'وديع', 'ورد', 'وسام', 'وسن', 'وسيم', 'وصفي', 'وضاح', 'وعد', 'وفاء', 'وليد', 'وهيب', 'ياسر', 'ياسين', 'يامن', 'يحيى', 'يزن', 'يزيد', 'يسار', 'يشار', 'يعرب', 'يعقوب', 'يمان', 'ينال', 'يوسف', 'يونس',
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @link http://muslim-names.us/
|
|
||||||
*/
|
|
||||||
protected static $firstNameFemale = array(
|
|
||||||
'آثار', 'آلاء', 'آناء', 'آية', 'أبرار', 'أحلام', 'أروى', 'أريج', 'أسماء', 'أسيل', 'أصاله', 'أفنان', 'ألاء', 'أماني', 'أمل', 'أميرة', 'أنسام', 'أنوار', 'إباء', 'إخلاص', 'إسراء', 'إسلام', 'إكرام', 'إنعام', 'إيمان', 'إيناس', 'ابتهاج', 'ابتهال', 'أبرار', 'إخلاص', 'ارجوان', 'أروى', 'أريج',
|
|
||||||
'أزهار', 'أسحار', 'اسراء', 'اسرار', 'اسيل', 'اشراق', 'أصالة', 'اعتدال', 'أفراح', 'أفنان', 'إكرام', 'آلاء', 'العنود', 'إلهام', 'آمال', 'أمنة', 'أميرة', 'أمينة', 'أناهيد', 'انتظار', 'أنعام', 'أنوار', 'آيات', 'إيمان', 'إيناس', 'آية', 'باسمة', 'بتول', 'بثينة', 'بدور', 'براء', 'براءة', 'بسمة',
|
|
||||||
'بشائر', 'بشرى', 'بلسم', 'بنان', 'بهجة', 'بيان', 'بيداء', 'بيسان', 'تالا', 'تالة', 'تالين', 'تحرير', 'تسنيم', 'تغريد', 'تقوى', 'تقى', 'تمارا', 'تماضر', 'تمام', 'تهاني', 'تولين', 'ثريا', 'جمانة', 'جميلة', 'جنى', 'جهاد', 'جود', 'حبيبة', 'حسناء', 'حصة', 'حلا', 'حليمة', 'حنان', 'حنين', 'حياة',
|
|
||||||
'ختام', 'خديجة', 'خلود', 'خولة', 'دارين', 'داليا', 'دالية', 'دانا', 'دانة', 'دانية', 'دعاء', 'دلال', 'دنى', 'دنيا', 'ديانا', 'ديما', 'دينا', 'رؤى', 'رؤيه', 'رابعة', 'راغدة', 'راما', 'رانا', 'رانيا', 'راوية', 'راية', 'ربا', 'رباب', 'ربى', 'رجاء', 'رحمة', 'رحمه', 'ردينة', 'رزان',
|
|
||||||
'رشا', 'رغد', 'رغدة', 'رفاه', 'رقية', 'رمال', 'رنا', 'رناد', 'رند', 'رنده', 'رنيم', 'رنين', 'رهام', 'رهف', 'رواء', 'روان', 'روزان', 'روزانا', 'روزين', 'رولى', 'روند', 'رويدة', 'ريان', 'ريتا', 'ريم', 'ريما', 'ريمان', 'ريناتا', 'ريناد', 'ريهام', 'زكية', 'زمان', 'زها', 'زهرة', 'زين', 'زينا',
|
|
||||||
'زينات', 'زينب', 'زينة', 'ساجدة', 'سارة', 'سجى', 'سحر', 'سدين', 'سرى', 'سرين', 'سعاد', 'سكينة', 'سلام', 'سلسبيل', 'سلمى', 'سلوى', 'سما', 'سماح', 'سماره', 'سمر', 'سمية', 'سميرة', 'سناء', 'سنابل', 'سندس', 'سنريت', 'سنن', 'سهاد', 'سهام', 'سهر', 'سهى', 'سهير', 'سهيله', 'سوار', 'سوزان', 'سوسن',
|
|
||||||
'سيرين', 'سيرينا', 'سيلفا', 'سيلين', 'سيما', 'شذى', 'شروق', 'شريفة', 'شرين', 'شريهان', 'شفاء', 'شهد', 'شيرين', 'شيماء', 'صابرين', 'صبا', 'صباح', 'صبرين', 'صفا', 'صفاء', 'صفية', 'صمود', 'ضحى', 'ضياء', 'عائشة', 'عاليا', 'عالية', 'عبلة', 'عبير', 'عزة', 'عزيزة', 'عفاف', 'علا', 'علياء',
|
|
||||||
'عنود', 'عهد', 'غادة', 'غدير', 'غرام', 'غزل', 'غصون', 'غفران', 'غنى', 'غيد', 'غيداء', 'غيده', 'فاتن', 'فادية', 'فاديه', 'فاطمة', 'فايزة', 'فتحية', 'فداء', 'فدوى', 'فدى', 'فرح', 'فريال', 'فريدة', 'فوزية', 'فيروز', 'فيفيان', 'قمر', 'كيان', 'لارا', 'لانا', 'لبنا', 'لجين', 'لطيفة', 'لمى',
|
|
||||||
'لميس', 'لنا', 'لورا', 'لورينا', 'لونا', 'ليان', 'ليدا', 'ليلى', 'ليليان', 'لين', 'لينا', 'لينة', 'ليندا', 'لينه', 'مايا', 'مجد', 'مجدولين', 'محبوبة', 'مديحة', 'مرام', 'مرح', 'مروة', 'مريام', 'مريم', 'مسعدة', 'مشيرة', 'معالي', 'ملاك', 'ملك', 'منار', 'منال', 'منى', 'مها', 'مي',
|
|
||||||
'ميادة', 'مياده', 'ميار', 'ميان', 'ميرا', 'ميرال', 'ميران', 'ميرفت', 'ميس', 'ميسا', 'ميساء', 'ميسر', 'ميسره', 'ميسم', 'ميسون', 'ميلاء', 'ميناس', 'نائله', 'ناديا', 'نادية', 'نادين', 'ناديه', 'نانسي', 'نبال', 'نبراس', 'نبيله', 'نجاة', 'نجاح', 'نجلاء', 'نجود', 'نجوى', 'نداء', 'ندى',
|
|
||||||
'ندين', 'نرمين', 'نسرين', 'نسيمة', 'نعمت', 'نعمه', 'نهاد', 'نهى', 'نهيدة', 'نوال', 'نور', 'نور الهدى', 'نورا', 'نوران', 'نيروز', 'نيفين', 'هادلين', 'هازار', 'هالة', 'هانيا', 'هايدي', 'هبة', 'هدايه', 'هدى', 'هديل', 'هزار', 'هلا', 'هنا', 'هناء', 'هنادي', 'هند', 'هيا', 'هيفا',
|
|
||||||
'هيفاء', 'هيلين', 'وئام', 'وجدان', 'وداد', 'ورود', 'وسام', 'وسن', 'وسيم', 'وعد', 'وفاء', 'ولاء', 'ىمنة', 'يارا', 'ياسمين', 'يسرى',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $lastName = array(
|
|
||||||
'العتيبي', 'الشهري', 'العنزي', 'الخضيري', 'الحسين', 'العسكر', 'باشا', 'مدني', 'العرفج',
|
|
||||||
'القحطاني', 'الفدا', 'المشيقح', 'العمرو', 'السالم', 'الشيباني', 'السهلي', 'المطرفي',
|
|
||||||
'الأحمري', 'الفيفي', 'العقل', 'الفرحان', 'الحصين', 'الأسمري', 'الماجد', 'الخالدي', 'السيف',
|
|
||||||
'الحنتوشي', 'الشهيل', 'الزامل', 'الصامل', 'السماعيل', 'الجريد', 'الحميد', 'المقبل',
|
|
||||||
'الراجحي', 'المنيف', 'السويلم', 'السمير', 'الصقير', 'الصقيه', 'سقا', 'مكي', 'جواهرجي',
|
|
||||||
'الجهني', 'الفريدي', 'برماوي', 'هوساوي', 'السعيد', 'الداوود', 'السليم', 'السماري',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $titleMale = array('السيد', 'الأستاذ', 'الدكتور', 'المهندس');
|
|
||||||
protected static $titleFemale = array('السيدة', 'الآنسة', 'الدكتورة', 'المهندسة');
|
|
||||||
private static $prefix = array('أ.', 'د.', 'أ.د', 'م.');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 'أ.'
|
|
||||||
*/
|
|
||||||
public static function prefix()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$prefix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 1010101010
|
|
||||||
*/
|
|
||||||
public static function idNumber()
|
|
||||||
{
|
|
||||||
$partialValue = static::numerify(
|
|
||||||
static::randomElement(array(1, 2)) . str_repeat('#', 8)
|
|
||||||
);
|
|
||||||
return Luhn::generateLuhnNumber($partialValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 1010101010
|
|
||||||
*/
|
|
||||||
public static function nationalIdNumber()
|
|
||||||
{
|
|
||||||
$partialValue = static::numerify(1 . str_repeat('#', 8));
|
|
||||||
return Luhn::generateLuhnNumber($partialValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @example 2010101010
|
|
||||||
*/
|
|
||||||
public static function foreignerIdNumber()
|
|
||||||
{
|
|
||||||
$partialValue = static::numerify(2 . str_repeat('#', 8));
|
|
||||||
return Luhn::generateLuhnNumber($partialValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,44 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider\at_AT;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class Payment
|
|
||||||
*
|
|
||||||
* @package Faker\Provider\at_AT
|
|
||||||
*/
|
|
||||||
class Payment extends \Faker\Provider\Payment
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Value Added Tax (VAT)
|
|
||||||
*
|
|
||||||
* @example 'ATU12345678', ('spaced') 'AT U12345678'
|
|
||||||
*
|
|
||||||
* @see http://ec.europa.eu/taxation_customs/vies/faq.html?locale=en#item_11
|
|
||||||
* @see http://www.iecomputersystems.com/ordering/eu_vat_numbers.htm
|
|
||||||
* @see http://en.wikipedia.org/wiki/VAT_identification_number
|
|
||||||
*
|
|
||||||
* @param bool $spacedNationalPrefix
|
|
||||||
*
|
|
||||||
* @return string VAT Number
|
|
||||||
*/
|
|
||||||
public static function vat($spacedNationalPrefix = true)
|
|
||||||
{
|
|
||||||
$prefix = $spacedNationalPrefix ? "AT U" : "ATU";
|
|
||||||
|
|
||||||
return sprintf("%s%d", $prefix, self::randomNumber(8, true));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* International Bank Account Number (IBAN)
|
|
||||||
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
|
|
||||||
* @param string $prefix for generating bank account number of a specific bank
|
|
||||||
* @param string $countryCode ISO 3166-1 alpha-2 country code
|
|
||||||
* @param integer $length total length without country code and 2 check digits
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function bankAccountNumber($prefix = '', $countryCode = 'AT', $length = null)
|
|
||||||
{
|
|
||||||
return static::iban($countryCode, $prefix, $length);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider\bg_BG;
|
|
||||||
|
|
||||||
class Internet extends \Faker\Provider\Internet
|
|
||||||
{
|
|
||||||
protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'hotmail.com', 'mail.bg', 'abv.bg', 'dir.bg');
|
|
||||||
protected static $tld = array('bg', 'bg', 'bg', 'bg', 'bg', 'bg', 'com', 'biz', 'info', 'net', 'org');
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider\bg_BG;
|
|
||||||
|
|
||||||
class Payment extends \Faker\Provider\Payment
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* International Bank Account Number (IBAN)
|
|
||||||
* @link http://en.wikipedia.org/wiki/International_Bank_Account_Number
|
|
||||||
* @param string $prefix for generating bank account number of a specific bank
|
|
||||||
* @param string $countryCode ISO 3166-1 alpha-2 country code
|
|
||||||
* @param integer $length total length without country code and 2 check digits
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function bankAccountNumber($prefix = '', $countryCode = 'BG', $length = null)
|
|
||||||
{
|
|
||||||
return static::iban($countryCode, $prefix, $length);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Value Added Tax (VAT)
|
|
||||||
*
|
|
||||||
* @example 'BG1234567890', ('spaced') 'BG 1234567890'
|
|
||||||
*
|
|
||||||
* @see http://ec.europa.eu/taxation_customs/vies/faq.html?locale=en#item_11
|
|
||||||
* @see http://en.wikipedia.org/wiki/VAT_identification_number
|
|
||||||
*
|
|
||||||
* @param bool $spacedNationalPrefix
|
|
||||||
*
|
|
||||||
* @return string VAT Number
|
|
||||||
*/
|
|
||||||
public static function vat($spacedNationalPrefix = true)
|
|
||||||
{
|
|
||||||
$prefix = $spacedNationalPrefix ? "BG " : "BG";
|
|
||||||
|
|
||||||
return sprintf(
|
|
||||||
"%s%d%d",
|
|
||||||
$prefix,
|
|
||||||
self::randomNumber(5, true), // workaround for mt_getrandmax() limitation
|
|
||||||
self::randomNumber(self::randomElement(array(4, 5)), true)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,114 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Faker\Provider\bg_BG;
|
|
||||||
|
|
||||||
class Person extends \Faker\Provider\Person
|
|
||||||
{
|
|
||||||
protected static $lastNameFormat = array(
|
|
||||||
'{{lastNameMale}}',
|
|
||||||
'{{lastNameFemale}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $maleNameFormats = array(
|
|
||||||
'{{firstNameMale}} {{lastNameMale}}',
|
|
||||||
'{{firstNameMale}} {{lastNameMale}}',
|
|
||||||
'{{firstNameMale}} {{lastNameMale}}',
|
|
||||||
'{{titleMale}} {{firstNameMale}} {{lastNameMale}}',
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $femaleNameFormats = array(
|
|
||||||
'{{firstNameFemale}} {{lastNameFemale}}',
|
|
||||||
'{{firstNameFemale}} {{lastNameFemale}}',
|
|
||||||
'{{firstNameFemale}} {{lastNameFemale}}',
|
|
||||||
'{{titleFemale}} {{firstNameFemale}} {{lastNameFemale}}'
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $firstNameMale = array(
|
|
||||||
'Абен', 'Аблен', 'Август', 'Августиан', 'Августин', 'Авел', 'Авер', 'Аверно', 'Авксентий', 'Аво', 'Авраам', 'Аврам', 'Аврели', 'Аврелий', 'Аврор', 'Агапи', 'Агапий', 'Агатопод', 'Агент', 'Аглай', 'Аглар', 'Агнен', 'Агнеш', 'Агоп', 'Агъци', 'Адалберт', 'Адам', 'Адеан', 'Аделин', 'Адем', 'Аднан', 'Адриан', 'Адриян', 'Аерозол', 'Азалия', 'Айдемир', 'Акашия', 'Аксакусти', 'Аксидан', 'Аксинтия', 'Албен', 'Алберт', 'Албияна', 'Алдин', 'Алевандър', 'Алег', 'Алек', 'Алекзандриян',
|
|
||||||
'Беримир', 'Берин', 'Берислав', 'Берия', 'Беро', 'Берослав', 'Бетина', 'Бетино', 'Бечо', 'Билян', 'Бинко', 'Биньо', 'Биню', 'Бисенти', 'Бисер', 'Благо', 'Благовест', 'Благой', 'Благомир', 'Благосвет', 'Блаже', 'Бог', 'Богдан', 'Богиня', 'Богой', 'Боголюб', 'Богомил', 'Богослав', 'Бодромир', 'Божан', 'Божидар', 'Божик', 'Божил', 'Божимир', 'Божин', 'Божинел', 'Божко', 'Божо', 'Божур', 'Боил', 'Боила', 'Бойко', 'Бойо', 'Бойчо', 'Болен', 'Болеслав', 'Боне', 'Бонислав', 'Бонко', 'Боно',
|
|
||||||
'Веселин', 'Весислав', 'Веско', 'Весо', 'Веспасиян', 'Ветко', 'Вечко', 'Вигалот', 'Виго', 'Виделин', 'Виден', 'Видин', 'Видол', 'Видослав', 'Видю', 'Викенти', 'Виктор', 'Вилиан', 'Вилизар', 'Вилизара', 'Вилислав', 'Вилиян', 'Вилям', 'Винету', 'Винко', 'Вино', 'Винсънт', 'Винченцо', 'Виолет', 'Виолин', 'Висарион', 'Виталий', 'Витан', 'Витко', 'Витлян', 'Витомир', 'Витош', 'Вихрен', 'Вихрони', 'Вихър', 'Вичо', 'Виша', 'Вишан', 'Вишетин', 'Вишню', 'Влад', 'Владилен', 'Владимер', 'Владимир',
|
|
||||||
'Галентин', 'Галиен', 'Галимир', 'Галин', 'Галиян', 'Гани', 'Ганислав', 'Ганцомир', 'Ганчо', 'Ганьо', 'Гаро', 'Гатьо', 'Гацо', 'Гачо', 'Гвардиана', 'Гелемир', 'Генади', 'Генади Валериев', 'Генадий', 'Генислав', 'Генко', 'Гено', 'Генчо', 'Геньо', 'Гео', 'Геодим', 'Геомил', 'Георги', 'Герасим', 'Герган', 'Гергей', 'Гергелюб', 'Гергин', 'Герго', 'Гердан', 'Герман', 'Геро', 'Герой', 'Герчо', 'Гетислав', 'Гетко', 'Гето', 'Гецо', 'Гечко', 'Гечо', 'Гешо', 'Гивеза', 'Гиздален', 'Гико', 'Гилдрой',
|
|
||||||
'Делчо', 'Делян', 'Деляна', 'Демин', 'Демир', 'Демян', 'Дениз', 'Деника', 'Денимир', 'Денис', 'Денислав', 'Дениян', 'Денчо', 'Деньо', 'Дердидас', 'десилиан', 'Десимир', 'Десислав', 'Деслав', 'Деспин', 'Деспинка', 'Деспот', 'Детелин', 'Детелюб', 'Дечко', 'Дечо', 'Дечю', 'Дешо', 'Деян', 'Джанер', 'Джанко', 'Джихад', 'Джон-стефан', 'Джулиен', 'Диаманди', 'Диамантина', 'Диан', 'Диван (на дядо Диан и дядо Иван)', 'Дивизие', 'Дивизия', 'Дивил', 'Дидко', 'Диего', 'Дийвид', 'Дико', 'Дилян',
|
|
||||||
'Евстати', 'Евстатий', 'Евстахий', 'Евтим', 'Егор', 'Едвин', 'Едит', 'Еднорог', 'Едрю', 'Едуард', 'Еким', 'Ектар', 'Ектор', 'Елвис', 'Елеан', 'Електрон', 'Елемаг', 'Елен', 'Еленко', 'Елиан', 'Елиас', 'Елиезер', 'Елизабет', 'Елин', 'Елисей', 'Елисия', 'Елко', 'Елтимир', 'Ельо', 'Ема-Бела', 'Еманоил', 'Емануел', 'Емануил', 'Емил', 'Емилиан', 'Емилиян', 'Ендо', 'Енис', 'Енчо', 'Еньо', 'Еню', 'Ервин', 'Ередин', 'Еремия', 'Ерик', 'Ерина', 'Ерол', 'Ерослав', 'Ерсен', 'Есен', 'Етиен', 'Ефка',
|
|
||||||
'Заварин', 'Завен', 'Замфир', 'Занго', 'Занко', 'Заприн', 'Запрян', 'Зарко', 'Зафер', 'Зафир', 'Захар', 'Захари', 'Захарин', 'Захо', 'Звездан', 'Звезделюб', 'Звездин', 'Звездислав', 'Звездиян', 'Звездолет', 'Звездомир', 'Згура', 'Здравелин', 'Здравец', 'Здравко', 'Здравомир', 'Здравчо', 'Зенгин', 'Зика', 'Зинко', 'Зинови', 'Златан', 'Злати', 'Златил', 'Златимир', 'Златин', 'Златиян', 'Златко', 'Златогор', 'Златозар', 'Златомир', 'Златослав', 'Златоцвет', 'Златьо', 'Золтан', 'Зоран',
|
|
||||||
'Илиомар', 'Илич', 'Илия', 'Илиян', 'Илко', 'Илчо', 'Имилиан', 'Ингемунд', 'Инко', 'Инокентий', 'Инчо', 'Иполит', 'Ириан', 'Ириней', 'иринеус', 'Ириян', 'Ирко', 'Ирма', 'Ирник', 'Исайа', 'Исак', 'Исидор', 'Искрен', 'Искър', 'Исперих', 'Истан', 'Истатко', 'Истилян', 'Исус', 'Итан', 'Итко', 'Ихтиандър', 'Ицо', 'Ичо', 'Йено', 'Йеремия', 'Йоан', 'Йоан-Александър', 'Йоан-иво', 'Йов', 'Йован', 'Йовица', 'Йовко', 'Йово', 'Йовро', 'Йовцо', 'Йовчо', 'Йожи', 'Йоил', 'Йоланд', 'Йолиян', 'Йолко',
|
|
||||||
'Карен', 'Карим', 'Карин', 'Карло', 'Кармен', 'Каролин', 'Карчо', 'Касандър', 'Катакомб', 'Каталинка', 'Катерин', 'Кевин', 'Кеворк', 'Кери', 'Кибер', 'Кимба', 'Кимбо', 'Кимо', 'Кимон', 'Кимчо', 'Кин', 'Кинка', 'Кинта', 'Киприслав', 'Киприян', 'Кириен', 'Кирил', 'Кирко', 'Кирчо', 'Киряк', 'Киряки', 'Киряко', 'Кис', 'Кит', 'Кито', 'Китодар', 'Китомир', 'Клеантин', 'Клим', 'Климент', 'Кнут', 'Козма', 'Койно', 'Койо', 'Койчо', 'Коко', 'Коле', 'Колонина', 'Колчо', 'Кольо', 'Колю', 'Комнин',
|
|
||||||
'Лалко', 'Лало', 'Лальо', 'Ламби', 'Ламбо', 'Ламбри', 'Ламбю', 'Ланселот', 'Ласкал', 'Ласкар', 'Ластър', 'Латин', 'Латко', 'Латьо', 'Латю', 'Лашко', 'ЛЕА-МАРИЯ', 'Леандър', 'Лев', 'Левент', 'Левчо', 'Леко', 'Ленин', 'Ленко', 'Леон', 'Леонардо', 'Леонид', 'Лесе', 'Лефтер', 'Лечо', 'Лилко', 'Лило', 'Лилчо', 'Лилян', 'Лимон', 'Лимончо', 'Липе', 'Лихия', 'Личо', 'Ловчо', 'Лозан', 'Лозана', 'Лозен', 'Лора-софия', 'Лоранс', 'Лоренцо', 'Лука', 'Лукан', 'Луко', 'Лули', 'Лулчо', 'Лусио', 'Лусия',
|
|
||||||
'Маноел', 'Манол', 'Манолин', 'Маноло', 'Мантас', 'Мануил', 'Мануш', 'Манчестър Юнайтед', 'Манчо', 'Маньо', 'Маню', 'Марангони', 'Маргарин', 'Маргарит', 'Марек', 'Мариан', 'Марий', 'Марин', 'Маринел', 'Маринчо', 'Марио', 'Мариоллита', 'Мариочка', 'Маритна', 'Мариян', 'Марк', 'Марк-антоний', 'Марко', 'Маркус', 'Мартен', 'Мартин', 'Мартиниян', 'Марто', 'Маруш', 'Марчело', 'Маслина', 'Матей', 'Матьо', 'Матю', 'Махно', 'Машо', 'Медиан', 'Менко', 'Мено', 'Мерилин', 'Месак', 'Метакса',
|
|
||||||
'Найо', 'Найчо', 'Наке', 'Нако', 'Нанко', 'Нанков', 'Нано', 'Нансимир', 'Нанчо', 'Наню', 'Нарцислав', 'Наско', 'Настимир', 'Настрадин', 'Натанаил', 'Нати', 'Натко', 'Наум', 'Нафисат', 'Нафтали', 'Нацко', 'Нацо', 'Начиян', 'Начко', 'Начо', 'Невелин', 'Невен', 'Невенко', 'Невилиян', 'Невян', 'Негослав', 'Неделин', 'Неделчо', 'Недислав', 'Недко', 'Недолюб', 'Недьо', 'Недю', 'Недялко', 'Нейко', 'Нейчо', 'Нелко', 'Нелчо', 'Нене', 'Ненко', 'Нено', 'Ненсислав', 'Ненчо', 'Неокли', 'Нерес',
|
|
||||||
'Обретим', 'Ованес', 'Огин', 'Огнемир', 'Огнен', 'Огнян', 'Океан', 'Олег', 'Олек', 'Олимпи', 'Омар', 'Омуртаг', 'Оник', 'Онуфри', 'Ончо', 'Орел', 'Орлин', 'Ортодокси', 'Орфей', 'Орхидей', 'Орце', 'Оскар', 'Оханес', 'Павел', 'Павелин', 'Павил', 'Павко', 'Павлик', 'Павлин', 'Павлинчо', 'Павломир', 'Паисий', 'Пако', 'Палми', 'Палмиро', 'Панаври', 'Панай', 'Панайот', 'Панде', 'Панделис', 'Пане', 'Панкртийян', 'Пано', 'Панталей', 'Пантелей', 'Пантер', 'Панто', 'Пантю', 'Панчо', 'Паолина',
|
|
||||||
'Параскев', 'Параход', 'Парашкев', 'Парашкеван', 'Паруш', 'Паскал', 'Паско', 'Паспанахил', 'Пато', 'Патрик', 'Патьо', 'Паулин', 'Паун', 'Пацо', 'Пачо', 'Пашо', 'Пейко', 'Пейо', 'Пейодон', 'Пейтан', 'Пейчин', 'Пейчо', 'Пеко', 'Пелай', 'Пеле', 'Пене', 'Пенко', 'Пенчин', 'Пенчо', 'Пеньо', 'Пеню', 'Пео', 'Пепино', 'Пепислав', 'Пепо', 'Пепонаки', 'Перикъл', 'Персиана', 'Персиян', 'Перчо', 'Петиконгрес', 'Петкан', 'Петко', 'Пето', 'Петраки', 'Петран', 'Петрана', 'Петринел', 'Петрозар', 'Петромил',
|
|
||||||
'Рангел', 'Рангел-любими', 'Рандю', 'Ранчо', 'Расате', 'Ратослав', 'Рафаил', 'Рачко', 'Рачо', 'Рашко', 'Рашо', 'Раю', 'Раян', 'Реан', 'Рем', 'Рикардо', 'Риналдо', 'Рис', 'Ристя', 'Ричард', 'Ричерд', 'Роберт', 'Роберто', 'Робин', 'Робърт', 'Рогелин', 'Рогелина', 'Рогена', 'Родан', 'Родион', 'Розалин', 'Розин', 'Розоцвет', 'Ройо', 'Роксан', 'Роман', 'Ромел', 'Ромелина', 'Ромен', 'Ромео', 'Ромил', 'Ромул', 'Росен', 'Росенка', 'Росимир', 'Росицвет', 'Роска', 'Роско', 'Ростиана', 'Ростимир', 'Ростислав',
|
|
||||||
'Светломир', 'Светлю', 'Светозар', 'Светослав', 'Свилен', 'Себастиан', 'Себахтин', 'Севан', 'Севар', 'Севастин', 'Севдалин', 'Севдан', 'Севелин', 'Северин', 'Седевчо', 'Седеф', 'Седефчо', 'Селен', 'Селена', 'Сенко', 'Серафим', 'Сергей', 'Сеслав', 'Сиви', 'Сивко', 'Сидер', 'Сидония', 'Сидор', 'Сиен', 'Силаги', 'Силан', 'Силвестър', 'Силвио', 'Силвиян', 'Силен', 'Силян', 'Симеон', 'Симо', 'Сирман', 'Сифоня', 'Скорбут', 'Слав', 'Славдо', 'Славе', 'Славей', 'Славейко', 'Славен', 'Слави', 'Славил',
|
|
||||||
'Теодоси', 'Теодосий', 'Теодослав', 'Теодостин', 'Теофан', 'Теофил', 'Теохар', 'Тервел', 'Тигрони', 'Тило', 'Тильо', 'Тимо', 'Тимон', 'Тимотей', 'Тимчо', 'Тинко', 'Тино', 'Тинчо', 'Тихо', 'Тихол', 'Тихомир', 'Тихон', 'Тишо', 'Тоде', 'Тодомирка', 'Тодор', 'Тодораки', 'Тодорин', 'Тодорина', 'Токимир', 'Толек', 'Толю', 'Тома', 'Томас', 'Томен', 'Томи', 'Томинка', 'Томислав', 'Томо', 'Тоне', 'Тони', 'Тонимир', 'Тонислав', 'Тонко', 'Тончо', 'Тоньо', 'Топалко', 'Тополко', 'Тотко', 'Тотьо', 'Тотю', 'Тоцо',
|
|
||||||
'Филатей', 'Фили', 'Филидан', 'Филимон', 'Филион', 'Филип', 'Филипас', 'Филипопол', 'Филко', 'Филомир', 'Филчо', 'Фильо', 'Финдо', 'Финдол', 'Фиро', 'Фирчо', 'Фичо', 'Флори', 'Флориан', 'Флорин', 'Флоро', 'Фори', 'Фосил', 'Фотин', 'Франк', 'Франц', 'Францислав', 'Фрацил', 'Фреди', 'Фродо', 'Фуго', 'Фуко', 'Фъстък', 'Фътьо', 'Фьодор', 'Хавтелин', 'Ханко', 'Хараламби', 'Харалампи', 'Харалан', 'Харбингър', 'Хари', 'Харизан', 'Харитии', 'Харитон', 'Хасан', 'Хасатин', 'Хачо', 'Хвойне', 'Хебър', 'Хектор',
|
|
||||||
'Хераклит', 'Хернани', 'Херодот', 'Хефестион', 'Химинай', 'Хинко', 'Хино', 'Хитко', 'Хороз', 'Храбрин', 'Храбър', 'Хранимир', 'Хранко', 'Хрелко', 'Хрельо', 'Хрисим', 'Хрисимир', 'Хрисо', 'Христалин', 'Христивилин', 'Христиела', 'Христилиан', 'Христилин', 'християн', 'Христо', 'Христо-никола', 'Христодор', 'Христозар', 'Христозорнициан', 'Христозорницомил', 'Христомил', 'Христомир', 'Христоско', 'Христослав', 'Христофор', 'Хрисчо', 'Хрондел', 'Хрусан', 'Хубав', 'Хубавен', 'Хубан', 'Хубен',
|
|
||||||
'Цоньо', 'Цоню', 'Цоцо', 'Цочо', 'Цъки', 'Чавдар', 'Чанкете', 'Чанко', 'Чано', 'Чаньо', 'Чаню', 'Чардафон', 'Чародей', 'Чауш', 'Чачо', 'Чвор', 'Чедомир', 'Ченко', 'Ченю', 'Чепо', 'Чернобил', 'Черноризец', 'Черньо', 'Чийо', 'Чико', 'Чило', 'Чонар', 'Чони', 'Чоно', 'Чоню', 'Чора', 'Чочо', 'Чочомир', 'Чубрик', 'Чуде', 'Чудо', 'Чудомир', 'Чудослав', 'Чук', 'Шабан', 'Шамо', 'Шанко', 'Шаноу', 'Шаро', 'Шейна', 'Шеки', 'Шенко', 'Шенол', 'Шибил', 'Шидер', 'Шильо', 'Шинко', 'Шино', 'Шипчан', 'Ширко', 'Шишман',
|
|
||||||
'Шкодри', 'Шмильо', 'Шмулю', 'Шпилко', 'Шпиньо', 'Шушо', 'Щедрин', 'Щедю', 'Щеки', 'Щено', 'Щеню', 'Щерион', 'Щериян', 'Щерко', 'Щеро', 'Щерьо', 'Щерю', 'Щилиян', 'Щилян', 'Щирян', 'Щоно', 'Щтърбан', 'Щтъркан', 'Щурк', 'Щурчо', 'Щърбан', 'Щъркан', 'Ъглен', 'Ълен', 'Ърнест', 'Ъруин', 'Ърчо', 'Ьобирдар', 'Юги', 'Юли', 'Юлиан', 'Юлий', 'Юлиян', 'Юрдан', 'Юри', 'Юрий', 'Юстин', 'Юстиниан', 'Яблен', 'Явлен', 'Явор', 'Яго', 'Ягодин', 'Язо', 'Яким', 'Яко', 'Якоб', 'Яков', 'Якослав', 'Ямболен', 'Ян', 'Янадин',
|
|
||||||
'Янаки', 'Янакин', 'Яначко', 'Яне', 'Янег', 'Янедин', 'Янек', 'Янеслав', 'Яни', 'Яниел', 'Яник', 'Янимир', 'Янис', 'Янислав', 'Яничко', 'Янко', 'Янкул', 'Янкуп', 'Яно', 'Яномил', 'Янтар', 'Януш', 'Янцислав', 'Янче', 'Янчо', 'Ярно', 'Яромир', 'Ярослав', 'Ярце', 'Ярчо', 'Яръм', 'Ярю', 'Ясен', 'Ясер', 'Ястреб', 'Ятан', 'Яцо', 'Ячко', 'Ячо', 'Яшар', 'Яшка', 'Яшо', 'Яшон'
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $firstNameFemale = array(
|
|
||||||
'Авгия', 'Авигея', 'Авторка', 'Аглая', 'Аглоида', 'Агнешка', 'Адамина', 'Адра', 'Адрианиа', 'Аела', 'Айрен', 'Аксентия', 'Алания', 'Албина', 'Александрина', 'Алексиа', 'Аленка', 'Алиана', 'Алисия', 'Алтая', 'Амбър', 'Амория', 'Ана Мария', 'Анатолия', 'Ангелка', 'Андика', 'Андриана', 'Анелина', 'анета', 'Анза', 'Анимира', 'Аница', 'Аномалия', 'Антоалина', 'Антонела', 'Ануша', 'Анхея-мей', 'Аполинария', 'Аралия', 'Аркадия', 'Арсена', 'Аселина', 'Асифа', 'Астромерия', 'Атина', 'Аурора', 'Багра',
|
|
||||||
'Балина', 'Бацислава', 'Беатрис', 'Бела', 'Белисима', 'Беломира', 'Бенелена', 'Берислава', 'Бея', 'Билена', 'Бисера', 'Биянка', 'Благодатка', 'Благосвета', 'Богдалина', 'Богородка', 'Бодурка', 'Божидара-силвестра', 'Божинела', 'Божурка', 'Бонифация', 'Борена', 'Бориска', 'Борянка', 'Боца', 'Бригита', 'Бронислава', 'Буна', 'Буча', 'Бързана', 'Ваклина', 'Валерия', 'Валя', 'Вангелия', 'Ванухи', 'Варта', 'Васенка', 'Василина', 'Васка', 'Вашиля', 'Вежда', 'Велиана', 'Велинна', 'Велиянка', 'Венда',
|
|
||||||
'Венеция', 'Венислава', 'Венчислава', 'Верена', 'Верислава', 'Веса', 'Веселинка', 'Весна', 'Веца', 'Видима', 'Виктория', 'Вилия', 'Вилхема', 'Виолета', 'Виржиния', 'Витомира', 'Вишка', 'Владилена', 'Владлена', 'Водица', 'Войнка', 'Вула', 'Възкресения', 'Въльо', 'Върбунка', 'Въца', 'Габи', 'Галена', 'Галина', 'Галя', 'Гануца', 'Гвоздейка', 'Гена', 'Георгелена', 'Георгица', 'Герга', 'Гердана', 'Гертруда', 'Гиздана', 'Гичка', 'Гордана', 'Гория', 'Гоца', 'Графица', 'Грета', 'Гримяна', 'Гроздинка',
|
|
||||||
'Гуна', 'Гъда', 'Гълъбица', 'Гюгра', 'Гюргя', 'Дакота', 'Дамяна', 'Данелина', 'Данимира', 'Данка', 'Дарданела', 'Дария', 'Дафинка', 'Деа', 'Деви', 'Делиана', 'Деля', 'Демирела', 'Дениандра', 'Дениславена', 'Денница', 'Десимиляна', 'Десияна', 'Дефлорина', 'Дея', 'Джана', 'Джиневра', 'Джулия', 'Диана - Мария', 'Дида', 'Дилмана', 'Димитра', 'Димка', 'Динна', 'Добрина', 'Дойка', 'Доменика', 'Доника', 'Дора-Анна', 'Дорина', 'Доста', 'Доча', 'Драгица', 'Дренка', 'Дуда', 'Душка', 'Дюкяна', 'Евангелина',
|
|
||||||
'Евдокия', 'Евридика', 'Едита', 'Ел', 'Елдора', 'Еленица', 'Елеонета', 'Ели', 'Елиз', 'Елина', 'Елиса', 'Елица', 'Елма', 'Елфида', 'Емануила', 'Емма', 'Еница', 'Ергана', 'Ермиля', 'Естела', 'Ефимена', 'Ефросиния', 'Жаклин', 'Жанин', 'Жара', 'Жейна', 'Желязка', 'Женимира', 'Жива', 'Живомира', 'Жичка', 'Жорка', 'Жулиана', 'Заека', 'Занка', 'Зафа', 'Захаринка', 'Звездемира', 'Здравелина', 'Здухостина', 'Зинаида', 'Златея', 'Златка', 'Златомира', 'Зоичка', 'Зорка', 'Зузичка', 'Ивалена', 'ивамина',
|
|
||||||
'Иванеса', 'Иваничка', 'Ивелиана', 'Ивинка', 'Иглика', 'Изидора', 'Илеана', 'Илианна', 'Илинда', 'Илка', 'Инан', 'Инеса', 'Ира', 'Ирин', 'Ирла', 'Исихия', 'Истилияна', 'Йоана', 'Йоанна', 'Йованка', 'Йоко', 'Йолина', 'Йона', 'Йоника', 'Йорданка', 'Йоханна', 'Кадифейка', 'Калея', 'Калина', 'Калиса', 'Калуда', 'Камея', 'Кануша', 'Карамелита', 'Карина', 'Касиди', 'Катастрофа', 'Катинка', 'Каунка', 'Кветослава', 'Керанка', 'Кети', 'Кино', 'Кирка', 'Китчица', 'Клара', 'Клеуна', 'Клоя', 'Кокимира',
|
|
||||||
'Комара', 'Константина', 'Корнелия', 'Костадинка', 'Кралина', 'Красидара', 'Красияна', 'Криси', 'кристабела', 'Кристиана', 'Кристия', 'Кръстанка', 'Ксандриния', 'Кунка', 'Кьнина', 'Лада', 'Лазура', 'Лалка', 'Лариса', 'Лаца', 'Лека', 'Ленче', 'Летисия', 'Либерта', 'Лидийка', 'Лика', 'Лилия', 'Лилянка', 'Линда', 'Лия', 'Лозанка', 'Лорена', 'Лоти', 'Луна', 'Лъчезарка', 'Любина', 'Люблина', 'Любослава', 'Люляна', 'Люсила', 'Лянка', 'Магдалена', 'Мадлен', 'Майя', 'Максимилияна', 'Малена',
|
|
||||||
'Малтина', 'Манолина', 'Мара-антоанета', 'Маргит', 'Марен', 'Мари-анри', 'Марийка', 'Маринета', 'Мариотка', 'Мария', 'Мария-елена', 'Мария-Хуана', 'Марлена', 'Маруся', 'Маса', 'Матка', 'Маша', 'Медиха', 'Мелания', 'Мелъди', 'Меропа', 'Миглена', 'Мила', 'Милара', 'милдия', 'Милиана', 'Милост', 'Мимоза', 'Минка', 'Миранза', 'Мирена', 'Миропа', 'Мисла', 'Митошка', 'Михайлена', 'Мишка', 'Младлена', 'Момера', 'Моника', 'Мортадела', 'Мушана', 'Наводненка', 'Надка', 'Найда', 'Нани', 'Настия',
|
|
||||||
'Наташа', 'Невена', 'Негрита', 'Неделяна', 'Нейка', 'Нелида', 'Нелла', 'Неолина', 'Нешка', 'Нигрита', 'Никоела', 'Николина', 'Нионила', 'Нона', 'Норка', 'Нурета', 'Огнена', 'Октавия', 'Оливера', 'Омана', 'Орлеана', 'Орхидея', 'Павилия', 'Павлина', 'Палвира', 'Паломина', 'Панда', 'Пантера', 'Парашкевица', 'Парунка', 'Патриотка', 'Паулина', 'Паца', 'Пейолина', 'Пелина', 'Пепелота', 'Периана', 'перуна', 'Петинка', 'Петрийка', 'Петромира', 'Петрушка', 'Пешка', 'Пламена', 'Плодовитка',
|
|
||||||
'Полексина', 'Полин', 'Правда', 'Преса', 'Прина', 'Пролетина', 'Простисвета', 'Пупи', 'Първолетка', 'Рада', 'Радиа', 'Радимира', 'Радка', 'Радосвета', 'Радостка', 'Раинка', 'Райничка', 'Рамина', 'Ревка', 'Ренгия', 'Риана', 'Римма', 'Рия', 'Роза', 'Розана', 'Розета', 'Розка', 'Роксана', 'Ромолета', 'Роселина', 'Росислава', 'Ростислава', 'Ружка', 'Румислава', 'Русалия', 'Руска', 'Сабина', 'Савета', 'Салина', 'Санка', 'Сарая', 'Сахория', 'Свежа', 'Светла', 'Светломира', 'Свидна', 'Свободка',
|
|
||||||
'Севда', 'севделина', 'Севета', 'Семенарка', 'Сергелинка', 'Сибила', 'Сиена', 'Силви', 'Силвия-александра', 'Силяна', 'Симона', 'Синтия', 'Сисоя', 'Скакалка', 'Славея', 'Славка', 'Сладоледка', 'Смехотерапия', 'Смирна', 'Снежинка', 'Софийка', 'Спасена', 'Спасияна', 'Спирела', 'Стависара', 'Стаматка', 'Станиела', 'Станимирка', 'Сташа', 'Стелина', 'Стефани', 'Стеяна', 'Стоимена', 'Столетка', 'Стоянка', 'Сузи', 'Съвестина', 'Сърменка', 'Таисия', 'тамара', 'Таня', 'Ташимира', 'Теа',
|
|
||||||
'Телефонка', 'Темира', 'Теодора', 'Теса', 'Тилиана', 'Тиха', 'Тоанета', 'Толиана', 'Тона', 'Тоницвета', 'Тоска', 'Тошка', 'Трендафила', 'Трифонка', 'Троша', 'Труфана', 'Тръпка', 'Туфка', 'Улиана', 'Урима', 'Фабияна', 'Фатиме', 'Феня', 'Фикия', 'Филипини', 'Фимка', 'Флавия', 'Флорика', 'Фотинка', 'Фронка', 'Фуга', 'Хана', 'Харитония', 'Хенриета', 'Хинка', 'Холи', 'Хранислава', 'Хрисанка', 'Христа', 'Христела', 'Христилияна', 'Христоелена', 'Христя', 'Хубавелка', 'Цанета', 'Царевна',
|
|
||||||
'Цветана', 'Цветелина', 'Цветилена', 'Цветлина', 'Цветолилия', 'Цветяна', 'Цеца', 'Цола', 'Цоня', 'Чана', 'Чардафона', 'Чачия', 'Череша', 'Четвърта', 'Чона', 'Чубрина', 'Шана', 'Шена', 'Шехерезада', 'Шинка', 'Щедра', 'Щериана', 'Щефания', 'Щилянка', 'Щтилка', 'Ъгленка', 'Ъчка', 'Юлиена', 'Юлия', 'Юнона', 'Юрита', 'Юстианна', 'Ябленка', 'Явора', 'Ягода', 'Ялислава', 'Яна - Мартина', 'Янина', 'Яниславия', 'Янка', 'Ярка', 'Ясена', 'Ятана'
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $lastNameMale = array(
|
|
||||||
'Чанталиев', 'Симеонов', 'Данданов', 'Кърков', 'Братухчев', 'Цветков', 'Иванов', 'Яназов', 'Тодоров', 'Колчев', 'Порязов', 'Келешев', 'Бърборков', 'Дришльов',
|
|
||||||
'Макаронски', 'Количков', 'Принов', 'Бодуров', 'Китов', 'Гьоков', 'Кукуряшков', 'Симеонов', 'Балахуров', 'Милачков', 'Европов Кирилов',
|
|
||||||
'Площаков', 'Мангъров', 'Хвърчилков', 'Дзезов', 'Ждраков', 'Месаров', 'Тухчиев', 'Топков', 'Яков', 'Иликьов', 'Бурханларски', 'Вражалски', 'Тутурилов', 'Бранков',
|
|
||||||
'Зенгинов', 'Чокълтов', 'Фенеров', 'Кучев', 'Възвъзов', 'Кьоров', 'Джогов', 'Пъков', 'Рангелов', 'Чутурков', 'Самсонов', 'Ментешев',
|
|
||||||
'Андонов', 'Бумов', 'Мочев', 'Дачев', 'Муев', 'Младенов', 'Тошев', 'Бедринов', 'Тумангелов', 'Негрилов', 'Канчин', 'Миленков', 'Патков',
|
|
||||||
'Пондьов', 'Самоходов', 'Четрафилски', 'Смърдански', 'Клатуров', 'Вакрилов', 'Портокалов', 'Прошков', 'Пулев', 'Парашкевов', 'Манавски', 'Чуков',
|
|
||||||
'Овнарски', 'Рошльов', 'Пройкова', 'Младенова', 'Кочеткова', 'Кесьов', 'Римпопов', 'Златков', 'Колев', 'Пикянски', 'Николов', 'Цицков',
|
|
||||||
'Стойков', 'Каракашев', 'Чуканов', 'Докова', 'Мераков', 'Пеева', 'Педалов', 'Тъпчилещов', 'Въртунински', 'Кодуков', 'Татьозов', 'Токов',
|
|
||||||
'Кукуригов', 'Юрганчев', 'Клатикрушев', 'Монтянов', 'Бобев', 'Топчийски', 'Луланков', 'Костов', 'Колипатков', 'Чукчуков', 'Геройски', 'Катъров', 'Кобиларов',
|
|
||||||
'Лимонадов', 'Цоцов', 'Поаков', 'Недялков', 'Станишев', 'Йорданов', 'Щърбов', 'Щонов', 'Занов'
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $lastNameFemale = array(
|
|
||||||
'Шестакова', 'Кокошкова', 'Градинарова', 'Куртакова', 'Чанлиева', 'Тодорова', 'Пътечкова', 'Скринска', 'Сапунджиева', 'Вампирска', 'Червенкова', 'Васовa', 'Таралингова',
|
|
||||||
'Илиева', 'Кривошапкова', 'Чупетловска', 'Катърова', 'Бележкова', 'Мустакова', 'Пръндачка', 'Коритарова', 'Йоткова', 'Сланинкова', 'Мангъфова', 'Шкембова', 'Пенджакова',
|
|
||||||
'Пачаръзка', 'Куртажова', 'Плюнкова', 'Многознаева', 'Контопишева', 'Белоконска-Вражалска', 'Кучкуделова', 'Крушовска', 'Пищовколева', 'Сопаджиева', 'Точева-Клопова',
|
|
||||||
'Габровлиева', 'Първанова', 'Певецова', 'Курухубева', 'Яркова', 'Плюцова', 'Балканска'
|
|
||||||
);
|
|
||||||
|
|
||||||
protected static $titleMale = array('Г-н', 'Др.');
|
|
||||||
protected static $titleFemale = array('Г-жа', 'Г-ца', 'Др.');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string|null $gender 'male', 'female' or null for any
|
|
||||||
* @example 'Чанталиев'
|
|
||||||
*/
|
|
||||||
public function lastName($gender = null)
|
|
||||||
{
|
|
||||||
if ($gender === static::GENDER_MALE) {
|
|
||||||
return static::lastNameMale();
|
|
||||||
} elseif ($gender === static::GENDER_FEMALE) {
|
|
||||||
return static::lastNameFemale();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->generator->parse(static::randomElement(static::$lastNameFormat));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function lastNameMale()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$lastNameMale);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function lastNameFemale()
|
|
||||||
{
|
|
||||||
return static::randomElement(static::$lastNameFemale);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue