Completed
Pull Request — master (#26)
by Lars
14:13
created
src/Intraface/modules/accounting/PostGateway.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $post_id = (int)$post_id;
41 41
         $db = new DB_Sql;
42
-        $db->query("SELECT voucher_id FROM accounting_post WHERE id = " . $post_id . " AND year_id = " . $year->get('id') . " AND intranet_id=" . $year->kernel->intranet->get('id'));
42
+        $db->query("SELECT voucher_id FROM accounting_post WHERE id = ".$post_id." AND year_id = ".$year->get('id')." AND intranet_id=".$year->kernel->intranet->get('id'));
43 43
         if (!$db->nextRecord()) {
44 44
             return new Post(new Voucher($year));
45 45
         }
46
-        $post =  new Post(new Voucher($year, $db->f('voucher_id')), (int)$post_id);
46
+        $post = new Post(new Voucher($year, $db->f('voucher_id')), (int)$post_id);
47 47
         return $post;
48 48
 
49 49
     }
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
     public function getList($type = 'stated')
52 52
     {
53 53
         $db = new DB_Sql;
54
-        $sql = "SELECT voucher.reference, post.id, post.text, post.voucher_id, post.date, post.account_id, post.debet, post.credit, post.stated, DATE_FORMAT(post.date, '%d-%m-%Y') AS date_dk FROM accounting_post post INNER JOIN accounting_voucher voucher ON post.voucher_id = voucher.id WHERE post.year_id = " . $this->voucher->year->get('id') . " AND post.intranet_id = " . $this->voucher->year->kernel->intranet->get('id');
54
+        $sql = "SELECT voucher.reference, post.id, post.text, post.voucher_id, post.date, post.account_id, post.debet, post.credit, post.stated, DATE_FORMAT(post.date, '%d-%m-%Y') AS date_dk FROM accounting_post post INNER JOIN accounting_voucher voucher ON post.voucher_id = voucher.id WHERE post.year_id = ".$this->voucher->year->get('id')." AND post.intranet_id = ".$this->voucher->year->kernel->intranet->get('id');
55 55
         if ($type == 'stated') {
56 56
             $sql .= " AND post.stated = 1";
57 57
         } elseif ($type == 'draft') {
58 58
             $sql .= " AND post.stated = 0";
59 59
         }
60
-        $db->query($sql . " ORDER BY post.voucher_id DESC, post.id DESC");
60
+        $db->query($sql." ORDER BY post.voucher_id DESC, post.id DESC");
61 61
 
62 62
         $i = 0;
63 63
         $this->value['list_saldo'] = 0;
Please login to merge, or discard this patch.
src/DB/Sql.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
         if (empty($dbhost) OR empty($dbuser) OR empty($dbpass) OR empty($dbname)) {
17 17
             $this->db = MDB2::singleton(DB_DSN);
18 18
         } else {
19
-            $this->db = MDB2::singleton('mysql://' . $dbuser . ':' . $dbpass . '@' . $dbhost . '/' . $dbname);
19
+            $this->db = MDB2::singleton('mysql://'.$dbuser.':'.$dbpass.'@'.$dbhost.'/'.$dbname);
20 20
         }
21 21
 
22 22
         if (PEAR::isError($this->db)) {
23
-            die($this->db->getMessage() . ' ' . $this->db->getUserInfo());
23
+            die($this->db->getMessage().' '.$this->db->getUserInfo());
24 24
         }
25 25
         $this->db->query('SET NAMES utf8');
26 26
         $this->db->setOption('portability', MDB2_PORTABILITY_NONE);
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         $this->result = $this->db->query($SQL);
32 32
         if (PEAR::isError($this->result)) {
33
-            die($this->result->getMessage() . ' ' . $this->result->getUserInfo());
33
+            die($this->result->getMessage().' '.$this->result->getUserInfo());
34 34
         }
35 35
     }
36 36
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $this->result = $this->db->exec($SQL);
40 40
         if (PEAR::isError($this->result)) {
41
-            die($this->result->getMessage() . ' ' . $this->result->getUserInfo());
41
+            die($this->result->getMessage().' '.$this->result->getUserInfo());
42 42
         }
