Passed
Pull Request — master (#78)
by
unknown
09:17 queued 04:28
created
src/DataTables/PartsDataTable.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         $optionsResolver->setAllowedTypes('search', ['null', 'string']);
122 122
 
123 123
         //Configure search options
124
-        $optionsResolver->setDefault('search_options', static function (OptionsResolver $resolver): void {
124
+        $optionsResolver->setDefault('search_options', static function(OptionsResolver $resolver): void {
125 125
             $resolver->setDefaults([
126 126
                 'name' => true,
127 127
                 'category' => true,
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         $dataTable
158 158
             ->add('picture', TextColumn::class, [
159 159
                 'label' => '',
160
-                'render' => function ($value, Part $context) {
160
+                'render' => function($value, Part $context) {
161 161
                     $preview_attachment = $this->previewGenerator->getTablePreviewAttachment($context);
162 162
                     if (null === $preview_attachment) {
163 163
                         return '';
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             ])
181 181
             ->add('name', TextColumn::class, [
182 182
                 'label' => $this->translator->trans('part.table.name'),
183
-                'render' => function ($value, Part $context) {
183
+                'render' => function($value, Part $context) {
184 184
                     return sprintf(
185 185
                         '<a href="%s">%s</a>',
186 186
                         $this->urlGenerator->infoURL($context),
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             ])
210 210
             ->add('storelocation', TextColumn::class, [
211 211
                 'label' => $this->translator->trans('part.table.storeLocations'),
212
-                'render' => function ($value, Part $context) {
212
+                'render' => function($value, Part $context) {
213 213
                     $tmp = [];
214 214
                     foreach ($context->getPartLots() as $lot) {
215 215
                         //Ignore lots without storelocation
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             ])
229 229
             ->add('amount', TextColumn::class, [
230 230
                 'label' => $this->translator->trans('part.table.amount'),
231
-                'render' => function ($value, Part $context) {
231
+                'render' => function($value, Part $context) {
232 232
                     $amount = $context->getAmountSum();
233 233
 
234 234
                     return $this->amountFormatter->format($amount, $context->getPartUnit());
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
             ->add('minamount', TextColumn::class, [
238 238
                 'label' => $this->translator->trans('part.table.minamount'),
239 239
                 'visible' => isset($options["lowstock"]),
240
-                'render' => function ($value, Part $context) {
240
+                'render' => function($value, Part $context) {
241 241
                     return $this->amountFormatter->format($value, $context->getPartUnit());
242 242
                 },
243 243
             ])
@@ -300,10 +300,10 @@  discard block
 block discarded – undo
300 300
             ->add('edit', IconLinkColumn::class, [
301 301
                 'label' => $this->translator->trans('part.table.edit'),
302 302
                 'visible' => false,
303
-                'href' => function ($value, Part $context) {
303
+                'href' => function($value, Part $context) {
304 304
                     return $this->urlGenerator->editURL($context);
305 305
                 },
306
-                'disabled' => function ($value, Part $context) {
306
+                'disabled' => function($value, Part $context) {
307 307
                     return !$this->security->isGranted('edit', $context);
308 308
                 },
309 309
                 'title' => $this->translator->trans('part.table.edit.title'),
@@ -312,12 +312,12 @@  discard block
 block discarded – undo
312 312
             ->addOrderBy('name')
313 313
             ->createAdapter(FetchJoinORMAdapter::class, [
314 314
                 'simple_total_query' => true,
315
-                'query' => function (QueryBuilder $builder): void {
315
+                'query' => function(QueryBuilder $builder): void {
316 316
                     $this->getQuery($builder);
317 317
                 },
318 318
                 'entity' => Part::class,
319 319
                 'criteria' => [
320
-                    function (QueryBuilder $builder) use ($options): void {
320
+                    function(QueryBuilder $builder) use ($options): void {
321 321
                         $this->buildCriteria($builder, $options);
322 322
                     },
323 323
                     new SearchCriteriaProvider(),
Please login to merge, or discard this patch.
src/Repository/PartRepository.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -88,13 +88,13 @@
 block discarded – undo
88 88
     }
89 89
 
90 90
    /**
91
-     * Gets the number of parts that are low in stock.
92
-     *
93
-     * That is, it's total amount is smaller than the minimal amount.
94
-     *
95
-     * @throws \Doctrine\ORM\NoResultException
96
-     * @throws \Doctrine\ORM\NonUniqueResultException
97
-     */
91
+    * Gets the number of parts that are low in stock.
92
+    *
93
+    * That is, it's total amount is smaller than the minimal amount.
94
+    *
95
+    * @throws \Doctrine\ORM\NoResultException
96
+    * @throws \Doctrine\ORM\NonUniqueResultException
97
+    */
98 98
     public function getPartCountWithLowStock(): int
99 99
     {
100 100
         $in = $this->getEntityManager()->createQueryBuilder();
Please login to merge, or discard this patch.