Skip to content

Commit

Permalink
Merge pull request #380 from hydephp/analysis-KZENe2
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI

[ci skip] [skip ci]
  • Loading branch information
HydePHP authored May 17, 2022
2 parents 9d1134b + 4b35532 commit 03fcc9f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ class Meta
public static function name(string $name, string $content, bool $ifConditionIsMet = true): ?string
{
if ($ifConditionIsMet) {
return '<meta name="' . e($name) . '" content="' . e($content) . '">';
return '<meta name="'.e($name).'" content="'.e($content).'">';
}

return null;
}

public static function property(string $property, string $content, bool $ifConditionIsMet = true): ?string
{
if ($ifConditionIsMet) {
$property = static::formatOpenGraphProperty($property);
return '<meta property="' . e($property) . '" content="' . e($content) . '">';

return '<meta property="'.e($property).'" content="'.e($content).'">';
}

return null;
}

Expand All @@ -38,6 +41,6 @@ public static function getGlobalMeta(): array

protected static function formatOpenGraphProperty(string $property): string
{
return str_starts_with('og:', $property) ? $property : 'og:' . $property;
return str_starts_with('og:', $property) ? $property : 'og:'.$property;
}
}
}

0 comments on commit 03fcc9f

Please sign in to comment.