This question already has an answer here:
I recently saw this question, which is a perfectly reasonably question about how to make code more efficient, but it was put on hold for being off topic. I see this all the time - someone wants to review something very specific that doesn't require an entire project surrounding it to ask, and it gets put on hold for being hypothetical.
The thing is, there is nowhere else to ask this question, and Code Review is almost certainly the best place for it. And now even though I might want to answer this guy's question, which is even useful to future browsers, I cannot.
The gist of this question is 'What is better in this case,
inject'. In what universe is that not a question for Code Review? We are reviewing two (short) pieces of code and determining which is better.
Why is this rule in place? Off the top of my head I can't think of any questions that so desperately need to be part of real code that to ask them without a surrounding project is worthy of being closed. This is a question and answer site; let people ask questions.