Skip to content

Instantly share code, notes, and snippets.

View tarlepp's full-sized avatar
πŸ’­
ΓΆrrr

Tarmo LeppΓ€nen tarlepp

πŸ’­
ΓΆrrr
  • Pinja
  • JyvΓ€skylΓ€, Finland
View GitHub Profile
ifndef APPLICATION_CONFIG
# Determine which .env file to use
ifneq ("$(wildcard .env.local)","")
include .env.local
else
include .env
endif
endif
# Define used JWT keys paths and passphrase
https://github.com/tarlepp/symfony-flex-backend/blob/master/config/services.yaml#L28-L30
https://github.com/tarlepp/symfony-flex-backend/blob/master/config/services.yaml#L59-L60
https://github.com/tarlepp/symfony-flex-backend/blob/master/src/Rest/ControllerCollection.php
https://github.com/tarlepp/symfony-flex-backend/blob/master/src/Collection/CollectionTrait.php
public function getSerializeContext(Request $request, ?RestResourceInterface $restResource = null): array
{
/**
* Specify used populate settings
*
* @var array<int, string>
*/
$populate = (array)$request->get('populate', []);
$groups = array_merge(['default', $populate]);
<?php
declare(strict_types = 1);
namespace App\ArgumentResolver;
use App\DTO\RestDtoInterface;
use App\Rest\Controller;
use App\Rest\ControllerCollection;
use AutoMapperPlus\AutoMapperInterface;
use AutoMapperPlus\Exception\UnregisteredMappingException;
<?php
declare(strict_types = 1);
/**
* /src/EventSubscriber/ExceptionSubscriber.php
*
* @author TLe, Tarmo LeppΓ€nen <[email protected]>
*/
namespace App\EventSubscriber;
<?php
declare(strict_types = 1);
/**
* /src/EventSubscriber/BodySubscriber.php
*
* @author TLe, Tarmo LeppΓ€nen <[email protected]>
*/
namespace App\EventSubscriber;
<?php
declare(strict_types = 1);
/**
* /src/EventSubscriber/ExceptionSubscriber.php
*
* @author TLe, Tarmo LeppΓ€nen <[email protected]>
*/
namespace App\EventSubscriber;
<?php
declare(strict_types = 1);
/**
* /src/Controller/ApiKeyController.php
*
* @author TLe, Tarmo LeppΓ€nen <[email protected]>
*/
namespace App\Controller;
<?php
declare(strict_types = 1);
namespace App\ArgumentResolver;
use App\DTO\Account\RegistrationDto;
use Generator;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface;
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
root@d3fbc9afa338:/app# make psalm
Running Psalm - A static analysis tool for PHP
Psalm 3.4.12@86e5e50c1bb492045e70f2ebe1da3cad06e4e9b2
Scanning files...
Analyzing files...
β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 60 / 241 (25%)
β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 120 / 241 (50%)
β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 180 / 241 (75%)
β–‘β–‘β–‘β–‘β–‘Eβ–‘β–‘Eβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘EEβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 240 / 241 (100%)