I've started a new project recently and decided to have some functions under their own namespace (e.g general functional programming functions).
I've created a test and included the annotation but now I'm getting the following warning when testing for coverage:
"@covers ::pipe" is invalid
If I use \Example\FP\pipe the warning goes away but surely that's incorrect as there's nothing indicating it's a function (there's no class either in this case).
I've searched online, even considered raising an issue because as far as I can tell you either have a global function and use @covers ::functionName -or- you're forced to make it a static method.
A few questions:
- Is there a known solution when having namespaced functions that I'm just simply missing?
- Is the norm to just use static methods? If yes, why is it better than standard functions?
- Not needed: Is there a (significant) performance penalty of using static methods over normal functions?
Later edit: 3 - found Performance of static methods vs. functions