Skip to content

Commit

Permalink
Deprecate Setters & Getters for ToNull
Browse files Browse the repository at this point in the history
Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Sep 5, 2024
1 parent c1ce22e commit 515af51
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1431,6 +1431,10 @@
<DeprecatedClass>
<code><![CDATA[AbstractFilter]]></code>
</DeprecatedClass>
<DeprecatedMethod>
<code><![CDATA[getType]]></code>
<code><![CDATA[setType]]></code>
</DeprecatedMethod>
<DocblockTypeContradiction>
<code><![CDATA[$typeOrOptions === '']]></code>
<code><![CDATA[$typeOrOptions === '']]></code>
Expand Down Expand Up @@ -2054,6 +2058,13 @@
<ArgumentTypeCoercion>
<code><![CDATA[$type]]></code>
</ArgumentTypeCoercion>
<DeprecatedMethod>
<code><![CDATA[getType]]></code>
<code><![CDATA[getType]]></code>
<code><![CDATA[getType]]></code>
<code><![CDATA[getType]]></code>
<code><![CDATA[setType]]></code>
</DeprecatedMethod>
<InvalidArgument>
<code><![CDATA[true]]></code>
</InvalidArgument>
Expand Down
6 changes: 5 additions & 1 deletion src/ToNull.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ public function __construct($typeOrOptions = null)
/**
* Set boolean types
*
* @deprecated Since 2.38.0 All option setters and getters will be removed in version 3.0
*
* @param int-mask-of<self::TYPE_*>|value-of<self::CONSTANTS>|list<self::TYPE_*>|null $type
* @throws Exception\InvalidArgumentException
* @return self
* @throws Exception\InvalidArgumentException
*/
public function setType($type = null)
{
Expand Down Expand Up @@ -117,6 +119,8 @@ public function setType($type = null)
/**
* Returns defined boolean types
*
* @deprecated Since 2.38.0 All option setters and getters will be removed in version 3.0
*
* @return int-mask-of<self::TYPE_*>
*/
public function getType()
Expand Down

0 comments on commit 515af51

Please sign in to comment.