Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed May 17, 2022
1 parent 9d1134b commit 4b35532
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 4b35532

Please sign in to comment.