Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed CS #101

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
'concat_space' => ['spacing' => 'one'],
'ordered_class_elements' => true, // Symfony(PSR12) override the default value, but we don't want
'blank_line_before_statement' => true, // Symfony(PSR12) override the default value, but we don't want
'nullable_type_declaration' => true, // Same as symfony
])
->setFinder($finder)
;
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

class JoliTypoExtension extends Extension
{
/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
Expand Down
8 changes: 4 additions & 4 deletions src/JoliTypo/Fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private function compileRules(array $rules): void
foreach ($rules as $rule) {
if (\is_object($rule)) {
$fixer = $rule;
$className = \get_class($rule);
$className = $rule::class;
} else {
$className = class_exists($rule) ? $rule : (class_exists(
'JoliTypo\\Fixer\\' . $rule
Expand Down Expand Up @@ -275,7 +275,7 @@ private function doFix(\DOMText $childNode, \DOMNode $node, \DOMDocument $dom):
}

/**
* @throws Exception\InvalidMarkupException
* @throws InvalidMarkupException
*/
private function loadDOMDocument($content): \DOMDocument
{
Expand Down Expand Up @@ -311,8 +311,8 @@ private function fixContentEncoding($content): string
{
if (!empty($content)) {
// Little hack to force UTF-8
if (false === strpos($content, '<?xml encoding')) {
$hack = false === strpos(
if (!str_contains($content, '<?xml encoding')) {
$hack = !str_contains(
$content,
'<body'
) ? '<?xml encoding="UTF-8"><body>' : '<?xml encoding="UTF-8">';
Expand Down
2 changes: 0 additions & 2 deletions src/JoliTypo/Fixer/Numeric.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
namespace JoliTypo\Fixer;

/**
* {@inheritdoc}
*
* @deprecated Numeric should not be used (reserved keyword in PHP7)
*/
class Numeric extends Unit
Expand Down
Loading