composeer update

This commit is contained in:
2019-06-23 11:49:01 +00:00
parent fc2380d68c
commit e9efe70112
327 changed files with 5194 additions and 2278 deletions
+3 -34
View File
@@ -2,8 +2,6 @@
namespace Dotenv\Environment;
use InvalidArgumentException;
/**
* The default implementation of the environment variables interface.
*/
@@ -37,16 +35,10 @@ class DotenvVariables extends AbstractVariables
*
* @param string $name
*
* @throws \InvalidArgumentException
*
* @return string|null
*/
public function get($name)
protected function getInternal($name)
{
if (!is_string($name)) {
throw new InvalidArgumentException('Expected name to be a string.');
}
foreach ($this->adapters as $adapter) {
$result = $adapter->get($name);
if ($result->isDefined()) {
@@ -61,22 +53,10 @@ class DotenvVariables extends AbstractVariables
* @param string $name
* @param string|null $value
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function set($name, $value = null)
protected function setInternal($name, $value = null)
{
if (!is_string($name)) {
throw new InvalidArgumentException('Expected name to be a string.');
}
// Don't overwrite existing environment variables if we're immutable
// Ruby's dotenv does this with `ENV[key] ||= value`.
if ($this->isImmutable() && $this->get($name) !== null) {
return;
}
foreach ($this->adapters as $adapter) {
$adapter->set($name, $value);
}
@@ -87,21 +67,10 @@ class DotenvVariables extends AbstractVariables
*
* @param string $name
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function clear($name)
protected function clearInternal($name)
{
if (!is_string($name)) {
throw new InvalidArgumentException('Expected name to be a string.');
}
// Don't clear anything if we're immutable.
if ($this->isImmutable()) {
return;
}
foreach ($this->adapters as $adapter) {
$adapter->clear($name);
}