File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 44
55namespace CommunityTranslation \Translatable ;
66
7+ use ArgumentCountError ;
78use CommunityTranslation \Entity \Translatable ;
89use RuntimeException ;
910use Throwable ;
@@ -25,10 +26,12 @@ public static function fromString(string $string): self
2526 sprintf ($ string , ... $ samples );
2627 } catch (ValueError $ _ ) {
2728 return self ::Raw;
29+ } catch (ArgumentCountError $ _ ) {
30+ // Good
2831 } catch (Throwable $ x ) {
2932 $ xClass = get_class ($ x );
3033
31- throw new RuntimeException ("Error checking the following string: {$ string }\nThrowable class: {$ xClass }\n Messaeg : {$ x ->getMessage ()}" );
34+ throw new RuntimeException ("Error checking the following string: {$ string }\nThrowable class: {$ xClass }\n Message : {$ x ->getMessage ()}" );
3235 }
3336
3437 return self ::PHP ;
You can’t perform that action at this time.
0 commit comments