| Server IP : 127.0.1.1 / Your IP : 216.73.216.152 Web Server : Apache/2.4.52 (Ubuntu) System : Linux bahcrestlinepropertiesllc 5.15.0-113-generic #123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/bahcrestline/core/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/ |
Upload File : |
<?php
namespace Faker\Provider\pl_PL;
class Company extends \Faker\Provider\Company
{
protected static $formats = array(
'{{lastName}}',
'{{lastName}}',
'{{lastName}} {{companySuffix}}',
'{{lastName}} {{companySuffix}}',
'{{lastName}} {{companySuffix}}',
'{{lastName}} {{companySuffix}}',
'{{companyPrefix}} {{lastName}}',
'{{lastName}}-{{lastName}}',
);
protected static $companySuffix = array('S.A.', 'i syn', 'sp. z o.o.', 'sp. j.', 'sp. p.', 'sp. k.', 'S.K.A', 's. c.', 'P.P.O.F');
protected static $companyPrefix = array('Grupa', 'Fundacja', 'Stowarzyszenie', 'Spółdzielnia');
/**
* @example 'Grupa'
*/
public static function companyPrefix()
{
return static::randomElement(static::$companyPrefix);
}
/*
* Register of the National Economy
* @link http://pl.wikipedia.org/wiki/REGON
* @return 9 digit number
*/
public static function regon()
{
$weights = array(8, 9, 2, 3, 4, 5, 6, 7);
$regionNumber = static::numberBetween(0, 49) * 2 + 1;
$result = array((int) ($regionNumber / 10), $regionNumber % 10);
for ($i = 2, $size = count($weights); $i < $size; $i++) {
$result[$i] = static::randomDigit();
}
$checksum = 0;
for ($i = 0, $size = count($result); $i < $size; $i++) {
$checksum += $weights[$i] * $result[$i];
}
$checksum %= 11;
if ($checksum == 10) {
$checksum = 0;
}
$result[] = $checksum;
return implode('', $result);
}
/**
* Register of the National Economy, local entity number
* @link http://pl.wikipedia.org/wiki/REGON
* @return 14 digit number
*/
public static function regonLocal()
{
$weights = array(2, 4, 8, 5, 0, 9, 7, 3, 6, 1, 2, 4, 8);
$result = str_split(static::regon());
for ($i = count($result), $size = count($weights); $i < $size; $i++) {
$result[$i] = static::randomDigit();
}
$checksum = 0;
for ($i = 0, $size = count($result); $i < $size; $i++) {
$checksum += $weights[$i] * $result[$i];
}
$checksum %= 11;
if ($checksum == 10) {
$checksum = 0;
}
$result[] = $checksum;
return implode('', $result);
}
}