@@ -46,11 +46,11 @@ public function has(PermissionableEntityInterface $entity): bool {
4646 * Adds an instance of PermissionableEntityInterface to an instance of this class
4747 *
4848 * @param PermissionableEntityInterface $permissionEntity
49- * @psalm-suppress MethodSignatureMismatch
5049 *
50+ * @noRector \Rector\TypeDeclaration\Rector\FunctionLike\ReturnTypeDeclarationRector
5151 * @return $this
5252 */
53- public function add (PermissionableEntityInterface $ permissionEntity ): self {
53+ public function add (PermissionableEntityInterface $ permissionEntity ): PermissionableEntitiesCollectionInterface {
5454
5555 if ( !$ this ->has ($ permissionEntity ) ) {
5656
@@ -87,11 +87,11 @@ public function getKey(PermissionableEntityInterface $entity) {
8787 * Removes an instance of PermissionableEntityInterface from an instance of this class.
8888 *
8989 * @param PermissionableEntityInterface $permissionEntity
90- * @psalm-suppress MethodSignatureMismatch
9190 *
91+ * @noRector \Rector\TypeDeclaration\Rector\FunctionLike\ReturnTypeDeclarationRector
9292 * @return $this
9393 */
94- public function remove (PermissionableEntityInterface $ permissionEntity ): self {
94+ public function remove (PermissionableEntityInterface $ permissionEntity ): PermissionableEntitiesCollectionInterface {
9595
9696 $ key = $ this ->getKey ($ permissionEntity );
9797
@@ -105,11 +105,10 @@ public function remove(PermissionableEntityInterface $permissionEntity): self {
105105 /**
106106 * Remove all items in the collection and return $this
107107 *
108- * @psalm-suppress MethodSignatureMismatch
109- *
108+ * @noRector \Rector\TypeDeclaration\Rector\FunctionLike\ReturnTypeDeclarationRector
110109 * @return $this
111110 */
112- public function removeAll (): self {
111+ public function removeAll (): PermissionableEntitiesCollectionInterface {
113112
114113 $ this ->storage = [];
115114
@@ -121,10 +120,11 @@ public function removeAll(): self {
121120 *
122121 * @param PermissionableEntityInterface $permissionEntity
123122 * @param string $key specified key for $permissionEntity in the collection
124- * @psalm-suppress MethodSignatureMismatch
123+ *
124+ * @noRector \Rector\TypeDeclaration\Rector\FunctionLike\ReturnTypeDeclarationRector
125125 * @return $this
126126 */
127- public function put (PermissionableEntityInterface $ permissionEntity , string $ key ): self {
127+ public function put (PermissionableEntityInterface $ permissionEntity , string $ key ): PermissionableEntitiesCollectionInterface {
128128
129129 $ this ->storage [$ key ] = $ permissionEntity ;
130130
@@ -160,11 +160,10 @@ public function get(string $key): ?PermissionableEntityInterface {
160160 * considered to be respectively less than, equal to,
161161 * or greater than the second.
162162 *
163- * @psalm-suppress MethodSignatureMismatch
164- *
163+ * @noRector \Rector\TypeDeclaration\Rector\FunctionLike\ReturnTypeDeclarationRector
165164 * @return $this
166165 */
167- public function sort (callable $ comparator = null ): self {
166+ public function sort (callable $ comparator = null ): PermissionableEntitiesCollectionInterface {
168167
169168 if ( $ comparator === null ) {
170169
0 commit comments