pgb_liv\php_ms\Search\Parameters\AbstractSearchParameters::setSpectraPath
Sets the spectra file location
Signature
public function setSpectraPath(string
$filePath,
[boolean
$ignoreValidation = false] )
Parameters
$filePath
—
string
Path to the spectra file
$ignoreValidation
—
boolean
If true will disable validation that the file must exist
Errors/Exceptions
-
InvalidArgumentException
- Thrown if $ignoreValidation is false and the file does not exist
Test Coverage
Information
- Coverage: 4/4 Lines (100%)
- Tests: 2
- Passed: 2 (100%)
Tests
- [ PASSED ] — pgb_liv\php_ms\Test\Unit\AbstractSearchParametersTest::testCanGetSetValidSpectraPath
- [ PASSED ] — pgb_liv\php_ms\Test\Unit\AbstractSearchParametersTest::testCanGetSetInvalidSpectraPath
Violations
PHPMessDetector
Line |
Rule |
Message |
119 |
BooleanArgumentFlag
|
The method setSpectraPath has a boolean flag argument $ignoreValidation, which is a certain sign of a Single Responsibility Principle violation. |