Skip to content

Commit

Permalink
Merge pull request #15 from ConductionNL/analysis-PxG2YW
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
rubenvdlinde authored Jan 14, 2020
2 parents 11bf484 + 1a49a31 commit ac94636
Show file tree
Hide file tree
Showing 13 changed files with 98 additions and 89 deletions.
30 changes: 15 additions & 15 deletions api/config/bundles.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?php

return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Conduction\CommonGroundBundle\CommonGroundBundle::class => ['all' => true],
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Conduction\CommonGroundBundle\CommonGroundBundle::class => ['all' => true],
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['all' => true],
Tbbc\MoneyBundle\TbbcMoneyBundle::class => ['all' => true],
Knp\Bundle\MarkdownBundle\KnpMarkdownBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['all' => true],
Tbbc\MoneyBundle\TbbcMoneyBundle::class => ['all' => true],
Knp\Bundle\MarkdownBundle\KnpMarkdownBundle::class => ['all' => true],
];
6 changes: 3 additions & 3 deletions api/src/Command/ApiHelmCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
} else {
// outputs multiple lines to the console (adding "\n" at the end of each line)
$output->writeln([
'Helm Chart Creator',
'============',
$chart,
'Helm Chart Creator',
'============',
$chart,
]);
}
}
Expand Down
8 changes: 4 additions & 4 deletions api/src/Command/PubliccodeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
$publiccode = $this->twig->render('publiccode/publiccode.yaml.twig');

if (!empty($location = $input->getOption('location')) && \is_string($location)) {
file_put_contents($location.'/publiccode.yaml', $publiccode);
file_put_contents($location.'/publiccode.yaml', $publiccode);
$io->success(sprintf('Data written to %s/publiccode.yaml (specification version %s).', $location, $version));
} else {
// outputs multiple lines to the console (adding "\n" at the end of each line)
$output->writeln([
'Publiccode Chart',
'============',
$chart,
'Publiccode Chart',
'============',
$chart,
]);
}
}
Expand Down
15 changes: 10 additions & 5 deletions api/src/Entity/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Entity;

use ApiPlatform\Core\Annotation\ApiFilter;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use DateTime;
Expand All @@ -14,8 +13,8 @@
use Gedmo\Mapping\Annotation as Gedmo;
use Ramsey\Uuid\UuidInterface;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Serializer\Annotation\MaxDepth;
use Symfony\Component\Validator\Constraints as Assert;

