[TOOLS] Fix all issues found by PHPStan level 2
This commit is contained in:
@@ -2,12 +2,13 @@
|
||||
|
||||
namespace Plugin\ActivityStreamsTwo\Util\Model\EntityToType;
|
||||
|
||||
use App\Core\Entity;
|
||||
use Plugin\ActivityStreamsTwo\Util\Type;
|
||||
|
||||
abstract class EntityToType
|
||||
{
|
||||
/**
|
||||
* @param $entity
|
||||
* @param Entity $entity
|
||||
*
|
||||
* @throws \Exception
|
||||
*
|
||||
@@ -25,4 +26,4 @@ abstract class EntityToType
|
||||
return Type::create($map);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ use Plugin\ActivityStreamsTwo\Util\Type;
|
||||
class NoteToType
|
||||
{
|
||||
/**
|
||||
* @param $entity
|
||||
* @param Note $note
|
||||
*
|
||||
* @throws \Exception
|
||||
*
|
||||
@@ -30,4 +30,4 @@ class NoteToType
|
||||
];
|
||||
return Type::create(type: 'Note', attributes: $attr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -7,8 +7,10 @@ use Plugin\ActivityStreamsTwo\Util\Model\EntityToType\EntityToType;
|
||||
abstract class AbstractResponse
|
||||
{
|
||||
/**
|
||||
* @param Type $type
|
||||
* @param int $status The response status code
|
||||
* param Type $type // What is this `Type`
|
||||
*
|
||||
* @param int $status The response status code
|
||||
* @param mixed $type
|
||||
*
|
||||
* @throws \Exception
|
||||
*
|
||||
@@ -21,4 +23,4 @@ abstract class AbstractResponse
|
||||
status: $status
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -7,8 +7,10 @@ use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
class TypeResponse extends JsonResponse
|
||||
{
|
||||
/**
|
||||
* @param Type $data
|
||||
* @param int $status The response status code
|
||||
* param Type $data // what `Type` is this?
|
||||
*
|
||||
* @param int $status The response status code
|
||||
* @param null|mixed $data
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -137,7 +137,6 @@ abstract class AbstractObject
|
||||
* Checks that property exists
|
||||
*
|
||||
* @param string $name
|
||||
* @param bool $strict
|
||||
*
|
||||
* @throws Exception
|
||||
*
|
||||
|
@@ -27,7 +27,7 @@ abstract class AbstractActivity extends ObjectType
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected string $id;
|
||||
public string $id;
|
||||
|
||||
/**
|
||||
* Describes one or more entities that either performed or are
|
||||
|
@@ -30,7 +30,7 @@ class Collection extends ObjectType
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected string $id;
|
||||
public string $id;
|
||||
|
||||
/**
|
||||
* A non-negative integer specifying the total number of objects
|
||||
|
@@ -29,7 +29,7 @@ class CollectionPage extends Collection
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected string $id;
|
||||
public string $id;
|
||||
|
||||
/**
|
||||
* Identifies the Collection to which CollectionPage objects items
|
||||
|
@@ -34,7 +34,7 @@ class ObjectType extends AbstractObject
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected string $id;
|
||||
public string $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
@@ -22,7 +22,7 @@ abstract class Validator
|
||||
/**
|
||||
* Contains all custom validators
|
||||
*
|
||||
* @var array<string,string>
|
||||
* @var array<string, ValidatorInterface>
|
||||
*
|
||||
* [ 'attributeName' => CustomValidatorClassName::class ]
|
||||
*/
|
||||
|
Reference in New Issue
Block a user