| Total Complexity | 2 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | final class Php extends BasePath |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Returns a direct link to the folder with the source localization files. |
||
| 11 | * |
||
| 12 | * If the file name is specified, a full link to the file will be returned, |
||
| 13 | * otherwise a direct link to the folder. |
||
| 14 | * |
||
| 15 | * @param string|null $locale |
||
| 16 | * |
||
| 17 | * @return string |
||
| 18 | */ |
||
| 19 | public function source(string $locale = null): string |
||
| 20 | 48 | { |
|
| 21 | $locale = $this->clean( |
||
| 22 | 48 | $this->getPathForEnglish($locale) |
|
|
|
|||
| 23 | 48 | ); |
|
| 24 | 48 | ||
| 25 | return $this->real( |
||
| 26 | 48 | Config::getVendorPath() . $locale |
|
| 27 | 48 | ); |
|
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Returns the direct link to the localization folder or, |
||
| 32 | * if the file name is specified, a link to the localization file. |
||
| 33 | * |
||
| 34 | * If the file name or localization is not specified, |
||
| 35 | * the link to the shared folder of all localizations will be returned. |
||
| 36 | * |
||
| 37 | * @param string|null $locale |
||
| 38 | * @param string|null $filename |
||
| 39 | * |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function target(string $locale = null, string $filename = null): string |
||
| 48 | 48 | } |
|
| 49 | } |
||
| 50 |