Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrutinizer Auto-Fixes #23

Merged
merged 1 commit into from
Sep 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -116,7 +117,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