mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 18:58:46 +02:00
Fixed some more inspection issues
This commit is contained in:
parent
de96aae9a5
commit
29d1d49aca
83 changed files with 153 additions and 172 deletions
|
@ -45,7 +45,9 @@ class LocaleDateTimeColumn extends AbstractColumn
|
|||
{
|
||||
if (null === $value) {
|
||||
return $this->options['nullValue'];
|
||||
} elseif (!$value instanceof DateTimeInterface) {
|
||||
}
|
||||
|
||||
if (!$value instanceof DateTimeInterface) {
|
||||
$value = new DateTime((string) $value);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ trait FilterTrait
|
|||
protected function generateParameterIdentifier(string $property): string
|
||||
{
|
||||
//Replace all special characters with underscores
|
||||
$property = preg_replace('/[^a-zA-Z0-9_]/', '_', $property);
|
||||
$property = preg_replace('/\W/', '_', $property);
|
||||
//Add a random number to the end of the property name for uniqueness
|
||||
return $property . '_' . uniqid("", false);
|
||||
}
|
||||
|
|
|
@ -63,27 +63,19 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
|||
final class PartsDataTable implements DataTableTypeInterface
|
||||
{
|
||||
private TranslatorInterface $translator;
|
||||
private NodesListBuilder $treeBuilder;
|
||||
private AmountFormatter $amountFormatter;
|
||||
private AttachmentURLGenerator $attachmentURLGenerator;
|
||||
private Security $security;
|
||||
|
||||
private PartDataTableHelper $partDataTableHelper;
|
||||
|
||||
/**
|
||||
* @var EntityURLGenerator
|
||||
*/
|
||||
private $urlGenerator;
|
||||
private EntityURLGenerator $urlGenerator;
|
||||
|
||||
public function __construct(EntityURLGenerator $urlGenerator, TranslatorInterface $translator,
|
||||
NodesListBuilder $treeBuilder, AmountFormatter $amountFormatter,PartDataTableHelper $partDataTableHelper,
|
||||
AttachmentURLGenerator $attachmentURLGenerator, Security $security)
|
||||
AmountFormatter $amountFormatter,PartDataTableHelper $partDataTableHelper, Security $security)
|
||||
{
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->translator = $translator;
|
||||
$this->treeBuilder = $treeBuilder;
|
||||
$this->amountFormatter = $amountFormatter;
|
||||
$this->attachmentURLGenerator = $attachmentURLGenerator;
|
||||
$this->security = $security;
|
||||
$this->partDataTableHelper = $partDataTableHelper;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue