File tree 6 files changed +14
-12
lines changed
6 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 14
14
class PHPDocFormattingValidator
15
15
{
16
16
private const REMOVED_IN_VERSION = 'removed in version ' ;
17
+ private const WITHOUT_REPLACEMENT = 'without replacement ' ;
17
18
18
19
/**
19
20
* Finds matching PHPDoc for current pointer
@@ -125,10 +126,11 @@ public function hasDeprecatedWellFormatted($commentStartPtr, $tokens)
125
126
}
126
127
$ seePtr = $ this ->getTagPosition ('@see ' , $ commentStartPtr , $ tokens );
127
128
if ($ seePtr === -1 ) {
128
- if (!stripos ($ tokens [$ deprecatedPtr + 2 ]['content ' ], self ::REMOVED_IN_VERSION , 0 )) {
129
- return false ;
129
+ if (stripos ($ tokens [$ deprecatedPtr + 2 ]['content ' ], self ::REMOVED_IN_VERSION , 0 ) &&
130
+ stripos ($ tokens [$ deprecatedPtr + 2 ]['content ' ], self ::WITHOUT_REPLACEMENT , 0 )) {
131
+ return true ;
130
132
}
131
- return true ;
133
+ return false ;
132
134
}
133
135
134
136
return $ tokens [$ seePtr + 2 ]['code ' ] === T_DOC_COMMENT_STRING ;
Original file line number Diff line number Diff line change @@ -373,7 +373,7 @@ class MethodAnnotationFixture
373
373
/**
374
374
* This deprecated function is correct even though it only contains the @deprecated tag.
375
375
*
376
- * @deprecated It will be removed in version 1.0.0
376
+ * @deprecated It will be removed in version 1.0.0 without replacement
377
377
*/
378
378
public function correctBecauseOfKeywordPhrase ()
379
379
{
@@ -383,7 +383,7 @@ class MethodAnnotationFixture
383
383
/**
384
384
* This deprecated function is correct even though it only contains the @deprecated tag.
385
385
*
386
- * @deprecated WOW! It will be removed in version 1.0.0
386
+ * @deprecated WOW! It will be removed in version 1.0.0 without replacement
387
387
*/
388
388
public function alsoCorrectBecauseOfKeywordPhrase ()
389
389
{
Original file line number Diff line number Diff line change @@ -164,15 +164,15 @@ class OldHandler
164
164
}
165
165
166
166
/**
167
- * @deprecated It will be removed in version 1.0.0
167
+ * @deprecated It will be removed in version 1.0.0 without replacement
168
168
*/
169
169
class DeprecatedButHandler
170
170
{
171
171
172
172
}
173
173
174
174
/**
175
- * @deprecated It's also deprecated, but it will be removed in version 1.0.0
175
+ * @deprecated It's also deprecated, but it will be removed in version 1.0.0 without replacement
176
176
*/
177
177
class AlsoDeprecatedButHandler
178
178
{
Original file line number Diff line number Diff line change @@ -155,15 +155,15 @@ interface DoNotCareHandler
155
155
}
156
156
157
157
/**
158
- * @deprecated This interface will be removed in version 1.0.0
158
+ * @deprecated This interface will be removed in version 1.0.0 without replacement
159
159
*/
160
160
interface DeprecatedButHandler
161
161
{
162
162
163
163
}
164
164
165
165
/**
166
- * @deprecated Yeah! This interface will be removed in version 1.0.0
166
+ * @deprecated Yeah! This interface will be removed in version 1.0.0 without replacement
167
167
*/
168
168
interface AlsoDeprecatedButHandler
169
169
{
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ class correctlyFormattedClassMemberDocBlock
197
197
198
198
/**
199
199
* @var string
200
- * @deprecated This property will be removed in version 1.0.0
200
+ * @deprecated This property will be removed in version 1.0.0 without replacement
201
201
*/
202
202
protected string $ deprecatedWithKeyword ;
203
203
}
Original file line number Diff line number Diff line change @@ -65,12 +65,12 @@ class Profiler
65
65
const d = 100 ;
66
66
67
67
/**
68
- * @deprecated This constant will be removed in version 1.0.0
68
+ * @deprecated This constant will be removed in version 1.0.0 without replacement
69
69
*/
70
70
const KEYWORD_PHRASE = false ;
71
71
72
72
/**
73
- * @deprecated It's awesome - This constant will be removed in version 1.0.0
73
+ * @deprecated It's awesome - This constant will be removed in version 1.0.0 without replacement
74
74
*/
75
75
const WITH_KEYWORD_PHRASE = false ;
76
76
}
You can’t perform that action at this time.
0 commit comments