golden hour
/opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/symplify/easy-parallel/src
⬆️ Go Up
Upload
File/Folder
Size
Actions
CommandLine
-
Del
OK
Contract
-
Del
OK
CpuCoreCountProvider.php
569 B
Del
OK
Enum
-
Del
OK
Exception
-
Del
OK
Reflection
-
Del
OK
ScheduleFactory.php
746 B
Del
OK
ValueObject
-
Del
OK
Edit: CpuCoreCountProvider.php
<?php declare (strict_types=1); namespace RectorPrefix202411\Symplify\EasyParallel; use RectorPrefix202411\Fidry\CpuCoreCounter\CpuCoreCounter; use RectorPrefix202411\Fidry\CpuCoreCounter\NumberOfCpuCoreNotFound; /** * @api */ final class CpuCoreCountProvider { /** * @var int */ private const DEFAULT_CORE_COUNT = 2; public function provide() : int { try { return (new CpuCoreCounter())->getCount(); } catch (NumberOfCpuCoreNotFound $exception) { return self::DEFAULT_CORE_COUNT; } } }
Save