| Conditions | 5 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 14 |
| Ratio | 100 % |
| Tests | 7 |
| CRAP Score | 5.0488 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 2 | View Code Duplication | public function __construct($jobData = []) |
| 18 | { |
||
| 19 | 2 | if (is_array($jobData) || is_object($jobData)) { |
|
| 20 | 2 | foreach ($jobData as $key => $value) { |
|
| 21 | 2 | if (property_exists($this, $key)) { |
|
| 22 | 2 | $this->{$key} = $value; |
|
| 23 | } else { |
||
| 24 | 2 | $this->unknown_fields[$key] = $value; |
|
| 25 | } |
||
| 26 | } |
||
| 27 | } else { |
||
| 28 | throw new \InvalidArgumentException(sprintf('Argument 1 passed to "%s" must be an array or object', __METHOD__)); |
||
| 29 | } |
||
| 30 | 2 | } |
|
| 31 | |||
| 49 |
This check marks property names that have not been written in camelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes
databaseConnectionString.