43 43
 
44 44
         $this->result->free();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         // while($db->next_record()) {
53 53
         $this->row = $this->result->fetchRow(MDB2_FETCHMODE_ASSOC);
54 54
         if (PEAR::isError($this->row)) {
55
-            die($this->row->getMessage() . '' . $this->row->getUserInfo());
55
+            die($this->row->getMessage().''.$this->row->getUserInfo());
56 56
         }
57 57
 
58 58
         return($this->row);
Please login to merge, or discard this patch.
tests/unit/Product/ProductDoctrineTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -373,7 +373,7 @@
 block discarded – undo
373 373
         try {
374 374
             $product->setAttributeGroup($group);
375 375
             $this->assertTrue(false, 'An excpetion is not thrown');
376
-        } catch(Exception $e) {
376
+        } catch (Exception $e) {
377 377
             $this->assertEquals('You can not set attribute group for a product without variations!', $e->getMessage());
378 378
         }
379 379
     }
Please login to merge, or discard this patch.
tests/unit/Currency/ExchangeRateTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 
39 39
         try {
40 40
             $object->save();
41
-        } catch(Exception $e) {
41
+        } catch (Exception $e) {
42 42
             // $this->assertTrue(false, $e->getErrorMessage());
43 43
         }
44 44
     }
Please login to merge, or discard this patch.
tests/unit/Currency/CurrencyTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         $object->setType($type->getByIsoCode('EUR'));
28 28
         try {
29 29
             $object->save();
30
-        } catch(Exception $e) {
30
+        } catch (Exception $e) {
31 31
             $this->assertTrue(false, $e->getMessage());
32 32
         }
33 33
     }
Please login to merge, or discard this patch.
src/intraface.dk/demo/Demo/Shop/Root.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     function renderHtml()
12 12
     {
13
-        return get_class($this) . ' intentionally left blank';
13
+        return get_class($this).' intentionally left blank';
14 14
     }
15 15
 
16 16
     function getPrivateKey()
Please login to merge, or discard this patch.
src/intraface.dk/demo/Demo/Shop/Show.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             $this->getCredentials(),
61 61
             $shop_id,
62 62
             $debug,
63
-            INTRAFACE_XMLPRC_SERVER_PATH . "shop/server0100.php",
63
+            INTRAFACE_XMLPRC_SERVER_PATH."shop/server0100.php",
64 64
             'utf-8'
65 65
         ); // 'iso-8859-1', 'xmlrpcext'
66 66
         return new IntrafacePublic_Shop($client, $this->cache);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 new IntrafacePublic_OnlinePayment_Client_XMLRPC(
75 75
                     $this->getCredentials(),
76 76
                     $debug,
77
-                    INTRAFACE_XMLPRC_SERVER_PATH . "onlinepayment/server0100.php", // , 'iso-8859-1', 'xmlrpcext'
77
+                    INTRAFACE_XMLPRC_SERVER_PATH."onlinepayment/server0100.php", // , 'iso-8859-1', 'xmlrpcext'
78 78
                     'utf-8'
79 79
                 ),
80 80
                 $this->cache
Please login to merge, or discard this patch.
src/intraface.dk/demo/Demo/Newsletter/Show.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
             $this->getCredentials(),
44 44
             $list_id,
45 45
             $debug,
46
-            INTRAFACE_XMLPRC_SERVER_PATH . "newsletter/server0101.php",
46
+            INTRAFACE_XMLPRC_SERVER_PATH."newsletter/server0101.php",
47 47
             'utf-8'
48 48
         ); // , 'iso-8859-1', 'xmlrpcext'
49 49
         return $client;
Please login to merge, or discard this patch.
src/intraface.dk/demo/Demo/Identifier.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     function renderHtml()
12 12
     {
13
-        return get_class($this) . ' intentionally left blank';
13
+        return get_class($this).' intentionally left blank';
14 14
     }
15 15
 
16 16
     function getPrivateKey()
Please login to merge, or discard this patch.