MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / mago_formats_simple_php

Function mago_formats_simple_php

src/formatting.rs:968–976  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

966
967 #[test]
968 fn mago_formats_simple_php() {
969 let input = "<?php\necho 'hello' ; \n";
970 let result = format_with_mago(input, mago_php_version::PHPVersion::PHP84);
971 assert!(result.is_ok(), "Expected Ok, got: {:?}", result);
972 let formatted = result.unwrap();
973 // The formatter should produce valid PHP with normalized spacing.
974 assert!(formatted.starts_with("<?php"));
975 assert!(formatted.contains("echo"));
976 }
977
978 #[test]
979 fn mago_returns_error_for_unparseable_php() {

Callers

nothing calls this directly

Calls 2

format_with_magoFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected