Skip to content

Commit 2ef89d0

Browse files
committed
Minor corrections
1 parent c6e59b1 commit 2ef89d0

File tree

8 files changed

+34
-31
lines changed

8 files changed

+34
-31
lines changed

ecs.php

+8-6
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,15 @@
8888
'import_functions' => true,
8989
]);
9090

91-
$config->skip([
92-
PhpUnitTestClassRequiresCoversFixer::class
93-
]);
91+
$config->skip([PhpUnitTestClassRequiresCoversFixer::class]);
9492

9593
$config->parallel();
96-
$config->paths([
97-
__DIR__.'/src',
98-
__DIR__.'/tests',
94+
$config->paths([__DIR__ . '/']);
95+
$config->skip([
96+
__DIR__ . '/.github',
97+
__DIR__ . '/.phpunit.result.cache',
98+
__DIR__ . '/config',
99+
__DIR__ . '/var',
100+
__DIR__ . '/vendor',
99101
]);
100102
};

importmap.php

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
<?php
22

3-
/**
4-
* Returns the import map for this application.
5-
*
6-
* - "path" is a path inside the asset mapper system. Use the
7-
* "debug:asset-map" command to see the full list of paths.
8-
*
9-
* - "preload" set to true for any modules that are loaded on the initial
10-
* page load to help the browser download them earlier.
11-
*
12-
* The "importmap:require" command can be used to add new entries to this file.
13-
*
14-
* This file has been auto-generated by the importmap commands.
15-
*/
3+
declare(strict_types=1);
4+
165
return [
176
'app' => [
187
'path' => 'app.js',

migrations/Version20220403120305.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Doctrine\DBAL\Schema\Schema;
88
use Doctrine\Migrations\AbstractMigration;
9+
use LogicException;
910

1011
final class Version20220403120305 extends AbstractMigration
1112
{
@@ -34,6 +35,6 @@ public function up(Schema $schema): void
3435

3536
public function down(Schema $schema): void
3637
{
37-
throw new \LogicException('Wild cats never go back!');
38+
throw new LogicException('Wild cats never go back!');
3839
}
3940
}

migrations/Version20230619191051.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Doctrine\DBAL\Schema\Schema;
88
use Doctrine\Migrations\AbstractMigration;
9+
use LogicException;
910

1011
final class Version20230619191051 extends AbstractMigration
1112
{
@@ -23,6 +24,6 @@ public function up(Schema $schema): void
2324

2425
public function down(Schema $schema): void
2526
{
26-
throw new \LogicException('Wild cats never go back!');
27+
throw new LogicException('Wild cats never go back!');
2728
}
2829
}

public/index.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
use App\Kernel;
46

5-
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
7+
require_once dirname(__DIR__) . '/vendor/autoload_runtime.php';
68

7-
return static function (array $context) {
8-
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
9-
};
9+
return static fn (array $context) => new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);

rector.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@
2727
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
2828
]);
2929
$config->phpVersion(PhpVersion::PHP_82);
30-
$config->paths([__DIR__ . '/src', __DIR__ . '/tests']);
30+
$config->paths([__DIR__ . '/']);
31+
$config->skip([
32+
__DIR__ . '/.github',
33+
__DIR__ . '/.phpunit.result.cache',
34+
__DIR__ . '/config',
35+
__DIR__ . '/var',
36+
__DIR__ . '/vendor',
37+
]);
3138
$config->parallel();
3239
$config->importNames();
3340
$config->importShortClasses();

src/Entity/User.php

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public function setUsername(string $username): void
5858

5959
public function eraseCredentials(): void
6060
{
61+
//Not needed in this case because we don't store plain-text passwords
6162
}
6263

6364
public function getDisplayName(): string

test.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
require_once __DIR__ . '/vendor/autoload_runtime.php';
1111

1212
use App\Kernel;
13+
use App\Repository\PublicKeyCredentialSourceRepository;
1314
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
1415
use Symfony\Component\Console\Output\StreamOutput;
1516
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
@@ -19,9 +20,9 @@
1920
$k = new class('dev', true) extends Kernel implements CompilerPassInterface {
2021
use MicroKernelTrait;
2122

22-
public function process(ContainerBuilder $container)
23+
public function process(ContainerBuilder $container): void
2324
{
24-
$container->getAlias('logger')
25+
$container->getDefinition(PublicKeyCredentialSourceRepository::class)
2526
->setPublic(true);
2627
$container->getDefinition('monolog.handler.console')
2728
->setPublic(true);
@@ -33,8 +34,9 @@ public function process(ContainerBuilder $container)
3334
$c->get('monolog.handler.console')
3435
->setOutput(new StreamOutput(fopen('php://stdout', 'w'), StreamOutput::VERBOSITY_VERY_VERBOSE));
3536

36-
$logger = $c->get('logger');
37-
$em = $c->get('doctrine.orm.entity_manager');
38-
3937
// Start of playground
38+
$pksRepository = $c->get(PublicKeyCredentialSourceRepository::class);
39+
$pks = $pksRepository->findAll();
40+
41+
dump($pks);
4042
};

0 commit comments

Comments
 (0)