@@ -84,13 +84,13 @@ |
||
84 | 84 | */ |
85 | 85 | public function fromDatabaseArray(array $data) |
86 | 86 | { |
87 | - $this->id = (int) $data['id']; |
|
88 | - $this->slug = (string) $data['slug']; |
|
89 | - $this->metaKeywords = (string) $data['meta_keywords']; |
|
90 | - $this->metaDescription = (string) $data['meta_description']; |
|
91 | - $this->metaSocial = (string) $data['meta_social']; |
|
87 | + $this->id = (int)$data['id']; |
|
88 | + $this->slug = (string)$data['slug']; |
|
89 | + $this->metaKeywords = (string)$data['meta_keywords']; |
|
90 | + $this->metaDescription = (string)$data['meta_description']; |
|
91 | + $this->metaSocial = (string)$data['meta_social']; |
|
92 | 92 | $this->updatedAt = new DateTime($data['updated_at']); |
93 | - $this->active = (bool) $data['active']; |
|
93 | + $this->active = (bool)$data['active']; |
|
94 | 94 | |
95 | 95 | return $this; |
96 | 96 | } |
@@ -105,16 +105,16 @@ |
||
105 | 105 | */ |
106 | 106 | public function fromDatabaseArray(array $data) |
107 | 107 | { |
108 | - $this->id = (int) $data['user_id']; |
|
109 | - $this->username = (string) $data['username']; |
|
110 | - $this->password = (string) $data['password']; |
|
111 | - $this->email = (string) $data['email']; |
|
112 | - $this->latitude = (double) $data['latitude']; |
|
113 | - $this->longitude = (double) $data['longitude']; |
|
114 | - $this->isActive = (bool) $data['is_active_flag']; |
|
115 | - $this->firstname = (string) $data['first_name']; |
|
116 | - $this->lastname = (string) $data['last_name']; |
|
117 | - $this->country = (string) $data['country']; |
|
108 | + $this->id = (int)$data['user_id']; |
|
109 | + $this->username = (string)$data['username']; |
|
110 | + $this->password = (string)$data['password']; |
|
111 | + $this->email = (string)$data['email']; |
|
112 | + $this->latitude = (double)$data['latitude']; |
|
113 | + $this->longitude = (double)$data['longitude']; |
|
114 | + $this->isActive = (bool)$data['is_active_flag']; |
|
115 | + $this->firstname = (string)$data['first_name']; |
|
116 | + $this->lastname = (string)$data['last_name']; |
|
117 | + $this->country = (string)$data['country']; |
|
118 | 118 | $this->language = strtolower($data['language']); |
119 | 119 | |
120 | 120 | return $this; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $entity->toDatabaseArray() |
82 | 82 | ); |
83 | 83 | |
84 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
84 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
85 | 85 | |
86 | 86 | return $entity; |
87 | 87 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | ['id' => $entity->id] |
106 | 106 | ); |
107 | 107 | |
108 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
108 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
109 | 109 | |
110 | 110 | return $entity; |
111 | 111 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | if (count($where) > 0) { |
52 | 52 | foreach ($where as $column => $value) { |
53 | - $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
53 | + $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $entity->toDatabaseArray() |
90 | 90 | ); |
91 | 91 | |
92 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
92 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | ['id' => $entity->id] |
112 | 112 | ); |
113 | 113 | |
114 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
114 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
115 | 115 | |
116 | 116 | return $entity; |
117 | 117 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | if (count($where) > 0) { |
54 | 54 | foreach ($where as $column => $value) { |
55 | - $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
55 | + $queryBuilder->andWhere($column . ' = ' . $queryBuilder->createNamedParameter($value)); |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $entity->toDatabaseArray() |
88 | 88 | ); |
89 | 89 | |
90 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
90 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
91 | 91 | |
92 | 92 | return $entity; |
93 | 93 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | ['id' => $entity->id] |
112 | 112 | ); |
113 | 113 | |
114 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
114 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
115 | 115 | |
116 | 116 | return $entity; |
117 | 117 | } |
@@ -94,15 +94,15 @@ |
||
94 | 94 | */ |
95 | 95 | public function fromDatabaseArray(array $data) |
96 | 96 | { |
97 | - $this->short = (string) strtolower($data['short']); |
|
98 | - $this->name = (string) $data['name']; |
|
99 | - $this->nativeName = (string) $data['native_name']; |
|
100 | - $this->de = (string) $data['de']; |
|
101 | - $this->en = (string) $data['en']; |
|
102 | - $this->translationId = (int) $data['trans_id']; |
|
103 | - $this->listDefaultDe = (bool) $data['list_default_de']; |
|
104 | - $this->listDefaultEn = (bool) $data['list_default_en']; |
|
105 | - $this->isTranslated = (bool) $data['is_translated']; |
|
97 | + $this->short = (string)strtolower($data['short']); |
|
98 | + $this->name = (string)$data['name']; |
|
99 | + $this->nativeName = (string)$data['native_name']; |
|
100 | + $this->de = (string)$data['de']; |
|
101 | + $this->en = (string)$data['en']; |
|
102 | + $this->translationId = (int)$data['trans_id']; |
|
103 | + $this->listDefaultDe = (bool)$data['list_default_de']; |
|
104 | + $this->listDefaultEn = (bool)$data['list_default_en']; |
|
105 | + $this->isTranslated = (bool)$data['is_translated']; |
|
106 | 106 | |
107 | 107 | return $this; |
108 | 108 | } |
@@ -94,15 +94,15 @@ |
||
94 | 94 | */ |
95 | 95 | public function fromDatabaseArray(array $data) |
96 | 96 | { |
97 | - $this->short = (string) $data['short']; |
|
98 | - $this->name = (string) $data['name']; |
|
99 | - $this->de = (string) $data['de']; |
|
100 | - $this->en = (string) $data['en']; |
|
101 | - $this->translationId = (int) $data['trans_id']; |
|
102 | - $this->listDefaultDe = (bool) $data['list_default_de']; |
|
103 | - $this->listDefaultEn = (bool) $data['list_default_en']; |
|
104 | - $this->sortDe = (string) $data['sort_de']; |
|
105 | - $this->sortEn = (string) $data['sort_en']; |
|
97 | + $this->short = (string)$data['short']; |
|
98 | + $this->name = (string)$data['name']; |
|
99 | + $this->de = (string)$data['de']; |
|
100 | + $this->en = (string)$data['en']; |
|
101 | + $this->translationId = (int)$data['trans_id']; |
|
102 | + $this->listDefaultDe = (bool)$data['list_default_de']; |
|
103 | + $this->listDefaultEn = (bool)$data['list_default_en']; |
|
104 | + $this->sortDe = (string)$data['sort_de']; |
|
105 | + $this->sortEn = (string)$data['sort_en']; |
|
106 | 106 | |
107 | 107 | return $this; |
108 | 108 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | 'page_id' => $this->pageId, |
70 | 70 | 'title' => $this->title, |
71 | 71 | 'html' => $this->html, |
72 | - 'position' => (int) $this->position, |
|
72 | + 'position' => (int)$this->position, |
|
73 | 73 | 'updated_at' => $this->updatedAt->format(DateTime::ATOM), |
74 | 74 | 'active' => $this->active |
75 | 75 | ]; |
@@ -84,13 +84,13 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function fromDatabaseArray(array $data) |
86 | 86 | { |
87 | - $this->id = (int) $data['id']; |
|
88 | - $this->pageId = (int) $data['page_id']; |
|
89 | - $this->title = (string) $data['title']; |
|
90 | - $this->html = (string) $data['html']; |
|
91 | - $this->position = (int) $data['position']; |
|
87 | + $this->id = (int)$data['id']; |
|
88 | + $this->pageId = (int)$data['page_id']; |
|
89 | + $this->title = (string)$data['title']; |
|
90 | + $this->html = (string)$data['html']; |
|
91 | + $this->position = (int)$data['position']; |
|
92 | 92 | $this->updatedAt = new DateTime($data['updated_at']); |
93 | - $this->active = (bool) $data['active']; |
|
93 | + $this->active = (bool)$data['active']; |
|
94 | 94 | |
95 | 95 | return $this; |
96 | 96 | } |