phoneNumber06WithSeparator(); return str_replace(' ', '', $phoneNumber); } /** * Only 0601 to 0638, 0640 to 0689, 0695 and 0698 to 0699 are acceptable prefixes with 06 * * @see https://www.arcep.fr/la-regulation/grands-dossiers-thematiques-transverses/la-numerotation.html#c8961 * @see https://www.itu.int/itu-t/nnp/#/numbering-plans?country=France%C2%A0&code=33 */ public function phoneNumber06WithSeparator() { $regex = '([0-24-8]\d|3[0-8]|9[589])( \d{2}){3}'; return static::regexify($regex); } public function phoneNumber07() { $phoneNumber = $this->phoneNumber07WithSeparator(); return str_replace(' ', '', $phoneNumber); } /** * Only 0730 to 0789 are acceptable prefixes with 07 * * @see https://www.arcep.fr/la-regulation/grands-dossiers-thematiques-transverses/la-numerotation.html#c8961 * @see https://www.itu.int/itu-t/nnp/#/numbering-plans?country=France%C2%A0&code=33 */ public function phoneNumber07WithSeparator() { $regex = '([3-8]\d)( \d{2}){3}'; return static::regexify($regex); } public function phoneNumber08() { $phoneNumber = $this->phoneNumber08WithSeparator(); return str_replace(' ', '', $phoneNumber); } /** * Valid formats for 08: * * 0# ## ## ## * 1# ## ## ## * 2# ## ## ## * 91 ## ## ## * 92 ## ## ## * 93 ## ## ## * 97 ## ## ## * 98 ## ## ## * 99 ## ## ## * * Formats 089(4|6)## ## ## are valid, but will be * attributed when other 089 resource ranges are exhausted. * * @see https://www.arcep.fr/index.php?id=8146#c9625 * @see https://issuetracker.google.com/u/1/issues/73269839 */ public function phoneNumber08WithSeparator() { $regex = '([012]\d|(9[1-357-9])( \d{2}){3}'; return static::regexify($regex); } /** * @example '0601020304' */ public function mobileNumber() { $format = static::randomElement(static::$mobileFormats); return static::numerify($this->generator->parse($format)); } /** * @example '0891951357' */ public function serviceNumber() { $format = static::randomElement(static::$serviceFormats); return static::numerify($this->generator->parse($format)); } }