@@ -804,49 +804,49 @@ public function buildPath(string $Path, bool $PointsToFile = true): string
804804 /**
805805 * Gets substring from haystack prior to the first occurrence of needle.
806806 *
807- * @param string $h The haystack.
808- * @param string $n The needle.
807+ * @param string $Haystack The haystack.
808+ * @param string $Needle The needle.
809809 * @return string The substring.
810810 */
811811 public function substrBeforeFirst (string $ h , string $ n ): string
812812 {
813- return !$ n ? '' : substr ($ h , 0 , strpos ($ h , $ n ));
813+ return !strlen ( $ Needle ) ? '' : substr ($ Haystack , 0 , strpos ($ Haystack , $ Needle ));
814814 }
815815
816816 /**
817817 * Gets substring from haystack after the first occurrence of needle.
818818 *
819- * @param string $h The haystack.
820- * @param string $n The needle.
819+ * @param string $Haystack The haystack.
820+ * @param string $Needle The needle.
821821 * @return string The substring.
822822 */
823823 public function substrAfterFirst (string $ h , string $ n ): string
824824 {
825- return !$ n ? '' : substr ($ h , strpos ($ h , $ n ) + strlen ( $ n ) );
825+ return !( $ Length = strlen ( $ Needle )) ? '' : substr ($ Haystack , strpos ($ Haystack , $ Needle ) + $ Length );
826826 }
827827
828828 /**
829829 * Gets substring from haystack prior to the last occurrence of needle.
830830 *
831- * @param string $h The haystack.
832- * @param string $n The needle.
831+ * @param string $Haystack The haystack.
832+ * @param string $Needle The needle.
833833 * @return string The substring.
834834 */
835835 public function substrBeforeLast (string $ h , string $ n ): string
836836 {
837- return !$ n ? '' : substr ($ h , 0 , strrpos ($ h , $ n ));
837+ return !strlen ( $ Needle ) ? '' : substr ($ Haystack , 0 , strrpos ($ Haystack , $ Needle ));
838838 }
839839
840840 /**
841841 * Gets substring from haystack after the last occurrence of needle.
842842 *
843- * @param string $h The haystack.
844- * @param string $n The needle.
843+ * @param string $Haystack The haystack.
844+ * @param string $Needle The needle.
845845 * @return string The substring.
846846 */
847- public function substrAfterLast (string $ h , string $ n ): string
847+ public function substrAfterLast (string $ Haystack , string $ Needle ): string
848848 {
849- return !$ n ? '' : substr ($ h , strrpos ($ h , $ n ) + strlen ( $ n ) );
849+ return !( $ Length = strlen ( $ Needle )) ? '' : substr ($ Haystack , strrpos ($ Haystack , $ Needle ) + $ Length );
850850 }
851851
852852 /**
0 commit comments