Skip to content

Commit 63d4371

Browse files
committed
Clean up
1 parent d5acd77 commit 63d4371

File tree

6 files changed

+13
-16
lines changed

6 files changed

+13
-16
lines changed

src/Loader/DirectoryLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function load()
5858
/**
5959
* Returns the supported files in the directory recursively
6060
*
61-
* @return array The supported files in the directories
61+
* @return \RegexIterator The supported files in the directories
6262
*/
6363
private function getSupportedFilesRecursively()
6464
{
@@ -76,7 +76,7 @@ private function getSupportedFilesRecursively()
7676
/**
7777
* Returns the supported files in the directory
7878
*
79-
* @return array The supported files in the directory
79+
* @return \RegexIterator The supported files in the directory
8080
*/
8181
private function getSupportedFiles()
8282
{

src/Resource/FileResource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ private function import2Resource($import, array $imported_resources)
254254
*
255255
* @param array|string $import The import to create a resource from
256256
*
257-
* @return array|\M1\Vars\Resource\ResourceProvider The resource of the import
257+
* @return \M1\Vars\Resource\ResourceProvider The resource of the import
258258
*/
259259
private function createResource($import)
260260
{
@@ -377,7 +377,7 @@ private function getBooleanValue($value)
377377
/**
378378
* Returns the filename of the resource
379379
*
380-
* @return mixed The filename
380+
* @return string The filename
381381
*/
382382
public function getFilename()
383383
{

src/Resource/ResourceProvider.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ private function getSupportedFilesInDir($entity)
226226
/**
227227
* Merges various configuration contents into one array
228228
*
229-
* @param mixed $contents,... Optional number of arrays to merge
230-
*
231229
* @return array The merged contents
232230
*/
233231
private function mergeContents()

src/Traits/TransformerTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
namespace M1\Vars\Traits;
2020

21-
use M1\Vars\Resource\InternalVariableResource;
22-
2321
/**
2422
* Vars transformer class for to*() functions
2523
*
@@ -35,8 +33,10 @@ public function toEnv()
3533
{
3634
$dots = $this->toDots();
3735

38-
foreach ($dots as $dot_k => $dot_v) {
39-
putenv(sprintf('%s=%s', $dot_k, $dot_v));
36+
if (is_array($dots)) {
37+
foreach ($dots as $dot_k => $dot_v) {
38+
putenv(sprintf('%s=%s', $dot_k, $dot_v));
39+
}
4040
}
4141
}
4242

src/Variables/VariableProvider.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ class VariableProvider
4848

4949

5050
/**
51-
* The replacement store
51+
* The types of variables
5252
*
53-
* @var \M1\Vars\Variables\ReplacementStore $rstore
53+
* @var array $variable_types
5454
*/
5555
private static $variable_types = array('replacement', 'variable', 'env');
5656

@@ -64,7 +64,7 @@ class VariableProvider
6464
/**
6565
* The variable store
6666
*
67-
* @var \M1\Vars\Variables\ReplacementStore $vstore
67+
* @var \M1\Vars\Variables\VariableStore $vstore
6868
*/
6969
public $vstore;
7070

@@ -75,7 +75,6 @@ class VariableProvider
7575
*/
7676
public function __construct($vars)
7777
{
78-
$this->vars = $vars;
7978
$this->vstore = new VariableStore();
8079
$this->rstore = new ReplacementStore($vars);
8180
}

src/Vars.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ public function getResources()
315315
}
316316

317317
/**
318-
* Returns the CacheProvider if set, if not return false
318+
* Returns the CacheProvider if set
319319
*
320-
* @return \M1\Vars\Cache\CacheProvider|false The CacheProvider or false
320+
* @return \M1\Vars\Cache\CacheProvider The CacheProvider
321321
*/
322322
public function getCache()
323323
{

0 commit comments

Comments
 (0)