Completed
Push — master ( d1d08c...570c1f )
by Carsten
11:09 queued 05:42
created
src/PdoAllSalesmen.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @param string                 $table    The table name to use
34 34
      * @param SalesmanInterface|null $salesman Class or object template to work with
35 35
      */
36
-    public function __construct (\PDO $pdo, $table, SalesmanInterface $salesman = null)
36
+    public function __construct(\PDO $pdo, $table, SalesmanInterface $salesman = null)
37 37
     {
38 38
         $this->table    = $table;
39 39
         $this->pdo      = $pdo;
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
         aussendienst_vorname ASC,
60 60
         aussendienst_nummer ASC";
61 61
 
62
-        $this->stmt = $pdo->prepare( $sql );
62
+        $this->stmt = $pdo->prepare($sql);
63 63
 
64
-        $this->stmt->setFetchMode( \PDO::FETCH_CLASS, $this->php_salesman_class );
64
+        $this->stmt->setFetchMode(\PDO::FETCH_CLASS, $this->php_salesman_class);
65 65
 
66 66
         if (!$this->stmt->execute()):
67 67
             throw new SalesmanDatabaseException("PdoAllSalesmen: Could not execute SQL query");
68 68
         endif;
69 69
 
70
-        $this->salesmen = $this->stmt->fetchAll( \PDO::FETCH_UNIQUE);
70
+        $this->salesmen = $this->stmt->fetchAll(\PDO::FETCH_UNIQUE);
71 71
 
72 72
     }
73 73
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     /**
87 87
      * @implements ContainerInterface
88 88
      */
89
-    public function has ($aussendienst_nummer) {
89
+    public function has($aussendienst_nummer) {
90 90
         if ($aussendienst_nummer instanceOf SalesmanIdProviderInterface) {
91 91
             $aussendienst_nummer = $aussendienst_nummer->getSalesmanId();
92 92
         }
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
     /**
98 98
      * @implements ContainerInterface
99 99
      */
100
-    public function get ($aussendienst_nummer) {
100
+    public function get($aussendienst_nummer) {
101 101
         if ($aussendienst_nummer instanceOf SalesmanIdProviderInterface) {
102 102
             $aussendienst_nummer = $aussendienst_nummer->getSalesmanId();
103 103
         }
104 104
 
105 105
         if (!$this->has($aussendienst_nummer)) {
106 106
             $msg = sprintf("Could not find Salesman with ADM-Nummer '%s'", $aussendienst_nummer);
107
-            throw new SalesmanNotFoundException( $msg );
107
+            throw new SalesmanNotFoundException($msg);
108 108
         }
109 109
 
110 110
         return $this->salesmen[$aussendienst_nummer];
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function getIterator()
118 118
     {
119
-        return new \ArrayIterator( $this->salesmen );
119
+        return new \ArrayIterator($this->salesmen);
120 120
     }
121 121
 
122 122
 
@@ -125,6 +125,6 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function count()
127 127
     {
128
-        return count( $this->salesmen );
128
+        return count($this->salesmen);
129 129
     }
130 130
 }
Please login to merge, or discard this patch.