Skip to content

Commit

Permalink
Merge pull request #23 from chrismichaels84/scrutinizer-patch-2
Browse files Browse the repository at this point in the history
Scrutinizer Auto-Fixes
  • Loading branch information
Michael Wilson committed Sep 6, 2015
2 parents 125652b + 96c6ab1 commit 9eb38b7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/Contracts/ManagesItemsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface ManagesItemsInterface
* This is an alias for reset()
*
* @param array $items
* @return \Michaels\Manager\Traits\ManagesItemsTrait
*/
public function initManager($items = []);

Expand All @@ -33,9 +34,9 @@ public function add($alias, $item = null);
* Get a single item
*
* @param string $alias
* @param null $fallback
* @param string $fallback
* @throws \Michaels\Manager\Exceptions\ItemNotFoundException If item not found
* @return mixed
* @return string
*/
public function get($alias, $fallback = null);

Expand Down Expand Up @@ -123,7 +124,7 @@ public function isEmpty();

/**
* When manager instance is used as a string, return json of items
* @return mixed
* @return string
*/
public function __toString();
}
4 changes: 2 additions & 2 deletions src/Traits/ManagesIocTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function setDiItemsName($nameOfItemsRepository)

/**
* Produces the object from an alias
* @param $alias
* @param string $alias
* @param mixed|string $fallback
* @return mixed
* @throws ItemNotFoundException
Expand All @@ -158,7 +158,7 @@ protected function produceDependency($alias, $fallback = '_michaels_no_fallback'

// Now setup those dependencies into an array
if (!$declared instanceof NoItemFoundMessage) {
$dependencies = array_map(function (&$value) use ($alias) {
$dependencies = array_map(function(&$value) use ($alias) {
if (is_string($value) && $this->exists($this->nameOfIocManifest . ".$alias")) {
return $this->fetch($value);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/ManagesItemsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public function remove($alias)
while (count($parts) > 1) {
$step = array_shift($parts);
if (isset($loc[$step]) && is_array($loc[$step])) {
$loc =& $loc[$step];
$loc = & $loc[$step];
}
}

Expand Down Expand Up @@ -360,7 +360,7 @@ protected function getArrayableItems($items)
return iterator_to_array($items);
}

return (array)$items;
return (array) $items;
}

/**
Expand Down

0 comments on commit 9eb38b7

Please sign in to comment.