Skip to content

Commit

Permalink
PSR2 corrections as generated by PHPCBF;
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnazg committed Feb 9, 2016
1 parent fb7ee70 commit 070c092
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/AbstractConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ abstract class AbstractConfig implements ArrayAccess, ConfigInterface, Iterator
*
* @param array $data
*/
public function __construct(Array $data)
public function __construct(array $data)
{
$this->data = array_merge($this->getDefaults(), $data);
}
Expand Down Expand Up @@ -96,7 +96,7 @@ public function set($key, $value)

// Look for the key, creating nested keys if needed
while ($part = array_shift($segs)) {
if($cacheKey != ''){
if ($cacheKey != '') {
$cacheKey .= '.';
}
$cacheKey .= $part;
Expand All @@ -106,14 +106,14 @@ public function set($key, $value)
$root = &$root[$part];

//Unset all old nested cache
if(isset($this->cache[$cacheKey])){
if (isset($this->cache[$cacheKey])) {
unset($this->cache[$cacheKey]);
}

//Unset all old nested cache in case of array
if(count($segs) == 0){
if (count($segs) == 0) {
foreach ($this->cache as $cacheLocalKey => $cacheValue) {
if(substr($cacheLocalKey, 0, strlen($cacheKey)) === $cacheKey){
if (substr($cacheLocalKey, 0, strlen($cacheKey)) === $cacheKey) {
unset($this->cache[$cacheLocalKey]);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/ConfigInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,4 @@ public function has($key);
* @return array
*/
public function all();

}

0 comments on commit 070c092

Please sign in to comment.