Closed krzysztofrewak closed 1 month ago
if ($expected === "null") { $expected = null; }
This is shit and it's repeated in many scenarios. My proposition is to add some helper to maintain things like this:
function behat_null(string $nullable): ?string { return $nullable !== "null" ? $nullable : null; }
Only question is how: as a loose function or some static helper? Probably we could add some helpers for converting true/false from strings too.
true
false
This is shit and it's repeated in many scenarios. My proposition is to add some helper to maintain things like this:
Only question is how: as a loose function or some static helper? Probably we could add some helpers for converting
true
/false
from strings too.