Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
m1 committed Jan 19, 2016
1 parent d5acd77 commit 63d4371
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/Loader/DirectoryLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function load()
/**
* Returns the supported files in the directory recursively
*
* @return array The supported files in the directories
* @return \RegexIterator The supported files in the directories
*/
private function getSupportedFilesRecursively()
{
Expand All @@ -76,7 +76,7 @@ private function getSupportedFilesRecursively()
/**
* Returns the supported files in the directory
*
* @return array The supported files in the directory
* @return \RegexIterator The supported files in the directory
*/
private function getSupportedFiles()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Resource/FileResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private function import2Resource($import, array $imported_resources)
*
* @param array|string $import The import to create a resource from
*
* @return array|\M1\Vars\Resource\ResourceProvider The resource of the import
* @return \M1\Vars\Resource\ResourceProvider The resource of the import
*/
private function createResource($import)
{
Expand Down Expand Up @@ -377,7 +377,7 @@ private function getBooleanValue($value)
/**
* Returns the filename of the resource
*
* @return mixed The filename
* @return string The filename
*/
public function getFilename()
{
Expand Down
2 changes: 0 additions & 2 deletions src/Resource/ResourceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ private function getSupportedFilesInDir($entity)
/**
* Merges various configuration contents into one array
*
* @param mixed $contents,... Optional number of arrays to merge
*
* @return array The merged contents
*/
private function mergeContents()
Expand Down
8 changes: 4 additions & 4 deletions src/Traits/TransformerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

namespace M1\Vars\Traits;

use M1\Vars\Resource\InternalVariableResource;

/**
* Vars transformer class for to*() functions
*
Expand All @@ -35,8 +33,10 @@ public function toEnv()
{
$dots = $this->toDots();

foreach ($dots as $dot_k => $dot_v) {
putenv(sprintf('%s=%s', $dot_k, $dot_v));
if (is_array($dots)) {
foreach ($dots as $dot_k => $dot_v) {
putenv(sprintf('%s=%s', $dot_k, $dot_v));
}
}
}

Expand Down
7 changes: 3 additions & 4 deletions src/Variables/VariableProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class VariableProvider


/**
* The replacement store
* The types of variables
*
* @var \M1\Vars\Variables\ReplacementStore $rstore
* @var array $variable_types
*/
private static $variable_types = array('replacement', 'variable', 'env');

Expand All @@ -64,7 +64,7 @@ class VariableProvider
/**
* The variable store
*
* @var \M1\Vars\Variables\ReplacementStore $vstore
* @var \M1\Vars\Variables\VariableStore $vstore
*/
public $vstore;

Expand All @@ -75,7 +75,6 @@ class VariableProvider
*/
public function __construct($vars)
{
$this->vars = $vars;
$this->vstore = new VariableStore();
$this->rstore = new ReplacementStore($vars);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Vars.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ public function getResources()
}

/**
* Returns the CacheProvider if set, if not return false
* Returns the CacheProvider if set
*
* @return \M1\Vars\Cache\CacheProvider|false The CacheProvider or false
* @return \M1\Vars\Cache\CacheProvider The CacheProvider
*/
public function getCache()
{
Expand Down

0 comments on commit 63d4371

Please sign in to comment.