| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 3.0261 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 1 | public function createYearsFrom($startYear, $endYear = null) |
|
| 32 | { |
||
| 33 | 1 | if (is_null($endYear)) { |
|
| 34 | $endYear = date('Y'); |
||
| 35 | } |
||
| 36 | |||
| 37 | 1 | for ($year = $startYear; $year <= $endYear; ++$year) { |
|
| 38 | 1 | $obdobi = ['kod' => $year, |
|
| 39 | 1 | 'platiOdData' => $year.'-01-01T00:00:00', |
|
| 40 | 1 | 'platiDoData' => $year.'-12-31T23:59:59', |
|
| 41 | 1 | ]; |
|
| 42 | 1 | $this->setData($obdobi); |
|
| 43 | 1 | $result = $this->insertToFlexibee(); |
|
| 44 | 1 | $this->addStatusMessage(print_r($result, 1)); |
|
| 45 | 1 | } |
|
| 46 | 1 | } |
|
| 47 | } |
||
| 48 |