Fixed coding style.

This commit is contained in:
Jan Böhmer 2020-04-10 13:05:08 +02:00
parent a5e1f02d27
commit ae75e6844f
41 changed files with 147 additions and 163 deletions

View file

@ -63,8 +63,8 @@ class AmountFormatter
* Formats the given value using the measurement unit and options.
*
* @param float|string|int $value
* @param MeasurementUnit|null $unit The measurement unit, whose unit symbol should be used for formatting.
* If set to null, it is assumed that the part amount is measured in pieces.
* @param MeasurementUnit|null $unit The measurement unit, whose unit symbol should be used for formatting.
* If set to null, it is assumed that the part amount is measured in pieces.
*
* @return string The formatted string
*

View file

@ -130,7 +130,7 @@ class AttachmentURLGenerator
throw new InvalidArgumentException('Thumbnail creation only works for picture attachments!');
}
if ($attachment->isExternal() && !empty($attachment->getURL())) {
if ($attachment->isExternal() && ! empty($attachment->getURL())) {
return $attachment->getURL();
}

View file

@ -43,10 +43,10 @@ declare(strict_types=1);
namespace App\Services\Attachments;
use App\Entity\Attachments\Attachment;
use Psr\Cache\InvalidArgumentException;
use Symfony\Component\Finder\Finder;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Contracts\Cache\CacheInterface;
use Psr\Cache\InvalidArgumentException;
/**
* This service is used to find builtin attachment ressources.

View file

@ -44,7 +44,6 @@ namespace App\Services;
use App\Entity\Attachments\Attachment;
use App\Entity\Attachments\AttachmentType;
use App\Entity\Base\AbstractDBElement;
use App\Entity\Contracts\NamedElementInterface;
use App\Entity\Devices\Device;
use App\Entity\Parameters\AbstractParameter;

View file

@ -79,7 +79,7 @@ class EntityExporter
/**
* Exports an Entity or an array of entities to multiple file formats.
*
* @param Request $request the request that should be used for option resolving
* @param Request $request the request that should be used for option resolving
* @param AbstractNamedDBElement|object[] $entity
*
* @return Response the generated response containing the exported data

View file

@ -94,7 +94,7 @@ class EntityURLGenerator
* @param mixed $entity The element for which the page should be generated
* @param string $type The page type. Currently supported: 'info', 'edit', 'create', 'clone', 'list'/'list_parts'
*
* @return null|string the link to the desired page
* @return string|null the link to the desired page
*
* @throws EntityNotSupportedException thrown if the entity is not supported for the given type
* @throws InvalidArgumentException thrown if the givent type is not existing

View file

@ -49,7 +49,6 @@ use App\Security\Interfaces\HasPermissionsInterface;
use Symfony\Component\Config\ConfigCache;
use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Yaml\Yaml;
class PermissionResolver

View file

@ -176,7 +176,7 @@ class PricedetailHelper
$converted = $this->convertMoneyToCurrency($pricedetail->getPricePerUnit(), $pricedetail->getCurrency(), $currency);
//Ignore price informations that can not be converted to base currency.
if ($converted !== null) {
if (null !== $converted) {
$avg = bcadd($avg, $converted, Pricedetail::PRICE_PRECISION);
++$count;
}