Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Dec 5, 2023
1 parent b6e127d commit 961810d
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 38 deletions.
13 changes: 7 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache">
<coverage>
<include>
<directory suffix=".php">./src/</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache">
<coverage/>
<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0"/>
</php>
Expand All @@ -13,4 +9,9 @@
<directory>./tests/</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src/</directory>
</include>
</source>
</phpunit>
17 changes: 3 additions & 14 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.13.1@086b94371304750d1c673315321a55d15fc59015">
<files psalm-version="5.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591">
<file src="src/Block/Service/MapBlockService.php">
<MixedAssignment>
<code>$latitude</code>
<code>$longitude</code>
</MixedAssignment>
<PossiblyNullArgument>
<code><![CDATA[$blockContext->getTemplate()]]></code>
</PossiblyNullArgument>
<UnusedClosureParam>
<code>$value</code>
</UnusedClosureParam>
</file>
<file src="src/DependencyInjection/Configuration.php">
<PossiblyNullReference>
<code>end</code>
</PossiblyNullReference>
<PossiblyUndefinedMethod>
<code>end</code>
</PossiblyUndefinedMethod>
<UnusedMethodCall>
<code>end</code>
<code>end</code>
<UndefinedInterfaceMethod>
<code>end</code>
</UnusedMethodCall>
</UndefinedInterfaceMethod>
</file>
<file src="src/DependencyInjection/NucleosMapsExtension.php">
<MixedArgument>
Expand Down
4 changes: 1 addition & 3 deletions src/Block/Service/MapBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ public function configureSettings(OptionsResolver $resolver): void
]);
}

public function validate(ErrorElement $errorElement, BlockInterface $block): void
{
}
public function validate(ErrorElement $errorElement, BlockInterface $block): void {}

public function getMetadata(): MetadataInterface
{
Expand Down
4 changes: 1 addition & 3 deletions src/NucleosMapsBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@

use Symfony\Component\HttpKernel\Bundle\Bundle;

final class NucleosMapsBundle extends Bundle
{
}
final class NucleosMapsBundle extends Bundle {}
1 change: 0 additions & 1 deletion src/Resources/config/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@
->call('setLogger', [
new Reference('logger'),
])

;
};
1 change: 0 additions & 1 deletion src/Resources/config/twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@

->set(MapsExtensions::class)
->tag('twig.extension')

;
};
2 changes: 1 addition & 1 deletion tests/Block/BundleIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ public function testStartup(): void
$client = new KernelBrowser(new AppKernel());
$client->request('GET', '/test');

static::assertSame(200, $client->getResponse()->getStatusCode());
self::assertSame(200, $client->getResponse()->getStatusCode());
}
}
6 changes: 3 additions & 3 deletions tests/Block/Service/MapBlockServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function testExecute(): void

$response = new Response();

$this->twig->expects(static::once())->method('render')
$this->twig->expects(self::once())->method('render')
->with(
'@NucleosMaps/Block/block_map.html.twig',
[
Expand All @@ -99,7 +99,7 @@ public function testExecute(): void

$blockService = new MapBlockService($this->twig, $this->provider);

static::assertSame($response, $blockService->execute($blockContext, $response));
static::assertSame('TWIG_CONTENT', $response->getContent());
self::assertSame($response, $blockService->execute($blockContext, $response));
self::assertSame('TWIG_CONTENT', $response->getContent());
}
}
2 changes: 1 addition & 1 deletion tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ public function testOptions(): void
],
];

static::assertSame($expected, $config);
self::assertSame($expected, $config);
}
}
2 changes: 1 addition & 1 deletion tests/NucleosMapsBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ public function testGetContainerExtension(): void
{
$bundle = new NucleosMapsBundle();

static::assertInstanceOf(NucleosMapsExtension::class, $bundle->getContainerExtension());
self::assertInstanceOf(NucleosMapsExtension::class, $bundle->getContainerExtension());
}
}
8 changes: 4 additions & 4 deletions tests/Twig/MapsExtensionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected function setUp(): void

public function testRenderGoogleMap(): void
{
static::assertSame(
self::assertSame(
'<div
data-controller="nucleos--maps-bundle--googlemaps"
data-nucleos--maps-bundle--googlemaps-latitude-value="12"
Expand All @@ -39,7 +39,7 @@ public function testRenderGoogleMap(): void

public function testRenderGoogleMapWithOptapiKeyions(): void
{
static::assertSame(
self::assertSame(
'<div
data-controller="mycontroller nucleos--maps-bundle--googlemaps"
data-nucleos--maps-bundle--googlemaps-latitude-value="12"
Expand Down Expand Up @@ -68,7 +68,7 @@ class="myclass"></div>',

public function testRenderOpenStreetMap(): void
{
static::assertSame(
self::assertSame(
'<div
data-controller="nucleos--maps-bundle--openstreetmap"
data-nucleos--maps-bundle--openstreetmap-latitude-value="12"
Expand All @@ -83,7 +83,7 @@ public function testRenderOpenStreetMap(): void

public function testRenderOpenStreetMapWithOptions(): void
{
static::assertSame(
self::assertSame(
'<div
data-controller="mycontroller nucleos--maps-bundle--openstreetmap"
data-nucleos--maps-bundle--openstreetmap-latitude-value="12"
Expand Down

0 comments on commit 961810d

Please sign in to comment.