@@ -71,7 +71,7 @@ |
||
71 | 71 | |
72 | 72 | |
73 | 73 | /** |
74 | - * @return Iterator |
|
74 | + * @return \ArrayIterator |
|
75 | 75 | */ |
76 | 76 | public function getIterator() |
77 | 77 | { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @param string $table The table name to use |
29 | 29 | * @param SalesmanInterface|null $salesman Class or object template to work with |
30 | 30 | */ |
31 | - public function __construct (\PDO $pdo, $table, SalesmanInterface $salesman = null) |
|
31 | + public function __construct(\PDO $pdo, $table, SalesmanInterface $salesman = null) |
|
32 | 32 | { |
33 | 33 | $this->table = $table; |
34 | 34 | $this->pdo = $pdo; |
@@ -53,15 +53,15 @@ discard block |
||
53 | 53 | aussendienst_vorname ASC, |
54 | 54 | aussendienst_nummer ASC"; |
55 | 55 | |
56 | - $this->stmt = $pdo->prepare( $sql ); |
|
56 | + $this->stmt = $pdo->prepare($sql); |
|
57 | 57 | |
58 | - $this->stmt->setFetchMode( \PDO::FETCH_CLASS, $salesman ? get_class($salesman) : Salesman::class ); |
|
58 | + $this->stmt->setFetchMode(\PDO::FETCH_CLASS, $salesman ? get_class($salesman) : Salesman::class); |
|
59 | 59 | |
60 | 60 | if (!$this->stmt->execute()): |
61 | 61 | throw new SalesmanDatabaseException("PdoAllSalesmen: Could not execute SQL query"); |
62 | 62 | endif; |
63 | 63 | |
64 | - $this->salesmen = $this->stmt->fetchAll( \PDO::FETCH_UNIQUE); |
|
64 | + $this->salesmen = $this->stmt->fetchAll(\PDO::FETCH_UNIQUE); |
|
65 | 65 | |
66 | 66 | } |
67 | 67 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | /** |
70 | 70 | * @implements ContainerInterface |
71 | 71 | */ |
72 | - public function has ($aussendienst_nummer) { |
|
72 | + public function has($aussendienst_nummer) { |
|
73 | 73 | if ($aussendienst_nummer instanceOf SalesmanIdProviderInterface) { |
74 | 74 | $aussendienst_nummer = $aussendienst_nummer->getSalesmanId(); |
75 | 75 | } |
@@ -80,14 +80,14 @@ discard block |
||
80 | 80 | /** |
81 | 81 | * @implements ContainerInterface |
82 | 82 | */ |
83 | - public function get ($aussendienst_nummer) { |
|
83 | + public function get($aussendienst_nummer) { |
|
84 | 84 | if ($aussendienst_nummer instanceOf SalesmanIdProviderInterface) { |
85 | 85 | $aussendienst_nummer = $aussendienst_nummer->getSalesmanId(); |
86 | 86 | } |
87 | 87 | |
88 | 88 | if (!$this->has($aussendienst_nummer)) { |
89 | 89 | $msg = sprintf("Could not find Salesman with ADM-Nummer '%s'", $aussendienst_nummer); |
90 | - throw new SalesmanNotFoundException( $msg ); |
|
90 | + throw new SalesmanNotFoundException($msg); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | return $this->salesmen[$aussendienst_nummer]; |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function getIterator() |
101 | 101 | { |
102 | - return new \ArrayIterator( $this->salesmen ); |
|
102 | + return new \ArrayIterator($this->salesmen); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | |
@@ -108,6 +108,6 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function count() |
110 | 110 | { |
111 | - return count( $this->salesmen ); |
|
111 | + return count($this->salesmen); |
|
112 | 112 | } |
113 | 113 | } |