File tree Expand file tree Collapse file tree 6 files changed +14
-12
lines changed Expand file tree Collapse file tree 6 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 1414class PHPDocFormattingValidator
1515{
1616 private const REMOVED_IN_VERSION = 'removed in version ' ;
17+ private const WITHOUT_REPLACEMENT = 'without replacement ' ;
1718
1819 /**
1920 * Finds matching PHPDoc for current pointer
@@ -125,10 +126,11 @@ public function hasDeprecatedWellFormatted($commentStartPtr, $tokens)
125126 }
126127 $ seePtr = $ this ->getTagPosition ('@see ' , $ commentStartPtr , $ tokens );
127128 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 ;
130132 }
131- return true ;
133+ return false ;
132134 }
133135
134136 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
373373 /**
374374 * This deprecated function is correct even though it only contains the @deprecated tag.
375375 *
376- * @deprecated It will be removed in version 1.0.0
376+ * @deprecated It will be removed in version 1.0.0 without replacement
377377 */
378378 public function correctBecauseOfKeywordPhrase ()
379379 {
@@ -383,7 +383,7 @@ class MethodAnnotationFixture
383383 /**
384384 * This deprecated function is correct even though it only contains the @deprecated tag.
385385 *
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
387387 */
388388 public function alsoCorrectBecauseOfKeywordPhrase ()
389389 {
Original file line number Diff line number Diff line change @@ -164,15 +164,15 @@ class OldHandler
164164}
165165
166166/**
167- * @deprecated It will be removed in version 1.0.0
167+ * @deprecated It will be removed in version 1.0.0 without replacement
168168 */
169169class DeprecatedButHandler
170170{
171171
172172}
173173
174174/**
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
176176 */
177177class AlsoDeprecatedButHandler
178178{
Original file line number Diff line number Diff line change @@ -155,15 +155,15 @@ interface DoNotCareHandler
155155}
156156
157157/**
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
159159 */
160160interface DeprecatedButHandler
161161{
162162
163163}
164164
165165/**
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
167167 */
168168interface AlsoDeprecatedButHandler
169169{
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ class correctlyFormattedClassMemberDocBlock
197197
198198 /**
199199 * @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
201201 */
202202 protected string $ deprecatedWithKeyword ;
203203}
Original file line number Diff line number Diff line change @@ -65,12 +65,12 @@ class Profiler
6565 const d = 100 ;
6666
6767 /**
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
6969 */
7070 const KEYWORD_PHRASE = false ;
7171
7272 /**
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
7474 */
7575 const WITH_KEYWORD_PHRASE = false ;
7676}
You can’t perform that action at this time.
0 commit comments