Passed
Push — master ( 659634...2317dd )
by Jan
08:05 queued 03:13
created
src/Form/TFA/TFAGoogleSettingsType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
     public function buildForm(FormBuilderInterface $builder, array $options): void
41 41
     {
42
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, static function (FormEvent $event): void {
42
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, static function(FormEvent $event): void {
43 43
             $form = $event->getForm();
44 44
             /** @var User $user */
45 45
             $user = $event->getData();
Please login to merge, or discard this patch.
src/Command/UserChangePasswordCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,12 +63,12 @@
 block discarded – undo
63 63
         ]);
64 64
 
65 65
         if (null === $user) {
66
-            $io->error('No user found with username '.$username);
66
+            $io->error('No user found with username ' . $username);
67 67
 
68 68
             return self::FAILURE;
69 69
         }
70 70
 
71
-        $io->confirm('You are about to change the password of following user: '.$username.' Continue?');
71
+        $io->confirm('You are about to change the password of following user: ' . $username . ' Continue?');
72 72
 
73 73
         $password = $input->getOption('password');
74 74
 
Please login to merge, or discard this patch.
src/Command/UserDisable2faCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
             return self::FAILURE;
66 66
         }
67 67
 
68
-        $io->warning('You are about to remove all Two-Factor-Authentication methods of following user: '.$user->getUsername());
68
+        $io->warning('You are about to remove all Two-Factor-Authentication methods of following user: ' . $user->getUsername());
69 69
         $io->warning('Only continue if you are sure about the identity of the person that asked you to do this!');
70 70
 
71 71
         $continue = false;
Please login to merge, or discard this patch.
src/Command/UserNewCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
         $io = new SymfonyStyle($input, $output);
57 57
         $username = $input->getArgument('username');
58 58
 
59
-        $io->confirm('You are about to create a new user with username: '.$username.' Continue?');
59
+        $io->confirm('You are about to create a new user with username: ' . $username . ' Continue?');
60 60
 
61 61
         $user = new User();
62 62
         $user->setUsername($username);
Please login to merge, or discard this patch.
src/Twig/AppExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,6 +40,6 @@
 block discarded – undo
40 40
         $size = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
41 41
         $factor = floor((strlen($bytes) - 1) / 3);
42 42
 
43
-        return sprintf("%.{$precision}f", $bytes / (1024 ** $factor)).@$size[$factor];
43
+        return sprintf("%.{$precision}f", $bytes / (1024 ** $factor)) . @$size[$factor];
44 44
     }
45 45
 }
Please login to merge, or discard this patch.
src/Controller/ExportController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -96,18 +96,18 @@  discard block
 block discarded – undo
96 96
                 //Download as file
97 97
                 if (1 === count($xml_files)) {
98 98
                     $xml_string = array_values($xml_files)[0];
99
-                    $filename = 'export_'.date('Y-m-d_H-i-s').'.xml';
99
+                    $filename = 'export_' . date('Y-m-d_H-i-s') . '.xml';
100 100
                     $response = $this->getDownloadResponse($xml_string, $filename);
101 101
                 } else {
102 102
                     $data = [];
103 103
                     foreach ($xml_files as $key => $content) {
104
-                        $data[$key.'.xml'] = $content;
104
+                        $data[$key . '.xml'] = $content;
105 105
                     }
106 106
 
107 107
                     //Dont return already here... We need to set the exported flags first
108 108
                     $response = ZIPBinaryFileResponseFacade::createZIPResponseFromData(
109 109
                         $data,
110
-                        'export_'.date('Y-m-d_H-i-s').'.zip'
110
+                        'export_' . date('Y-m-d_H-i-s') . '.zip'
111 111
                     );
112 112
                 }
113 113
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 //Show error if auto mode is not possible
123 123
                 $this->addFlash('danger',
124 124
                     $this->translator->trans('sepa_export.error.department_missing_account')
125
-                    .': '.$exception->getWrongDepartment()->getName());
125
+                    .': ' . $exception->getWrongDepartment()->getName());
126 126
             }
127 127
         }
128 128
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $response = new Response();
138 138
         $response->headers->set('Cache-Control', 'private');
139 139
         $response->headers->set('Content-type', $mime_type);
140
-        $response->headers->set('Content-Disposition', 'attachment; filename="'.$filename.'";');
140
+        $response->headers->set('Content-Disposition', 'attachment; filename="' . $filename . '";');
141 141
         $response->headers->set('Content-length', strlen($content));
142 142
         $response->setContent($content);
143 143
 
Please login to merge, or discard this patch.
src/Controller/Admin/DashboardController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
         foreach ($filters as $filter => $value) {
76 76
             if (is_array($value)) {
77 77
                 foreach ($value as $subfilter => $subvalue) {
78
-                    $menuItem->setQueryParameter('filters['.$filter.']['.$subfilter.']', $subvalue);
78
+                    $menuItem->setQueryParameter('filters[' . $filter . '][' . $subfilter . ']', $subvalue);
79 79
                 }
80 80
             } else {
81
-                $menuItem->setQueryParameter('filters['.$filter.']', $value);
81
+                $menuItem->setQueryParameter('filters[' . $filter . ']', $value);
82 82
             }
83 83
         }
