jpcercal / environment

A simple library (with all methods covered by php unit tests) to increase the power of your environment variables.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove private construct from environment class

prisis opened this issue · comments

No need for this.

Hello @prisis, this statement is required to the developers do not perform it:

$env = new Environment();

That does not make sense because the environment class is used only to get the environment variables that are already registered. But, i agree with you, and i will improvement this statement to throw a Exception when execute the constructor method. What do you do think?

Hey @jpcercal, sorry i did forget about this haha...

The best solutions is to remove it.
All php developer know how to use a static class.

Or you make a new class for static and normal use, like https://github.com/danielstjules/Stringy/tree/master/src

I know that all php developers knows how to use a static class this is not a question is a fact. But, i really can not see a reason to remove this statement.

Your suggestion to create a new Static class is interesting.

Then, i implemented this features in the commit 3f22994

Thanks guy!

I like it :)