Completed
Push — master ( 5c19a7...056a25 )
by Jan
04:26
created
src/Services/ElementTypeNameGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -125,8 +125,8 @@
 block discarded – undo
125 125
     {
126 126
         $type = $this->getLocalizedTypeLabel($entity);
127 127
         if ($use_html) {
128
-            return '<i>' . $type . ':</i> ' . $entity->getName();
128
+            return '<i>'.$type.':</i> '.$entity->getName();
129 129
         }
130
-        return $type . ": " . htmlspecialchars($entity->getName());
130
+        return $type.": ".htmlspecialchars($entity->getName());
131 131
     }
132 132
 }
133 133
\ No newline at end of file
Please login to merge, or discard this patch.
src/Command/ConvertBBCodeCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                 ->select('e');
130 130
             //Add fields criteria
131 131
             foreach ($properties as $key => $property) {
132
-                $qb->orWhere('e.' . $property . ' LIKE ?' . $key);
132
+                $qb->orWhere('e.'.$property.' LIKE ?'.$key);
133 133
                 $qb->setParameter($key, static::BBCODE_CRITERIA);
134 134
             }
135 135
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             foreach ($results as $result) {
142 142
                 /** @var NamedDBElement $result */
143 143
                 $io->writeln(
144
-                    'Convert entity: ' . $result->getName() . ' (' . $result->getIDString() . ')',
144
+                    'Convert entity: '.$result->getName().' ('.$result->getIDString().')',
145 145
                     OutputInterface::VERBOSITY_VERBOSE
146 146
                 );
147 147
                 foreach ($properties as $property) {
Please login to merge, or discard this patch.
src/Services/GitVersionInfo.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function getGitBranchName()
51 51
     {
52
-        if (file_exists($this->project_dir . '/.git/HEAD')) {
53
-            $git = file($this->project_dir . '/.git/HEAD');
52
+        if (file_exists($this->project_dir.'/.git/HEAD')) {
53
+            $git = file($this->project_dir.'/.git/HEAD');
54 54
             $head = explode('/', $git[0], 3);
55 55
             return trim($head[2]);
56 56
         }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function getGitCommitHash(int $length = 7)
67 67
     {
68
-        $filename = $this->project_dir . '/.git/refs/remotes/origin/' . $this->getGitBranchName();
68
+        $filename = $this->project_dir.'/.git/refs/remotes/origin/'.$this->getGitBranchName();
69 69
         if (file_exists($filename)) {
70 70
             $head = file($filename);
71 71
             $hash = $head[0];
Please login to merge, or discard this patch.
src/Services/AttachmentHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
         $sz = 'BKMGTP';
166 166
         $factor = (int) floor((strlen($bytes) - 1) / 3);
167
-        return sprintf("%.{$decimals}f", $bytes / 1024 ** $factor) . @$sz[$factor];
167
+        return sprintf("%.{$decimals}f", $bytes / 1024 ** $factor).@$sz[$factor];
168 168
     }
169 169
 
170 170
     /**
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             MeasurementUnitAttachment::class => 'measurement_unit', StorelocationAttachment::class => 'storelocation',
182 182
             SupplierAttachment::class => 'supplier', UserAttachment::class => 'user'];
183 183
 
184
-        $path = $this->pathResolver->getMediaPath() . DIRECTORY_SEPARATOR . $mapping[get_class($attachment)] . DIRECTORY_SEPARATOR . $attachment->getElement()->getID();
184
+        $path = $this->pathResolver->getMediaPath().DIRECTORY_SEPARATOR.$mapping[get_class($attachment)].DIRECTORY_SEPARATOR.$attachment->getElement()->getID();
185 185
         return $path;
186 186
     }
187 187
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 
205 205
         //Sanatize filename
206 206
         $safeName = transliterator_transliterate('Any-Latin; Latin-ASCII; [^A-Za-z0-9_] remove; Lower()', $attachment->getName());
207
-        $newFilename = $safeName . '-' . uniqid('', false) . '.' . $file->getClientOriginalExtension();
207
+        $newFilename = $safeName.'-'.uniqid('', false).'.'.$file->getClientOriginalExtension();
208 208
 
209 209
         //Move our temporay attachment to its final location
210 210
         $file_path = $file->move($folder, $newFilename)->getRealPath();
Please login to merge, or discard this patch.
src/Controller/UserController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         }
143 143
 
144 144
         //Show permissions to user
145
-        $builder = $this->createFormBuilder()->add('permissions',PermissionsType::class, [
145
+        $builder = $this->createFormBuilder()->add('permissions', PermissionsType::class, [
146 146
             'mapped' => false,
147 147
             'disabled' => true,
148 148
             'inherit' => true,
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 
169 169
         $page_need_reload = false;
170 170
 
171
-        if(!$user instanceof User) {
171
+        if (!$user instanceof User) {
172 172
             return new \RuntimeException("This controller only works only for Part-DB User objects!");
173 173
         }
174 174
 
Please login to merge, or discard this patch.
src/Form/UserSettingsType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
                 'required' => false,
78 78
                 'attr' => ['class' => 'selectpicker'],
79 79
                 'choices' => User::AVAILABLE_THEMES,
80
-                'choice_label' => function ($entity, $key, $value) {
80
+                'choice_label' => function($entity, $key, $value) {
81 81
                     return $value;
82 82
                 },
83 83
                 'placeholder' => $this->trans->trans('user_settings.theme.placeholder'),
Please login to merge, or discard this patch.
src/Form/UserAdminForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
             ->add('theme', ChoiceType::class, [
150 150
                 'required' => false,
151 151
                 'choices' => User::AVAILABLE_THEMES,
152
-                'choice_label' => function ($entity, $key, $value) {
152
+                'choice_label' => function($entity, $key, $value) {
153 153
                     return $value;
154 154
                 },
155 155
                 'attr' => ['class' => 'selectpicker'],
Please login to merge, or discard this patch.