/**
* An entity representing an invoice.
Expand All @@ -39,6 +38,7 @@ class Invoice
{
/**
* @var UuidInterface The UUID identifier of this object
*
* @example e2984465-190a-4562-829e-a8cca81aa35d
*
*
Expand Down Expand Up @@ -78,6 +78,7 @@ class Invoice

/**
* @var string The human readable reference for this request, build as {gemeentecode}-{year}-{referenceId}. Where gemeentecode is a four digit number for gemeenten and a four letter abriviation for other organizations
*
* @example 6666-2019-0000000012
*
* @Groups({"read"})
Expand All @@ -101,6 +102,7 @@ class Invoice

/**
* @var string The RSIN of the organization that ownes this proces
*
* @example 002851234
*
* @Assert\NotNull
Expand All @@ -124,6 +126,7 @@ class Invoice

/**
* @var string The price of this product
*
* @example 50.00
*
* @Groups({"read","write"})
Expand All @@ -134,6 +137,7 @@ class Invoice

/**
* @var string The currency of this product in an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format
*
* @example EUR
*
* @Assert\Currency
Expand All @@ -143,6 +147,7 @@ class Invoice
private $priceCurrency;
/**
* @var string The total tax over the invoice
*
* @example 21.00
*
* @Groups({"read","write"})
Expand All @@ -152,6 +157,7 @@ class Invoice

/**
* @var DateTime The moment this request was created by the submitter
*
* @example 20190101
*
* @Groups({"read"})
Expand All @@ -162,6 +168,7 @@ class Invoice

/**
* @var string The order of this invoice
*
* @example https://www.example.org/order/1
*
* @Assert\Length(
Expand Down Expand Up @@ -345,7 +352,7 @@ public function getOrder(): ?string

public function setOrder(?string $order): self
{
$this->order = $order ;
$this->order = $order;

return $this;
}
Expand Down Expand Up @@ -380,6 +387,4 @@ public function removePayment(Payment $payment): self

return $this;
}


}
11 changes: 8 additions & 3 deletions api/src/Entity/InvoiceItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

namespace App\Entity;

use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use DateTime;
use Ramsey\Uuid\UuidInterface;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Ramsey\Uuid\UuidInterface;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Serializer\Annotation\MaxDepth;
use Symfony\Component\Validator\Constraints as Assert;

/**
* An entity representing an item of an invoice.
Expand All @@ -33,6 +32,7 @@ class InvoiceItem
{
/**
* @var UuidInterface
*
* @example e2984465-190a-4562-829e-a8cca81aa35d
*
* @Assert\Uuid
Expand Down Expand Up @@ -79,6 +79,7 @@ class InvoiceItem

/**
* @var string The offer this item represents
*
* @example http://example.org/offers/1
*
* @ORM\Column(type="string", length=255)
Expand All @@ -105,6 +106,7 @@ class InvoiceItem

/**
* @var int The quantity of the items that are ordered
*
* @example 1
*
* @Groups({"read","write"})
Expand All @@ -116,6 +118,7 @@ class InvoiceItem

/**
* @var string The price of this product
*
* @example 50.00
*
* @Groups({"read","write"})
Expand All @@ -126,6 +129,7 @@ class InvoiceItem

/**
* @var string The currency of this product in an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format
*
* @example EUR
*
* @Assert\Currency
Expand All @@ -136,6 +140,7 @@ class InvoiceItem

/**
* @var int The tax percentage for this offer as an integer e.g. 9% makes 9
*
* @example 9
*
* @Assert\NotBlank
Expand Down
9 changes: 5 additions & 4 deletions api/src/Entity/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

namespace App\Entity;

use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\UuidInterface;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Serializer\Annotation\MaxDepth;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Annotation\MaxDepth;
use Symfony\Component\Validator\Constraints as Assert;

/**
Expand All @@ -17,7 +15,6 @@
* This entity represents a payment of an invoice.
*
* @author Barry Brands <[email protected]>
*
* @license EUPL <https://github.com/ConductionNL/betaalservice/blob/master/LICENSE.md>
*
* @category entity
Expand All @@ -32,6 +29,7 @@ class Payment
{
/**
* @var UuidInterface
*
* @example e2984465-190a-4562-829e-a8cca81aa35d
*
* @Assert\Uuid
Expand All @@ -45,6 +43,7 @@ class Payment

/**
* @var string The provider that handles the payment
*
* @example iDeal
*
* @Assert\NotNull
Expand All @@ -58,6 +57,7 @@ class Payment

/**
* @var string The payment id of this payment
*
* @example 87782426a21cbd70fc9823cbe1e024fb25804c833743b41529a23ae94b3b1cc2
*
* @Assert\NotNull
Expand All @@ -71,6 +71,7 @@ class Payment

/**
* @var string The status of this payment
*
* @example open
*
* @Assert\NotNull
Expand Down
16 changes: 8 additions & 8 deletions api/src/Filter/LikeFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ public function getDescription(string $resourceClass): array
$description = [];
foreach ($this->properties as $property => $strategy) {
$description["like_$property"] = [
'property' => $property,
'type' => 'string',
'required' => false,
'swagger' => [
'description' => 'This filter narows your result using the * and _ wildcards, where * is assumed to be one or more characters and _ is assumed to be a single character',
'name' => $property,
'type' => 'string',
],
'property' => $property,
'type' => 'string',
'required' => false,
'swagger' => [
'description' => 'This filter narows your result using the * and _ wildcards, where * is assumed to be one or more characters and _ is assumed to be a single character',
'name' => $property,
'type' => 'string',
],
];
}

Expand Down
16 changes: 8 additions & 8 deletions api/src/Filter/RegexpFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ public function getDescription(string $resourceClass): array
$description = [];
foreach ($this->properties as $property => $strategy) {
$description["regexp_$property"] = [
'property' => $property,
'type' => 'string',
'required' => false,
'swagger' => [
'description' => 'Filter for an exact match using a [Regular expression](https://en.wikipedia.org/wiki/Regular_expression).',
'name' => $property,
'type' => 'string',
],
'property' => $property,
'type' => 'string',
'required' => false,
'swagger' => [
'description' => 'Filter for an exact match using a [Regular expression](https://en.wikipedia.org/wiki/Regular_expression).',
'name' => $property,
'type' => 'string',
],
];
}

Expand Down
9 changes: 4 additions & 5 deletions api/src/Repository/NLXRequestLogRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Common\Persistence\ManagerRegistry;


/**
* @method NLXRequestLog|null find($id, $lockMode = null, $lockVersion = null)
* @method NLXRequestLog|null findOneBy(array $criteria, array $orderBy = null)
Expand All @@ -15,10 +14,10 @@
*/
class NLXRequestLogRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, ExampleEntity::class);
}
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, ExampleEntity::class);
}

/**
* @return NLXRequestLog[] Returns an array of NLXRequestLog objects
Expand Down
Loading

0 comments on commit ac94636

Please sign in to comment.