@@ -50,8 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | if($reflectionType->isInterface() && !$reflectionClass->implementsInterface($type)){ |
| 52 | 52 | trigger_error($class.' does not implement '.$type); |
| 53 | - } |
|
| 54 | - elseif(!$reflectionClass->isSubclassOf($type)) { |
|
| 53 | + } elseif(!$reflectionClass->isSubclassOf($type)) { |
|
| 55 | 54 | trigger_error($class.' does not inherit '.$type); |
| 56 | 55 | } |
| 57 | 56 | |
@@ -64,8 +63,7 @@ discard block |
||
| 64 | 63 | } |
| 65 | 64 | |
| 66 | 65 | return $object; |
| 67 | - } |
|
| 68 | - catch(Exception $e){ |
|
| 66 | + } catch(Exception $e){ |
|
| 69 | 67 | throw new TraitException('ClassLoader: '.$e->getMessage()); |
| 70 | 68 | } |
| 71 | 69 | |
@@ -36,18 +36,15 @@ |
||
| 36 | 36 | |
| 37 | 37 | if(($array instanceof ArrayObject) || ($array instanceof ArrayIterator)){ |
| 38 | 38 | $this->array = $array->getArrayCopy(); |
| 39 | - } |
|
| 40 | - elseif($array instanceof Traversable){ |
|
| 39 | + } elseif($array instanceof Traversable){ |
|
| 41 | 40 | $this->array = iterator_to_array($array); |
| 42 | 41 | } |
| 43 | 42 | // yields unexpected results with DotArray |
| 44 | 43 | elseif(gettype($array) === 'object'){ |
| 45 | 44 | $this->array = get_object_vars($array); |
| 46 | - } |
|
| 47 | - elseif(is_array($array)){ |
|
| 45 | + } elseif(is_array($array)){ |
|
| 48 | 46 | $this->array = $array; |
| 49 | - } |
|
| 50 | - else{ |
|
| 47 | + } else{ |
|
| 51 | 48 | $this->array = []; |
| 52 | 49 | } |
| 53 | 50 | } |
@@ -70,8 +70,7 @@ |
||
| 70 | 70 | |
| 71 | 71 | if(array_key_exists($var, $_ENV)){ |
| 72 | 72 | $env = $_ENV[$var]; |
| 73 | - } |
|
| 74 | - elseif(function_exists('getenv')){ |
|
| 73 | + } elseif(function_exists('getenv')){ |
|
| 75 | 74 | $env = getenv($var); |
| 76 | 75 | } |
| 77 | 76 | // @codeCoverageIgnoreStart |
@@ -50,8 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | if($this->__isset($property)){ |
| 52 | 52 | return $this->{$property}; |
| 53 | - } |
|
| 54 | - elseif($this->env instanceof DotEnv){ |
|
| 53 | + } elseif($this->env instanceof DotEnv){ |
|
| 55 | 54 | return $this->env->get($property); |
| 56 | 55 | } |
| 57 | 56 | |
@@ -69,8 +68,7 @@ discard block |
||
| 69 | 68 | // avoid overwriting private properties |
| 70 | 69 | if(!property_exists($this, $property) || !$this->__isPrivate($property)){ |
| 71 | 70 | $this->{$property} = $value; |
| 72 | - } |
|
| 73 | - elseif($this->env instanceof DotEnv){ |
|
| 71 | + } elseif($this->env instanceof DotEnv){ |
|
| 74 | 72 | $this->env->set($property, $value); |
| 75 | 73 | } |
| 76 | 74 | |