Completed
Push — master ( e2b643...b7b7bf )
by Jan
05:32 queued 01:35
created
src/Entity/UserSystem/PermissionsEmbed.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      */
274 274
     public function getBitValue(string $permission_name, int $bit_n): int
275 275
     {
276
-        if(!$this->isValidPermissionName($permission_name)) {
276
+        if (!$this->isValidPermissionName($permission_name)) {
277 277
             throw new \InvalidArgumentException('No permission with the given name is existing!');
278 278
         }
279 279
 
@@ -317,9 +317,9 @@  discard block
 block discarded – undo
317 317
     public function setPermissionValue(string $permission_name, int $bit_n, ?bool $new_value) : self
318 318
     {
319 319
         //Determine which bit value the given value is.
320
-        if($new_value === true) {
320
+        if ($new_value === true) {
321 321
             $bit_value = static::ALLOW;
322
-        } elseif($new_value === false) {
322
+        } elseif ($new_value === false) {
323 323
             $bit_value = static::DISALLOW;
324 324
         } else {
325 325
             $bit_value = static::INHERIT;
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
      */
340 340
     public function setBitValue(string $permission_name, int $bit_n, int $new_value) : self
341 341
     {
342
-        if(!$this->isValidPermissionName($permission_name)) {
342
+        if (!$this->isValidPermissionName($permission_name)) {
343 343
             throw new \InvalidArgumentException('No permission with the given name is existing!');
344 344
         }
345 345
 
Please login to merge, or discard this patch.
src/Form/AdminPages/ImportType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,16 +62,16 @@
 block discarded – undo
62 62
         //Disable import if user is not allowed to create elements.
63 63
         $entity = new $data['entity_class'];
64 64
         $perm_name = "create";
65
-        $disabled = ! $this->security->isGranted($perm_name, $entity);
65
+        $disabled = !$this->security->isGranted($perm_name, $entity);
66 66
 
67 67
         $builder
68 68
 
69 69
             ->add('format', ChoiceType::class, ['choices' =>
70
-                ['JSON' => 'json', 'XML' => 'xml','CSV'=>'csv' ,'YAML' => 'yaml'], 'label' => 'export.format',
70
+                ['JSON' => 'json', 'XML' => 'xml', 'CSV'=>'csv', 'YAML' => 'yaml'], 'label' => 'export.format',
71 71
                 'disabled' => $disabled])
72 72
             ->add('csv_separator', TextType::class, ['data' => ';', 'label' => 'import.csv_separator',
73 73
                 'disabled' => $disabled]);
74
-            if($entity instanceof StructuralDBElement) {
74
+            if ($entity instanceof StructuralDBElement) {
75 75
                 $builder->
76 76
                 add('parent', EntityType::class, ['class' => $data['entity_class'], 'choice_label' => 'full_path',
77 77
                     'attr' => ['class' => 'selectpicker', 'data-live-search' => true], 'required' => false,
Please login to merge, or discard this patch.
src/Form/AdminPages/MassCreationForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         //Disable import if user is not allowed to create elements.
62 62
         $entity = new $data['entity_class']();
63 63
         $perm_name = "create";
64
-        $disabled = ! $this->security->isGranted($perm_name, $entity);
64
+        $disabled = !$this->security->isGranted($perm_name, $entity);
65 65
 
66 66
         $builder
67 67
             ->add('lines', TextareaType::class, ['data' => '', 'label' => 'mass_creation.lines',
Please login to merge, or discard this patch.
src/Command/UpdateExchangeRatesCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             return;
56 56
         }
57 57
 
58
-        $io->note('Update currency exchange rates with base currency: ' . $this->base_current);
58
+        $io->note('Update currency exchange rates with base currency: '.$this->base_current);
59 59
 
60 60
         $service = $input->getOption('service');
61 61
         $api_key = $input->getOption('api_key');
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         //Iterate over each candidate and update exchange rate
82 82
         foreach ($candidates as $currency) {
83 83
             try {
84
-                $rate = $swap->latest($currency->getIsoCode() . '/' . $this->base_current);
84
+                $rate = $swap->latest($currency->getIsoCode().'/'.$this->base_current);
85 85
                 $currency->setExchangeRate($rate->getValue());
86 86
                 $io->note(sprintf('Set exchange rate of %s to %f', $currency->getIsoCode(), $currency->getExchangeRate()));
87 87
                 $this->em->persist($currency);
Please login to merge, or discard this patch.
src/Form/AdminPages/BaseEntityAdminForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 
77 77
             ->add('not_selectable', CheckboxType::class, ['required' => false,
78 78
                 'label' => 'not_selectable.label', 'help' => 'not_selectable.help', 'label_attr'=> ['class' => 'checkbox-custom'],
79
-                'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity) ])
79
+                'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity)])
80 80
 
81 81
             ->add('comment', CKEditorType::class, ['required' => false, 'empty_data' => '',
82 82
                 'label' => 'comment.label', 'attr' => ['rows' => 4], 'help' => 'bbcode.hint',
Please login to merge, or discard this patch.
src/Form/AdminPages/SupplierForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
             'required' => false, 'label' => 'supplier.default_currency.label', 'disable_not_selectable' => true,
94 94
         'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity), ]);
95 95
 
96
-        $builder->add('shipping_costs', MoneyType::class, [ 'required' => false,
96
+        $builder->add('shipping_costs', MoneyType::class, ['required' => false,
97 97
             'currency' => $this->params->get('default_currency'), 'scale' => 3,
98 98
             'label' => 'supplier.shipping_costs.label',
99 99
             'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity)
Please login to merge, or discard this patch.
src/Entity/Parts/Part.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@
 block discarded – undo
282 282
      */
283 283
     public function getIDString(): string
284 284
     {
285
-        return 'P' . sprintf('%06d', $this->getID());
285
+        return 'P'.sprintf('%06d', $this->getID());
286 286
     }
287 287
 
288 288
     /*********************************************************************************
Please login to merge, or discard this patch.
src/Services/SIFormatter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function getPrefixByMagnitude(int $magnitude) : array
57 57
     {
58
-        $prefixes_pos = ['' ,'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];
59
-        $prefixes_neg = ['' ,'m', 'μ', 'n', 'p', 'f', 'a', 'z', 'y'];
58
+        $prefixes_pos = ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'];
59
+        $prefixes_neg = ['', 'm', 'μ', 'n', 'p', 'f', 'a', 'z', 'y'];
60 60
 
61 61
         //Determine nearest prefix index.
62 62
         $nearest = (int) round(abs($magnitude) / 3);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         [$divisor, $symbol] = $this->getPrefixByMagnitude($this->getMagnitude($value));
86 86
         $value /= $divisor;
87 87
         //Build the format string, e.g.: %.2d km
88
-        $format_string = '%.' . $decimals . 'f ' . $symbol . $unit;
88
+        $format_string = '%.'.$decimals.'f '.$symbol.$unit;
89 89
 
90 90
         return sprintf($format_string, $value);
91 91
     }
Please login to merge, or discard this patch.
src/Entity/Parts/PartLot.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     public function getIDString(): string
117 117
     {
118
-        return 'PL' . $this->getID();
118
+        return 'PL'.$this->getID();
119 119
     }
120 120
 
121 121
     /**
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 
269 269
     public function setAmount(float $new_amount): PartLot
270 270
     {
271
-        $this->amount  = $new_amount;
271
+        $this->amount = $new_amount;
272 272
         return $this;
273 273
     }
274 274
 
Please login to merge, or discard this patch.