Skip to content

Commit 9055e3b

Browse files
Add deprecation warnings
1 parent 0749b59 commit 9055e3b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Operator/Config.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ class Config extends Base
3333
private const TYPE_VAR = 'var';
3434

3535
/**
36-
* @deprectaed replaced by `hasSetting`
36+
* @deprectaed since 3.14.0 replaced by `hasSetting`
3737
*/
3838
public function has(string $name): bool
3939
{
40+
trigger_error('\'has\' should be replaced by \'hasSetting\'', E_USER_DEPRECATED);
4041
return $this->hasSetting($name);
4142
}
4243

@@ -82,10 +83,11 @@ private function hasIt(string $type, string $name): bool
8283
}
8384

8485
/**
85-
* @deprecated replaced by `getSetting`
86+
* @deprecated since 3.14.0 replaced by `getSetting`
8687
*/
8788
public function get(string $name): string
8889
{
90+
trigger_error('\'get\' should be replaced by \'getSetting\'', E_USER_DEPRECATED);
8991
return $this->getSetting($name);
9092
}
9193

@@ -114,10 +116,11 @@ public function getVar(string $name): string
114116
}
115117

116118
/**
117-
* @deprecated replaced by `getSettingSafely`
119+
* @deprecated since 3.14.0 replaced by `getSettingSafely`
118120
*/
119121
public function getSafely(string $name, string $default = ''): string
120122
{
123+
trigger_error('\'getSafely\' should be replaced by \'getSettingSafely\'', E_USER_DEPRECATED);
121124
return $this->getSettingSafely($name, $default);
122125
}
123126

@@ -133,7 +136,7 @@ public function getSafely(string $name, string $default = ''): string
133136
*/
134137
public function getSettingSafely(string $name, string $default = ''): string
135138
{
136-
return $this->has($name) ? $this->getSetting($name) : $default;
139+
return $this->hasSetting($name) ? $this->getSetting($name) : $default;
137140
}
138141

139142
/**

0 commit comments

Comments
 (0)