DummyCpuCoreFinder
in package
implements
CpuCoreFinder
FinalYes
This finder returns whatever value you gave to it. This is useful for testing or as a fallback to avoid to catch the NumberOfCpuCoreNotFound exception.
Table of Contents
Interfaces
Properties
- $count : positive-int
Methods
- __construct() : mixed
- diagnose() : string
- Provides an explanation which may offer some insight as to what the finder will be able to find.
- find() : positive-int|null
- Find the number of CPU cores. If it could not find it, returns null. The means used to find the cores are at the implementation discretion.
- toString() : string
Properties
$count
private
positive-int
$count
Methods
__construct()
public
__construct(positive-int $count) : mixed
Parameters
- $count : positive-int
diagnose()
Provides an explanation which may offer some insight as to what the finder will be able to find.
public
diagnose() : string
This is practical to have an idea of what each finder will find collect information for the unit tests, since integration tests are quite complicated as dependent on complex infrastructures.
Return values
stringfind()
Find the number of CPU cores. If it could not find it, returns null. The means used to find the cores are at the implementation discretion.
public
find() : positive-int|null
Return values
positive-int|nulltoString()
public
toString() : string