@@ -59,7 +59,7 @@ |
||
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], |
@@ -49,7 +49,7 @@ |
||
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 |
@@ -58,7 +58,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | ]); |
@@ -123,7 +123,7 @@ |
||
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 | ); |
@@ -60,8 +60,8 @@ discard block |
||
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 |
||
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 = ""; |