| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function name($object, PropertyMapping $mapping): string |
||
| 28 | { |
||
| 29 | $file = $mapping->getFile($object); |
||
| 30 | $name = $this->transliterator->transliterate((string) $object); |
||
| 31 | |||
| 32 | if ($extension = $file->guessExtension()) { |
||
| 33 | $name = sprintf('%s_%s.%s', $name, date('YmdHis'), $extension); |
||
| 34 | } |
||
| 35 | |||
| 36 | return $name; |
||
| 37 | } |
||
| 38 | } |
||
| 39 |