Skip to content

Commit

Permalink
Improve code climate
Browse files Browse the repository at this point in the history
  • Loading branch information
jkphl committed Dec 25, 2018
1 parent ca47633 commit d38b3c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Micrometa/Infrastructure/Factory/MicroformatsFactory.php
Expand Up @@ -79,7 +79,7 @@ protected static function createItem(array $item)
protected static function createTypes(array $types)
{
return array_map(
function ($type) {
function($type) {
return (object)['profile' => self::MF2_PROFILE_URI, 'name' => $type];
},
$types
Expand Down Expand Up @@ -159,7 +159,7 @@ protected static function createLanguage(array $values, &$lang)
protected static function createProperty(array $propertyValues)
{
return array_map(
function ($propertyValue) {
function($propertyValue) {
if (is_array($propertyValue)) {
return isset($propertyValue['type']) ?
self::createItem($propertyValue) : self::tagLanguage($propertyValue);
Expand All @@ -183,7 +183,7 @@ protected static function tagLanguage(array $values)
$lang = null;
$values = self::createLanguage($values, $lang);

return $lang ? array_map(function ($value) use ($lang) {
return $lang ? array_map(function($value) use ($lang) {
return (object)['value' => $value, 'lang' => $lang];
}, $values) : $values;
}
Expand Down
2 changes: 0 additions & 2 deletions src/Micrometa/Infrastructure/Parser/JsonLD.php
Expand Up @@ -313,9 +313,7 @@ protected function parse($jsonLD)
}

// Else if it's a list of items
//elseif (is_array($jsonLD)) {
return array_map([$this, 'parse'], $jsonLD);
// }
}

/**
Expand Down

0 comments on commit d38b3c4

Please sign in to comment.