@@ -22,7 +22,7 @@ |
||
22 | 22 | const DIR_NO_SUB = '.'; # current dir |
23 | 23 | const FILE_INDEX = 'index.htm'; # basic file |
24 | 24 | const FILE_FAIL = 'index.htm'; # file to show on fail |
25 | - const EXT = '.php'; # file extension |
|
25 | + const EXT = '.php'; # file extension |
|
26 | 26 | |
27 | 27 | const SPLITTER_SLASH = '/'; # split path by slash |
28 | 28 | const SPLITTER_QUOTE = '?'; # split path by quote sign |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | public static function directory(string $path, string $delimiter = DIRECTORY_SEPARATOR): string |
82 | 82 | { |
83 | 83 | $pos = mb_strrpos($path, $delimiter); |
84 | - return (false !== $pos) ? mb_substr($path, 0, $pos + 1) : '' ; |
|
84 | + return (false !== $pos) ? mb_substr($path, 0, $pos + 1) : ''; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | public static function filename(string $path, string $delimiter = DIRECTORY_SEPARATOR): string |
95 | 95 | { |
96 | 96 | $pos = mb_strrpos($path, $delimiter); |
97 | - return (false !== $pos) ? mb_substr($path, $pos + 1) : $path ; |
|
97 | + return (false !== $pos) ? mb_substr($path, $pos + 1) : $path; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | public static function fileBase(string $path, string $delimiter = IPaths::SPLITTER_DOT): string |
107 | 107 | { |
108 | 108 | $pos = mb_strrpos($path, $delimiter); |
109 | - return (false !== $pos) && (0 < $pos) ? mb_substr($path, 0, $pos) : $path ; |
|
109 | + return (false !== $pos) && (0 < $pos) ? mb_substr($path, 0, $pos) : $path; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | public static function fileExt(string $path, string $delimiter = IPaths::SPLITTER_DOT): string |
119 | 119 | { |
120 | 120 | $pos = mb_strrpos($path, $delimiter); |
121 | - return ((false !== $pos) && (0 < $pos)) ? mb_substr($path, $pos + 1) : '' ; |
|
121 | + return ((false !== $pos) && (0 < $pos)) ? mb_substr($path, $pos + 1) : ''; |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | */ |
130 | 130 | public static function removeEndingSlash(string $path, string $delimiter = DIRECTORY_SEPARATOR): string |
131 | 131 | { |
132 | - return ($delimiter == mb_substr($path, -1, 1)) ? mb_substr($path, 0, -1) : $path ; |
|
132 | + return ($delimiter == mb_substr($path, -1, 1)) ? mb_substr($path, 0, -1) : $path; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
@@ -149,6 +149,6 @@ discard block |
||
149 | 149 | $base = static::fileBase($fName); |
150 | 150 | $extLen = strlen($ext); |
151 | 151 | $cut = substr($base, 0, ($maxLen - $extLen)); |
152 | - return ($extLen) ? $cut . $delimiter . $ext : $cut ; |
|
152 | + return ($extLen) ? $cut . $delimiter . $ext : $cut; |
|
153 | 153 | } |
154 | 154 | } |