Skip to content

Commit

Permalink
Removed most of the typed properties to avoid breaking changes.
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Johansson <datasage@gmail.com>
  • Loading branch information
datasage committed Apr 26, 2024
1 parent 01ee6df commit 3f9d487
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 39 deletions.
41 changes: 4 additions & 37 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,9 @@
<MixedReturnStatement>
<code><![CDATA[$this->problemStatusTitles[$this->status]]]></code>
</MixedReturnStatement>
<PossiblyNullPropertyAssignmentValue>
<code>$title</code>
</PossiblyNullPropertyAssignmentValue>
<RedundantCastGivenDocblockType>
<code>(bool) $flag</code>
</RedundantCastGivenDocblockType>
<RedundantConditionGivenDocblockType>
<code><![CDATA[null !== $this->title]]></code>
</RedundantConditionGivenDocblockType>
<RiskyTruthyFalsyComparison>
<code>$status</code>
</RiskyTruthyFalsyComparison>
Expand Down Expand Up @@ -326,17 +320,6 @@
</file>
<file src="test/Listener/RenderErrorListenerTest.php">
<MixedArgument>
<code>$content</code>
<code>$content</code>
<code>$content</code>
<code>$content</code>
<code>$content</code>
<code>$content</code>
<code>$content</code>
<code>$content</code>
<code>$content</code>
<code>$content</code>
<code>$content</code>
<code>$content</code>
<code>$content</code>
<code>$content</code>
Expand All @@ -348,22 +331,6 @@
<code><![CDATA[$response->getContent()]]></code>
<code><![CDATA[$response->getContent()]]></code>
</MixedArgument>
<MixedArrayAccess>
<code><![CDATA[$content['describedBy']]]></code>
<code><![CDATA[$content['describedBy']]]></code>
<code><![CDATA[$content['describedBy']]]></code>
<code><![CDATA[$content['detail']]]></code>
<code><![CDATA[$content['detail']]]></code>
<code><![CDATA[$content['detail']]]></code>
<code><![CDATA[$content['details']]]></code>
<code><![CDATA[$content['details']]]></code>
<code><![CDATA[$content['status']]]></code>
<code><![CDATA[$content['status']]]></code>
<code><![CDATA[$content['status']]]></code>
<code><![CDATA[$content['title']]]></code>
<code><![CDATA[$content['title']]]></code>
<code><![CDATA[$content['title']]]></code>
</MixedArrayAccess>
<MixedAssignment>
<code>$content</code>
<code>$content</code>
Expand Down Expand Up @@ -395,14 +362,17 @@
<MixedArrayAccess>
<code><![CDATA[$data['detail']]]></code>
<code><![CDATA[$data['detail']]]></code>
<code><![CDATA[$data['trace']]]></code>
</MixedArrayAccess>
<MixedAssignment>
<code>$data</code>
<code>$data</code>
</MixedAssignment>
</file>
<file src="test/ModuleTest.php">
<DeprecatedMethod>
<code>getMockForAbstractClass</code>
<code>returnCallback</code>
</DeprecatedMethod>
<UndefinedMethod>
<code>setSharedManager</code>
</UndefinedMethod>
Expand All @@ -411,9 +381,6 @@
<MixedArgument>
<code>$test</code>
</MixedArgument>
<MixedArrayAccess>
<code><![CDATA[$test['trace']]]></code>
</MixedArrayAccess>
<MixedAssignment>
<code>$test</code>
</MixedAssignment>
Expand Down
8 changes: 6 additions & 2 deletions src/ApiProblem.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ class ApiProblem

/**
* Normalized property names for overloading.
*
* @var array
*/
protected array $normalizedProperties = [
protected $normalizedProperties = [
'type' => 'type',
'status' => 'status',
'title' => 'title',
Expand All @@ -78,8 +80,10 @@ class ApiProblem

/**
* Status titles for common problems.
*
* @var array
*/
protected array $problemStatusTitles = [
protected $problemStatusTitles = [
// CLIENT ERROR
400 => 'Bad Request',
401 => 'Unauthorized',
Expand Down

0 comments on commit 3f9d487

Please sign in to comment.