@@ -38,26 +38,17 @@ class Settings implements SettingsInterface
3838 */
3939 protected $ parameters = [];
4040
41- /**
42- * {@inheritdoc}
43- */
4441 public function getId ()
4542 {
4643 return $ this ->id ;
4744 }
4845
49- /**
50- * {@inheritdoc}
51- */
52- public function getSchemaAlias ()
46+ public function getSchemaAlias (): string
5347 {
5448 return $ this ->schemaAlias ;
5549 }
5650
57- /**
58- * {@inheritdoc}
59- */
60- public function setSchemaAlias ($ schemaAlias )
51+ public function setSchemaAlias (string $ schemaAlias ): void
6152 {
6253 if (null !== $ this ->schemaAlias ) {
6354 throw new \LogicException ('The schema alias of the settings model is immutable, instantiate a new object in order to use another schema. ' );
@@ -66,18 +57,12 @@ public function setSchemaAlias($schemaAlias)
6657 $ this ->schemaAlias = $ schemaAlias ;
6758 }
6859
69- /**
70- * {@inheritdoc}
71- */
72- public function getNamespace ()
60+ public function getNamespace (): string
7361 {
7462 return $ this ->namespace ;
7563 }
7664
77- /**
78- * {@inheritdoc}
79- */
80- public function setNamespace ($ namespace )
65+ public function setNamespace ($ namespace ): void
8166 {
8267 if (null !== $ this ->namespace ) {
8368 throw new \LogicException ('The namespace of the settings model is immutable, instantiate a new object in order to use another namespace. ' );
@@ -86,66 +71,42 @@ public function setNamespace($namespace)
8671 $ this ->namespace = $ namespace ;
8772 }
8873
89- /**
90- * {@inheritdoc}
91- */
92- public function getParameters ()
74+ public function getParameters (): array
9375 {
9476 return $ this ->parameters ;
9577 }
9678
97- /**
98- * {@inheritdoc}
99- */
100- public function setParameters (array $ parameters )
79+ public function setParameters (array $ parameters ): void
10180 {
10281 $ this ->parameters = $ parameters ;
10382 }
10483
105- /**
106- * {@inheritdoc}
107- */
108- public function offsetExists ($ offset )
84+ public function offsetExists (mixed $ offset ): bool
10985 {
11086 return $ this ->has ($ offset );
11187 }
11288
113- /**
114- * {@inheritdoc}
115- */
116- public function offsetGet ($ offset )
89+ public function offsetGet (mixed $ offset ): mixed
11790 {
11891 return $ this ->get ($ offset );
11992 }
12093
121- /**
122- * {@inheritdoc}
123- */
124- public function offsetSet ($ offset , $ value )
94+ public function offsetSet (mixed $ offset , mixed $ value ): void
12595 {
12696 $ this ->set ($ offset , $ value );
12797 }
12898
129- /**
130- * {@inheritdoc}
131- */
132- public function offsetUnset ($ offset )
99+ public function offsetUnset (mixed $ offset ): void
133100 {
134101 $ this ->remove ($ offset );
135102 }
136103
137- /**
138- * {@inheritdoc}
139- */
140- public function count ()
104+ public function count (): int
141105 {
142106 return count ($ this ->parameters );
143107 }
144108
145- /**
146- * {@inheritdoc}
147- */
148- public function get ($ name )
109+ public function get (string $ name ): mixed
149110 {
150111 if (!$ this ->has ($ name )) {
151112 throw new ParameterNotFoundException ($ name );
@@ -154,26 +115,17 @@ public function get($name)
154115 return $ this ->parameters [$ name ];
155116 }
156117
157- /**
158- * {@inheritdoc}
159- */
160- public function has ($ name )
118+ public function has (string $ name ): bool
161119 {
162120 return array_key_exists ($ name , $ this ->parameters );
163121 }
164122
165- /**
166- * {@inheritdoc}
167- */
168- public function set ($ name , $ value )
123+ public function set (string $ name , mixed $ value ): void
169124 {
170125 $ this ->parameters [$ name ] = $ value ;
171126 }
172127
173- /**
174- * {@inheritdoc}
175- */
176- public function remove ($ name )
128+ public function remove (string $ name ): void
177129 {
178130 if (!$ this ->has ($ name )) {
179131 throw new ParameterNotFoundException ($ name );
0 commit comments