Added process of quotes#3
Conversation
|
Hi! @devcoder-xyz, I'm glad to help and hear your opinion about this so if there is something that you are not comfortable adding there will be no problems. Greetings |
|
@jaumarar Thanks for your help, had you read my comments ? i submit review if you can fix it |
|
Hi @devcoder-xyz i'm not seeing any reviews or comments in the mr nor other branches. can you link me here those comments? maybe are marked as draft or the reviews has not been started |
|
ok no problem 👍 its possible ? |
|
Sure, something like? Where Processor.php class Processor
{
execute($value)
{
foreach ([BooleanProcessor::class, QuotedProcessor::class] as $processorClass) {
$processor = new $processorClass($value);
if ($processor->canBeExecuted()) {
return $processor->execute();
}
}
return $value;
}
} |
|
yes like this but Processor's Name willl be added in DotEnv (constructor) |
|
I think it should be finished now |
michelphp
left a comment
There was a problem hiding this comment.
src/DotEnv.php
you forget "?" after array type,
Default value is NULL its ok but if $processors is null set Processors(null) , There will be a fatal error
src/Processor/QuotedProcessor.php
isWrappedByChar can be a private method
thank you very much @jaumarar it's perfect
|
Hi @devcoder-xyz should I change anything more? |
|
Yes please , you not see my comment ? src/DotEnv.php you forget "?" after array type, isWrappedByChar can be a private method thank you very much @jaumarar it's perfect |
|
Hi @devcoder-xyz I was away for a long time.. I hace added a test to proof that that |
If the .env file has a value wrapped in single or double quotes it will be parsed into a simple string:
.env file:
VARIABLE="value with double quotes"
Before:
$_ENV['VARIABLE] = "value with double quotes";
Now:
$_ENV['VARIABLE] = value with double quotes;
Also: