@@ -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 | { |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | public $salesmen = array(); |
16 | 16 | |
17 | - public function __construct (\PDO $pdo, $table, SalesmanInterface $salesman = null) |
|
17 | + public function __construct(\PDO $pdo, $table, SalesmanInterface $salesman = null) |
|
18 | 18 | { |
19 | 19 | $this->table = $table; |
20 | 20 | $this->pdo = $pdo; |
@@ -39,20 +39,20 @@ discard block |
||
39 | 39 | aussendienst_vorname ASC, |
40 | 40 | aussendienst_nummer ASC"; |
41 | 41 | |
42 | - $this->stmt = $pdo->prepare( $sql ); |
|
42 | + $this->stmt = $pdo->prepare($sql); |
|
43 | 43 | |
44 | - $this->stmt->setFetchMode( \PDO::FETCH_CLASS, $salesman ? get_class($salesman) : Salesman::class ); |
|
44 | + $this->stmt->setFetchMode(\PDO::FETCH_CLASS, $salesman ? get_class($salesman) : Salesman::class); |
|
45 | 45 | |
46 | 46 | $bool = $this->stmt->execute(); |
47 | 47 | |
48 | - $this->salesmen = $this->stmt->fetchAll( \PDO::FETCH_UNIQUE); |
|
48 | + $this->salesmen = $this->stmt->fetchAll(\PDO::FETCH_UNIQUE); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
52 | 52 | /** |
53 | 53 | * @implements ContainerInterface |
54 | 54 | */ |
55 | - public function has ($aussendienst_nummer) { |
|
55 | + public function has($aussendienst_nummer) { |
|
56 | 56 | return array_key_exists($aussendienst_nummer, $this->salesmen); |
57 | 57 | } |
58 | 58 | |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | /** |
61 | 61 | * @implements ContainerInterface |
62 | 62 | */ |
63 | - public function get ($aussendienst_nummer) { |
|
63 | + public function get($aussendienst_nummer) { |
|
64 | 64 | if (!$this->has($aussendienst_nummer)) { |
65 | 65 | $msg = sprintf("Could not find Salesman with ADM-Nummer '%s'", $aussendienst_nummer); |
66 | - throw new SalesmanNotFoundException( $msg ); |
|
66 | + throw new SalesmanNotFoundException($msg); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | return $this->salesmen[$aussendienst_nummer]; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function getIterator() |
77 | 77 | { |
78 | - return new \ArrayIterator( $this->salesmen ); |
|
78 | + return new \ArrayIterator($this->salesmen); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | |
@@ -84,6 +84,6 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function count() |
86 | 86 | { |
87 | - return count( $this->salesmen ); |
|
87 | + return count($this->salesmen); |
|
88 | 88 | } |
89 | 89 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function getFullName() |
84 | 84 | { |
85 | - return trim( join(" ", array_filter([ |
|
85 | + return trim(join(" ", array_filter([ |
|
86 | 86 | $this->getFirstName(), |
87 | 87 | $this->getLastName() |
88 | 88 | ]))); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function getDisplayName() |
96 | 96 | { |
97 | - return trim( join(" ∙ ", array_filter([ |
|
97 | + return trim(join(" ∙ ", array_filter([ |
|
98 | 98 | $this->getFullName(), |
99 | 99 | $this->getSalesmanId() |
100 | 100 | ]))); |