Skip to content

Commit

Permalink
Fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Dec 2, 2021
1 parent 6be78dc commit 80089c1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Configuration implements ConfigurationInterface
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('joli_typo');
$rootNode = $this->getRootNode($treeBuilder, 'joli_typo');
Expand Down
4 changes: 2 additions & 2 deletions src/JoliTypo/Bridge/Twig/JoliTypoExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ public function __construct($presets)
$this->presets = $presets;
}

public function getFunctions()
public function getFunctions(): array
{
return [
new \Twig\TwigFunction('jolitypo', [$this, 'translate']),
];
}

public function getFilters()
public function getFilters(): array
{
return [
new \Twig\TwigFilter('jolitypo', [$this, 'translate'], ['pre_escape' => 'html', 'is_safe' => ['html']]),
Expand Down
6 changes: 3 additions & 3 deletions tests/JoliTypo/Tests/Bridge/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class AppKernel extends Kernel
{
public function registerBundles()
public function registerBundles(): iterable
{
$bundles = [
new FrameworkBundle(),
Expand Down Expand Up @@ -54,12 +54,12 @@ public function registerContainerConfiguration(LoaderInterface $loader)
}
}

public function getCacheDir()
public function getCacheDir(): string
{
return '/tmp/jolitypo/cache/'.$this->environment;
}

public function getLogDir()
public function getLogDir(): string
{
return '/tmp/jolitypo/logs/'.$this->environment;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/JoliTypo/Tests/JoliTypoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function testNonHTMLContent()
NOT_HTML;

$this->assertEquals($fixed, $fixer->fix($toFix));
$this->assertEquals(html_entity_decode($fixed, null, 'UTF-8'), $fixer->fixString($toFix));
$this->assertEquals(html_entity_decode($fixed, \ENT_COMPAT, 'UTF-8'), $fixer->fixString($toFix));
$this->assertEquals('Here is a “protip©”!', $fixer->fixString('Here is a "protip(c)"!'));
}

Expand Down

0 comments on commit 80089c1

Please sign in to comment.