| Conditions | 2 |
| Paths | 2 |
| Total Lines | 35 |
| Code Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function run() |
||
| 18 | { |
||
| 19 | Model::unguard(); |
||
| 20 | |||
| 21 | $angka_melek_hurufs = (object) [ |
||
| 22 | (object) [ |
||
| 23 | 'label' => 'G2G', |
||
| 24 | 'description' => 'Goverment to Goverment', |
||
| 25 | ], |
||
| 26 | (object) [ |
||
| 27 | 'label' => 'G2E', |
||
| 28 | 'description' => 'Goverment to Employee', |
||
| 29 | ], |
||
| 30 | (object) [ |
||
| 31 | 'label' => 'G2C', |
||
| 32 | 'description' => 'Goverment to Citizen', |
||
| 33 | ], |
||
| 34 | (object) [ |
||
| 35 | 'label' => 'G2B', |
||
| 36 | 'description' => 'Goverment to Business', |
||
| 37 | ], |
||
| 38 | ]; |
||
| 39 | |||
| 40 | foreach ($angka_melek_hurufs as $angka_melek_huruf) { |
||
| 41 | $model = AngkaMelekHuruf::updateOrCreate( |
||
| 42 | [ |
||
| 43 | 'label' => $angka_melek_huruf->label, |
||
| 44 | ], |
||
| 45 | [ |
||
| 46 | 'description' => $angka_melek_huruf->description, |
||
| 47 | ] |
||
| 48 | ); |
||
| 49 | $model->save(); |
||
| 50 | } |
||
| 51 | } |
||
| 52 | } |
||
| 53 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.