Skip to content

Commit

Permalink
Applied fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
webmozart authored and StyleCIBot committed Aug 15, 2016
1 parent 9a49df8 commit 767b0d7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/AbstractJsonRepository.php
Expand Up @@ -523,7 +523,7 @@ protected function flush()
*/
protected function isLinkReference($reference)
{
return isset($reference{0}) && '@' === $reference{0};
return isset($reference[0]) && '@' === $reference[0];
}

/**
Expand Down Expand Up @@ -551,7 +551,7 @@ protected function createResource($path, $reference)
{
if (null === $reference) {
$resource = new GenericResource();
} elseif (isset($reference{0}) && '@' === $reference{0}) {
} elseif (isset($reference[0]) && '@' === $reference[0]) {
$resource = new LinkResource(substr($reference, 1));
} elseif (is_dir($reference)) {
$resource = new DirectoryResource($reference);
Expand Down
2 changes: 1 addition & 1 deletion src/JsonRepository.php
Expand Up @@ -1014,6 +1014,6 @@ private function initWithDefaultOrder($path, $insertedPath, $references)
}

$parentPath = Path::getDirectory($parentPath);
};
}
}
}
8 changes: 6 additions & 2 deletions src/Resource/Collection/ArrayResourceCollection.php
Expand Up @@ -189,7 +189,9 @@ public function offsetUnset($key)
public function getPaths()
{
return array_map(
function (PuliResource $resource) { return $resource->getPath(); },
function (PuliResource $resource) {
return $resource->getPath();
},
$this->resources
);
}
Expand All @@ -200,7 +202,9 @@ function (PuliResource $resource) { return $resource->getPath(); },
public function getNames()
{
return array_map(
function (PuliResource $resource) { return $resource->getName(); },
function (PuliResource $resource) {
return $resource->getName();
},
$this->resources
);
}
Expand Down
8 changes: 6 additions & 2 deletions src/Resource/Collection/LazyResourceCollection.php
Expand Up @@ -248,7 +248,9 @@ public function getPaths()
}

return array_map(
function (PuliResource $resource) { return $resource->getPath(); },
function (PuliResource $resource) {
return $resource->getPath();
},
$this->resources
);
}
Expand All @@ -263,7 +265,9 @@ public function getNames()
}

return array_map(
function (PuliResource $resource) { return $resource->getName(); },
function (PuliResource $resource) {
return $resource->getName();
},
$this->resources
);
}
Expand Down

0 comments on commit 767b0d7

Please sign in to comment.