Completed
Push — master ( 51be17...87e6f6 )
by Jan
03:52
created
src/Migrations/Version1.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $skip_this_version = false;
27 27
         try {
28 28
             //Check if we can use this migration method:
29
-            $version = (int)$this->connection->fetchColumn("SELECT keyValue AS version FROM `internal` WHERE `keyName` = 'dbVersion'");
29
+            $version = (int) $this->connection->fetchColumn("SELECT keyValue AS version FROM `internal` WHERE `keyName` = 'dbVersion'");
30 30
 
31 31
             $this->skipIf(true, "Old Part-DB Database detected! Continue with upgrade...");
32 32
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $this->addSql('ALTER TABLE `users` ADD CONSTRAINT FK_1483A5E9FE54D947 FOREIGN KEY (group_id) REFERENCES `groups` (id)');
74 74
 
75 75
         //Create table for user logs:
76
-        $sql =  $updateSteps[] = "CREATE TABLE `log` ".
76
+        $sql = $updateSteps[] = "CREATE TABLE `log` ".
77 77
             "( `id` INT NOT NULL AUTO_INCREMENT , `datetime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP() ,".
78 78
             " `id_user` INT NOT NULL ,".
79 79
             " `level` TINYINT NOT NULL ,".
Please login to merge, or discard this patch.
src/Services/AttachmentHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         if ($fs->isAbsolutePath($tmp_base_path)) {
55 55
             $this->base_path = $tmp_base_path;
56 56
         } else {
57
-            $this->base_path = realpath($kernel->getProjectDir() . $tmp_base_path);
57
+            $this->base_path = realpath($kernel->getProjectDir().$tmp_base_path);
58 58
         }
59 59
     }
60 60
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
         $sz = 'BKMGTP';
126 126
         $factor = (int) floor((strlen($bytes) - 1) / 3);
127
-        return sprintf("%.{$decimals}f", $bytes / 1024 ** $factor) . @$sz[$factor];
127
+        return sprintf("%.{$decimals}f", $bytes / 1024 ** $factor).@$sz[$factor];
128 128
     }
129 129
 
130 130
 }
131 131
\ No newline at end of file
Please login to merge, or discard this patch.
src/Migrations/Version20190812154222.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,15 +30,15 @@
 block discarded – undo
30 30
 
31 31
         /** Migrate the part locations for parts with known instock */
32 32
         $this->addSql(
33
-            'INSERT INTO part_lots (id_part, id_store_location, instock, instock_unknown, last_modified, datetime_added) ' .
34
-                'SELECT parts.id, parts.id_storelocation,  parts.instock, 0, NOW(), NOW() FROM parts ' .
33
+            'INSERT INTO part_lots (id_part, id_store_location, instock, instock_unknown, last_modified, datetime_added) '.
34
+                'SELECT parts.id, parts.id_storelocation,  parts.instock, 0, NOW(), NOW() FROM parts '.
35 35
                 'WHERE parts.instock >= 0 AND parts.id_storelocation IS NOT NULL'
36 36
         );
37 37
 
38 38
         //Migrate part locations for parts with unknown instock
39 39
         $this->addSql(
40
-            'INSERT INTO part_lots (id_part, id_store_location, instock, instock_unknown, last_modified, datetime_added) ' .
41
-            'SELECT parts.id, parts.id_storelocation,  0, 1, NOW(), NOW() FROM parts ' .
40
+            'INSERT INTO part_lots (id_part, id_store_location, instock, instock_unknown, last_modified, datetime_added) '.
41
+            'SELECT parts.id, parts.id_storelocation,  0, 1, NOW(), NOW() FROM parts '.
42 42
             'WHERE parts.instock = -2 AND parts.id_storelocation IS NOT NULL'
43 43
         );
44 44
 
Please login to merge, or discard this patch.
src/Entity/Parts/PartLot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,6 +118,6 @@
 block discarded – undo
118 118
      */
119 119
     public function getIDString(): string
120 120
     {
121
-        return 'PL' . $this->getID();
121
+        return 'PL'.$this->getID();
122 122
     }
123 123
 }
124 124
\ No newline at end of file
Please login to merge, or discard this patch.
src/Entity/Parts/MeasurementUnit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
      */
79 79
     public function getIDString(): string
80 80
     {
81
-        return 'MU' . $this->getID();
81
+        return 'MU'.$this->getID();
82 82
     }
83 83
 
84 84
     /**
Please login to merge, or discard this patch.
src/Entity/Attachments/Attachment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@
 block discarded – undo
221 221
         if ($only_http) {   //Check if scheme is HTTPS or HTTP
222 222
             $scheme = parse_url($string, PHP_URL_SCHEME);
223 223
             if ($scheme !== 'http' && $scheme !== 'https') {
224
-                return false;   //All other schemes are not valid.
224
+                return false; //All other schemes are not valid.
225 225
             }
226 226
         }
227 227
         if ($path_required) {
Please login to merge, or discard this patch.
src/Entity/Attachments/AttachmentType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,6 +77,6 @@
 block discarded – undo
77 77
      */
78 78
     public function getIDString(): string
79 79
     {
80
-        return 'AT' . sprintf('%09d', $this->getID());
80
+        return 'AT'.sprintf('%09d', $this->getID());
81 81
     }
82 82
 }
Please login to merge, or discard this patch.
src/Entity/PriceInformations/Currency.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,6 +126,6 @@
 block discarded – undo
126 126
      */
127 127
     public function getIDString(): string
128 128
     {
129
-        return 'C' . $this->getID();
129
+        return 'C'.$this->getID();
130 130
     }
131 131
 }
132 132
\ No newline at end of file
Please login to merge, or discard this patch.
src/Entity/PriceInformations/Pricedetail.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,6 @@
 block discarded – undo
110 110
      *          in the database, you have to pass the "price_related_quantity" count as $multiplier.
111 111
      *
112 112
      * @return float  the price as a float number
113
-
114 113
      */
115 114
     public function getPricePerUnit(int $multiplier = 1) : float
116 115
     {
Please login to merge, or discard this patch.