1111 * @see https://docs.opensearch.org/latest/api-reference/index-apis/update-settings/
1212 * @see https://docs.opensearch.org/latest/api-reference/index-apis/alias/
1313 */
14- class IndexManager
14+ class IndexManager implements IndexManagerInterface
1515{
1616 /**
1717 * The OpenSearch indices namespace.
@@ -29,7 +29,7 @@ public function __construct(Client $client)
2929 /**
3030 * Open the given index.
3131 */
32- public function open (string $ index ): self
32+ public function open (string $ index ): static
3333 {
3434 $ this ->indices ->open ([
3535 'index ' => $ index ,
@@ -41,7 +41,7 @@ public function open(string $index): self
4141 /**
4242 * Close the given index.
4343 */
44- public function close (string $ index ): self
44+ public function close (string $ index ): static
4545 {
4646 $ this ->indices ->close ([
4747 'index ' => $ index ,
@@ -63,7 +63,7 @@ public function exists(string $index): bool
6363 /**
6464 * Create an index from the given blueprint.
6565 */
66- public function create (IndexBlueprint $ index ): self
66+ public function create (IndexBlueprint $ index ): static
6767 {
6868 $ this ->indices ->create ($ index ->toArray ());
6969
@@ -73,7 +73,7 @@ public function create(IndexBlueprint $index): self
7373 /**
7474 * Update the mapping for the given index.
7575 */
76- public function putMapping (string $ index , Mapping $ mapping ): self
76+ public function putMapping (string $ index , Mapping $ mapping ): static
7777 {
7878 $ this ->indices ->putMapping ([
7979 'index ' => $ index ,
@@ -86,7 +86,7 @@ public function putMapping(string $index, Mapping $mapping): self
8686 /**
8787 * Update the settings for the given index.
8888 */
89- public function putSettings (string $ index , Settings $ settings ): self
89+ public function putSettings (string $ index , Settings $ settings ): static
9090 {
9191 $ this ->indices ->putSettings ([
9292 'index ' => $ index ,
@@ -101,7 +101,7 @@ public function putSettings(string $index, Settings $settings): self
101101 /**
102102 * Delete the given index.
103103 */
104- public function delete (string $ index ): self
104+ public function delete (string $ index ): static
105105 {
106106 $ this ->indices ->delete ([
107107 'index ' => $ index ,
@@ -139,7 +139,7 @@ public function getAliases(string $index): array
139139 /**
140140 * Create or update an alias for the given index.
141141 */
142- public function putAlias (string $ index , Alias $ alias ): self
142+ public function putAlias (string $ index , Alias $ alias ): static
143143 {
144144 $ params = [
145145 'index ' => $ index ,
@@ -158,7 +158,7 @@ public function putAlias(string $index, Alias $alias): self
158158 /**
159159 * Delete the given alias from the index.
160160 */
161- public function deleteAlias (string $ index , string $ aliasName ): self
161+ public function deleteAlias (string $ index , string $ aliasName ): static
162162 {
163163 $ this ->indices ->deleteAlias ([
164164 'index ' => $ index ,
0 commit comments