| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public static function forPathConflict(ModuleConflict $conflict, Exception $cause = null) |
||
| 27 | { |
||
| 28 | $moduleNames = $conflict->getModuleNames(); |
||
| 29 | $lastModuleName = array_pop($moduleNames); |
||
| 30 | |||
| 31 | return new static(sprintf( |
||
| 32 | 'The modules "%s" and "%s" add resources for the same path '. |
||
| 33 | "\"%s\", but have no override order defined between them.\n\n". |
||
| 34 | "Resolutions:\n\n(1) Add the key \"override\" to the puli.json ". |
||
| 35 | "of one module and set its value to the other module name.\n(2) ". |
||
| 36 | 'Add the key "override-order" to the puli.json of the root '. |
||
| 37 | 'module and define the order of the modules there.', |
||
| 38 | implode('", "', $moduleNames), |
||
| 39 | $lastModuleName, |
||
| 40 | $conflict->getConflictingToken() |
||
| 41 | ), 0, $cause); |
||
| 42 | } |
||
| 43 | } |
||
| 44 |