Passed
Push — master ( c594c9...afa093 )
by Jan
04:36
created
tests/Entity/LogSystem/AbstractLogEntryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
     public function targetTypeDataProvider(): array
60 60
     {
61 61
         return [
62
-            [1,  User::class],
62
+            [1, User::class],
63 63
             [2, Attachment::class],
64 64
             [3, AttachmentType::class],
65 65
             [4, Category::class],
Please login to merge, or discard this patch.
src/Security/Voter/LogEntryVoter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
                     return true;
50 50
                 }
51 51
 
52
-                return $this->resolver->inherit($user, 'system','show_logs') ?? false;
52
+                return $this->resolver->inherit($user, 'system', 'show_logs') ?? false;
53 53
             }
54 54
         }
55 55
 
Please login to merge, or discard this patch.
src/DataTables/LogDataTable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     {
59 59
         $dataTable->add('symbol', TextColumn::class, [
60 60
             'label' => '',
61
-            'render' => function ($value, AbstractLogEntry $context) {
61
+            'render' => function($value, AbstractLogEntry $context) {
62 62
                 switch ($context->getLevelString()) {
63 63
                     case LogLevel::DEBUG:
64 64
                         $symbol = 'fa-bug';
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
         $dataTable->add('type', TextColumn::class, [
107 107
             'label' => $this->translator->trans('log.type'),
108 108
             'propertyPath' => 'type',
109
-            'render' => function (string $value, AbstractLogEntry $context) {
110
-                return $this->translator->trans('log.type.' . $value);
109
+            'render' => function(string $value, AbstractLogEntry $context) {
110
+                return $this->translator->trans('log.type.'.$value);
111 111
             }
112 112
 
113 113
         ]);
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         $dataTable->add('level', TextColumn::class, [
116 116
             'label' => $this->translator->trans('log.level'),
117 117
             'propertyPath' => 'levelString',
118
-            'render' => function (string $value, AbstractLogEntry $context) {
118
+            'render' => function(string $value, AbstractLogEntry $context) {
119 119
                 return $value;
120 120
             }
121 121
         ]);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
         $dataTable->add('user', TextColumn::class, [
125 125
             'label' => $this->translator->trans('log.user'),
126
-            'render' => function ($value, AbstractLogEntry $context) {
126
+            'render' => function($value, AbstractLogEntry $context) {
127 127
                 $user = $context->getUser();
128 128
                 return sprintf(
129 129
                     '<a href="%s">%s</a>',
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $dataTable->add('target_type', TextColumn::class, [
139 139
             'label' => $this->translator->trans('log.target_type'),
140 140
             'visible' => false,
141
-            'render' => function ($value, AbstractLogEntry $context) {
141
+            'render' => function($value, AbstractLogEntry $context) {
142 142
                 $class = $context->getTargetClass();
143 143
                 if ($class !== null) {
144 144
                     return $this->elementTypeNameGenerator->getLocalizedTypeLabel($class);
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
         $dataTable->createAdapter(ORMAdapter::class, [
161 161
             'entity' => AbstractLogEntry::class,
162
-            'query' => function (QueryBuilder $builder): void {
162
+            'query' => function(QueryBuilder $builder): void {
163 163
                 $this->getQuery($builder);
164 164
             },
165 165
         ]);
Please login to merge, or discard this patch.
src/Services/LogSystem/LogEntryExtraFormatter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
                 $this->translator->trans($context->isWithdrawal() ? 'log.instock_changed.withdrawal' : 'log.instock_changed.added'),
124 124
                 $context->getOldInstock(),
125 125
                 $context->getNewInstock(),
126
-                (!$context->isWithdrawal() ? '+' : '-') . $context->getDifference(true),
126
+                (!$context->isWithdrawal() ? '+' : '-').$context->getDifference(true),
127 127
                 $this->translator->trans('log.instock_changed.comment'),
128 128
                 htmlspecialchars($context->getComment())
129 129
             );
Please login to merge, or discard this patch.
src/Command/ShowEventLogCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $this
62 62
             ->setDescription('List the last event log entries.')
63
-            ->addOption('count', 'c', InputOption::VALUE_REQUIRED, 'How many log entries should be shown per page.', 50 )
64
-            ->addOption('oldest_first', null, InputOption::VALUE_NONE,'Show older entries first.')
63
+            ->addOption('count', 'c', InputOption::VALUE_REQUIRED, 'How many log entries should be shown per page.', 50)
64
+            ->addOption('oldest_first', null, InputOption::VALUE_NONE, 'Show older entries first.')
65 65
             ->addOption('page', 'p', InputOption::VALUE_REQUIRED, 'Which page should be shown?', 1)
66 66
             ->addOption('onePage', null, InputOption::VALUE_NONE, 'Show only one page (dont ask to go to next).')
67 67
             ->addOption('showExtra', 'x', InputOption::VALUE_NONE, 'Show a column with the extra data.');
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
         $target = $this->repo->getTargetElement($entry);
133 133
         $target_name = "";
134 134
         if ($target instanceof NamedDBElement) {
135
-            $target_name = $target->getName() . ' <info>(' . $target->getID() . ')</info>';
135
+            $target_name = $target->getName().' <info>('.$target->getID().')</info>';
136 136
         } elseif ($entry->getTargetID()) {
137
-            $target_name = '<info>(' . $entry->getTargetID() . ')</info>';
137
+            $target_name = '<info>('.$entry->getTargetID().')</info>';
138 138
         }
139 139
 
140 140
         $target_class = "";
Please login to merge, or discard this patch.
src/DataTables/PartsDataTable.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $dataTable
83 83
             ->add('picture', TextColumn::class, [
84 84
                 'label' => '',
85
-                'render' => function ($value, Part $context) {
85
+                'render' => function($value, Part $context) {
86 86
                     $preview_attachment = $this->previewGenerator->getTablePreviewAttachment($context);
87 87
                     if (null === $preview_attachment) {
88 88
                         return '';
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             ])
100 100
             ->add('name', TextColumn::class, [
101 101
                 'label' => $this->translator->trans('part.table.name'),
102
-                'render' => function ($value, Part $context) {
102
+                'render' => function($value, Part $context) {
103 103
                     return sprintf(
104 104
                         '<a href="%s">%s</a>',
105 105
                         $this->urlGenerator->infoURL($context),
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             ])
129 129
             ->add('storelocation', TextColumn::class, [
130 130
                 'label' => $this->translator->trans('part.table.storeLocations'),
131
-                'render' => function ($value, Part $context) {
131
+                'render' => function($value, Part $context) {
132 132
                     $tmp = [];
133 133
                     foreach ($context->getPartLots() as $lot) {
134 134
                         //Ignore lots without storelocation
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
             ])
148 148
             ->add('amount', TextColumn::class, [
149 149
                 'label' => $this->translator->trans('part.table.amount'),
150
-                'render' => function ($value, Part $context) {
150
+                'render' => function($value, Part $context) {
151 151
                     $amount = $context->getAmountSum();
152 152
 
153 153
                     return $this->amountFormatter->format($amount, $context->getPartUnit());
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             ->add('minamount', TextColumn::class, [
157 157
                 'label' => $this->translator->trans('part.table.minamount'),
158 158
                 'visible' => false,
159
-                'render' => function ($value, Part $context) {
159
+                'render' => function($value, Part $context) {
160 160
                     return $this->amountFormatter->format($value, $context->getPartUnit());
161 161
                 },
162 162
             ])
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
             $dataTable->createAdapter(ORMAdapter::class, [
237 237
                 'entity' => Part::class,
238
-                'query' => function (QueryBuilder $builder): void {
238
+                'query' => function(QueryBuilder $builder): void {
239 239
                     $this->getQuery($builder);
240 240
                 },
241 241
             ]);
Please login to merge, or discard this patch.