8000 Adding more return types in the `ContactManagerInterface` by mamazu · Pull Request #7779 · sulu/sulu · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Adding more return types in the ContactManagerInterface #7779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 2.6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 0 additions & 180 deletions phpstan-baseline.neon
8000
Original file line number Diff line number Diff line change
Expand Up @@ -12918,24 +12918,12 @@ parameters:
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:addFax\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:addFax\(\) has parameter \$faxData with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:addNewContactRelations\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:addNewContactRelations\(\) has parameter \$data with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand All @@ -12954,12 +12942,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:addSocialMediaProfile\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:addSocialMediaProfile\(\) has parameter \$socialMediaProfileData with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand All @@ -12972,12 +12954,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:checkAndSetMainAddress\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:compareData\(\) has parameter \$entities with no value type specified in iterable type Traversable\.$#'
identifier: missingType.iterableValue
Expand Down Expand Up @@ -13020,72 +12996,12 @@ parameters:
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:deleteAddresses\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:deleteAllEntitiesOfCollection\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:deleteAllEntitiesOfCollection\(\) has parameter \$arrayCollection with generic interface Doctrine\\Common\\Collections\\Collection but does not specify its types\: TKey, T$#'
identifier: missingType.generics
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:deleteAllRelations\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:deleteEmails\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:deleteFaxes\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:deleteNotes\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:deletePhones\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:deleteSocialMediaProfiles\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:deleteUrls\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:findMatchByCallback\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:findMatchByCallback\(\) has parameter \$entity with no value type specified in iterable type Traversable\.$#'
identifier: missingType.iterableValue
Expand All @@ -13104,12 +13020,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:getAddressByCondition\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:getAddressTypeByName\(\) should return Sulu\\Bundle\\ContactBundle\\Entity\\AddressType but returns mixed\.$#'
identifier: return.type
Expand Down Expand Up @@ -13272,36 +13182,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:setMainEmail\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:setMainFax\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:setMainForCollection\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:setMainPhone\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:setMainUrl\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AbstractContactManager\:\:updateAddress\(\) never assigns null to &\$isMain so it can be removed from the by\-ref type\.$#'
identifier: parameterByRef.unusedType
Expand Down Expand Up @@ -14028,18 +13908,6 @@ parameters:
count: 2
path: src/Sulu/Bundle/ContactBundle/Contact/AccountManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AccountManager\:\:deleteAllRelations\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AccountManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AccountManager\:\:deleteBankAccounts\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/AccountManager.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\AccountManager\:\:findAll\(\) return type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand Down Expand Up @@ -14592,48 +14460,12 @@ parameters:
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/ContactManagerInterface.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\ContactManagerInterface\:\:removeAddressRelation\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/ContactManagerInterface.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\ContactManagerInterface\:\:setMainEmail\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/ContactManagerInterface.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\ContactManagerInterface\:\:setMainFax\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/ContactManagerInterface.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\ContactManagerInterface\:\:setMainForCollection\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/ContactManagerInterface.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\ContactManagerInterface\:\:setMainForCollection\(\) has parameter \$arrayCollection with generic interface Doctrine\\Common\\Collections\\Collection but does not specify its types\: TKey, T$#'
identifier: missingType.generics
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/ContactManagerInterface.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\ContactManagerInterface\:\:setMainPhone\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/ContactManagerInterface.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\ContactManagerInterface\:\:setMainUrl\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/ContactBundle/Contact/ContactManagerInterface.php

-
message: '#^Method Sulu\\Bundle\\ContactBundle\\Contact\\ContactManagerInterface\:\:unsetMain\(\) has parameter \$arrayCollection with generic interface Doctrine\\Common\\Collections\\Collection but does not specify its types\: TKey, T$#'
identifier: missingType.generics
Expand Down Expand Up @@ -56418,12 +56250,6 @@ parameters:
count: 1
path: src/Sulu/Bundle/SecurityBundle/UserManager/UserManager.php

-
message: '#^Method Sulu\\Bundle\\SecurityBundle\\UserManager\\UserManager\:\:findMatchByCallback\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Bundle/SecurityBundle/UserManager/UserManager.php

-
message: '#^Method Sulu\\Bundle\\SecurityBundle\\UserManager\\UserManager\:\:findMatchByCallback\(\) has parameter \$entity with no value type specified in iterable type Traversable\.$#'
identifier: missingType.iterableValue
Expand Down Expand Up @@ -89850,12 +89676,6 @@ parameters:
count: 1
path: src/Sulu/Component/Rest/RestHelper.php

-
message: '#^Method Sulu\\Component\\Rest\\RestHelper\:\:findMatchByCallback\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/Sulu/Component/Rest/RestHelper.php

-
message: '#^Method Sulu\\Component\\Rest\\RestHelper\:\:findMatchByCallback\(\) has parameter \$entity with no value type specified in iterable type Traversable\.$#'
identifier: missingType.iterableValue
Expand Down
28 changes: 28 additions & 0 deletions src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ public function getEmailTypeByName($name)
* clears all relational data from entity and deletes it.
*
* @param DoctrineEntity $entity
*
* @return void
*/
public function deleteAllRelations($entity)
{
Expand All @@ -362,6 +364,8 @@ public function deleteAllRelations($entity)
* deletes all notes that are assigned to entity.
*
* @param DoctrineEntity $entity
*
* @return void
*/
public function deleteNotes($entity)
{
Expand All @@ -374,6 +378,8 @@ public function deleteNotes($entity)
* deletes all phones that are assigned to entity.
*
* @param DoctrineEntity $entity
*
* @return void
*/
public function deletePhones($entity)
{
Expand All @@ -386,6 +392,8 @@ public function deletePhones($entity)
* deletes all faxes that are assigned to entity.
*
* @param DoctrineEntity $entity
*
* @return void
*/
public function deleteFaxes($entity)
{
Expand All @@ -398,6 +406,8 @@ public function deleteFaxes($entity)
* Deletes all social media profiles that are assigned to entity.
*
* @param DoctrineEntity $entity
*
* @return void
*/
public function deleteSocialMediaProfiles($entity)
{
Expand All @@ -410,6 +420,8 @@ public function deleteSocialMediaProfiles($entity)
* deletes all urls that are assigned to entity.
*
* @param DoctrineEntity $entity
*
* @return void
*/
public function deleteUrls($entity)
{
Expand All @@ -422,6 +434,8 @@ public function deleteUrls($entity)
* deletes all addresses that are assigned to entity.
*
* @param DoctrineEntity $entity
*
* @return void
*/
public function deleteAddresses($entity)
{
Expand All @@ -438,6 +452,8 @@ public function deleteAddresses($entity)
* deletes all emails that are assigned to entity.
*
* @param DoctrineEntity $entity
*
* @return void
*/
public function deleteEmails($entity)
{
Expand All @@ -448,6 +464,8 @@ public function deleteEmails($entity)

/**
* @param Collection $arrayCollection
*
* @return void
*/
protected function deleteAllEntitiesOfCollection($arrayCollection)
{
Expand Down Expand Up @@ -535,6 +553,8 @@ private function getAddresses($entity)
* @param DoctrineEntity $entity
* @param bool $force Forces function to return an address if any address is defined
* if no delivery address is defined it will first return the main address then any
*
* @return Address|null
*/
public function getAddressByCondition($entity, callable $conditionCallback, $force = false)
{
Expand Down Expand Up @@ -568,6 +588,8 @@ public function getAddressByCondition($entity, callable $conditionCallback, $for
*
* @param DoctrineEntity $contact
* @param array $data
*
* @return void
*/
public function addNewContactRelations($contact, $data)
{
Expand Down Expand Up @@ -1066,6 +1088,8 @@ public function processFaxes($contact, $faxes)
* @param DoctrineEntity $contact
* @param array $faxData
*
* @return void
*
* @throws EntityIdAlreadySetException
* @throws EntityNotFoundException
*/
Expand Down Expand Up @@ -1165,6 +1189,8 @@ public function processSocialMediaProfiles($contact, $socialMediaProfiles)
* @param DoctrineEntity $contact
* @param array $socialMediaProfileData
*
* @return void
*
* @throws EntityIdAlreadySetException
* @throws EntityNotFoundException
*/
Expand Down Expand Up @@ -1719,6 +1745,8 @@ public function processAddresses($contact, $addresses)
* Sets main address.
*
* @param Collection<int, AddressRelationEntity> $addresses
*
* @return void
*/
protected function checkAndSetMainAddress($addresses)
{
Expand Down
Loading
Loading
0