84 84
 
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
         $actions = parent::configureActions();
93 93
 
94 94
         $showLog = Action::new('showLog', 'action.show_logs', 'fas fa-binoculars')
95
-            ->displayIf(function (DBElementInterface $entity) {
95
+            ->displayIf(function(DBElementInterface $entity) {
96 96
                 return $this->isGranted('ROLE_VIEW_AUDITS');
97 97
             })
98 98
             ->setCssClass('ml-2 text-dark')
99
-            ->linkToRoute('dh_auditor_show_entity_history', function (DBElementInterface $entity) {
99
+            ->linkToRoute('dh_auditor_show_entity_history', function(DBElementInterface $entity) {
100 100
                 return [
101 101
                     'entity' => str_replace('\\', '-', get_class($entity)),
102 102
                     'id' => $entity->getId(),
@@ -242,8 +242,8 @@  discard block
 block discarded – undo
242 242
         yield MenuItem::linkToCrud('user.labelp', 'fas fa-user', User::class)
243 243
             ->setPermission('ROLE_READ_USER');
244 244
 
245
-        $version = $this->app_version.'-'.$this->gitVersionInfo->getGitCommitHash() ?? '';
246
-        yield MenuItem::section('Version '.$version, 'fas fa-info');
245
+        $version = $this->app_version . '-' . $this->gitVersionInfo->getGitCommitHash() ?? '';
246
+        yield MenuItem::section('Version ' . $version, 'fas fa-info');
247 247
         yield MenuItem::linktoRoute('dashboard.menu.audits', 'fas fa-binoculars', 'dh_auditor_list_audits')
248 248
             ->setPermission('ROLE_VIEW_AUDITS');
249 249
         yield MenuItem::linktoRoute('dashboard.menu.homepage', 'fas fa-home', 'homepage');
@@ -261,8 +261,8 @@  discard block
 block discarded – undo
261 261
             ->addMenuItems([
262 262
                 MenuItem::linktoRoute('user.settings.title', 'fas fa-user-cog', 'user_settings'),
263 263
                 //It is important to use LinkToUrl here. LinkToCrud will put the route name into a param, but does not change the prefix
264
-                MenuItem::linkToUrl(Languages::getName('de', 'de').' (DE)', '', '/de/admin'),
265
-                MenuItem::linkToUrl(Languages::getName('en', 'en').' (EN)', '', '/en/admin'),
264
+                MenuItem::linkToUrl(Languages::getName('de', 'de') . ' (DE)', '', '/de/admin'),
265
+                MenuItem::linkToUrl(Languages::getName('en', 'en') . ' (EN)', '', '/en/admin'),
266 266
             ]);
267 267
     }
268 268
 
Please login to merge, or discard this patch.
src/Controller/Admin/DepartmentCrudController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         ]);
91 91
 
92 92
         $generateTokenAction = Action::new('generateSkipToken', 'department.action.generate_skip_token', 'fas fa-award')
93
-            ->displayIf(function (Department $paymentOrder) {
93
+            ->displayIf(function(Department $paymentOrder) {
94 94
                 return $this->isGranted('ROLE_EDIT_ORGANISATIONS');
95 95
             })
96 96
             ->setCssClass('mr-2 text-dark')
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     {
115 115
         $choices = [];
116 116
         foreach (Department::ALLOWED_TYPES as $type) {
117
-            $choices['department.type.'.$type] = $type;
117
+            $choices['department.type.' . $type] = $type;
118 118
         }
119 119
 
120 120
         return [
Please login to merge, or discard this patch.
src/DataFixtures/PaymentOrderFixture.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
     private function addFiles(PaymentOrder $paymentOrder): void
132 132
     {
133
-        $source_file = realpath(__DIR__.'/../../tests/data/form/upload.pdf');
133
+        $source_file = realpath(__DIR__ . '/../../tests/data/form/upload.pdf');
134 134
         //We have to create a copy of our source, or the file will be deleted when the files are uploaded...
135 135
         $target_file = tempnam(sys_get_temp_dir(), 'stura');
136 136
         copy($source_file, $target_file);
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
         //Do the same thing for References
142 142
 
143
-        $source_file = realpath(__DIR__.'/../../tests/data/form/upload.pdf');
143
+        $source_file = realpath(__DIR__ . '/../../tests/data/form/upload.pdf');
144 144
         //We have to create a copy of our source, or the file will be deleted when the files are uploaded...
145 145
         $target_file = tempnam(sys_get_temp_dir(), 'stura');
146 146
         copy($source_file, $target_file);
Please login to merge, or discard this patch.