Skip to content

Commit

Permalink
Merge branch '5.5' into 5.6
Browse files Browse the repository at this point in the history
* 5.5:
  Apply new symfony preset fixer "phpdoc_types_null_last"
  Update styleci config for changes in symfony preset
  [AdminBundle] Manually register the twig KunstmaanAdminBundle override directory
  • Loading branch information
acrobat committed Aug 7, 2020
2 parents c832a0b + 024385d commit 6665aae
Show file tree
Hide file tree
Showing 41 changed files with 65 additions and 64 deletions.
6 changes: 2 additions & 4 deletions .styleci.yml
Expand Up @@ -5,10 +5,8 @@ disabled:
- yoda_style
- concat_without_spaces
- phpdoc_summary
- const_separation
- method_argument_space_strict
enabled:
- method_argument_space
- no_superfluous_phpdoc_tags_symfony
- short_array_syntax

finder:
exclude:
Expand Down
Expand Up @@ -116,6 +116,10 @@ public function prepend(ContainerBuilder $container)
$fosUserConfig['service']['mailer'] = 'fos_user.mailer.twig_swift';
$container->prependExtensionConfig('fos_user', $fosUserConfig);

// Manually register the KunstmaanAdminBundle folder as a FosUser override for symfony 4.
if ($container->hasParameter('kernel.project_dir') && file_exists($container->getParameter('kernel.project_dir').'/templates/bundles/KunstmaanAdminBundle')) {
$twigConfig['paths'][] = ['value' => '%kernel.project_dir%/templates/bundles/KunstmaanAdminBundle', 'namespace' => 'FOSUser'];
}
$twigConfig['paths'][] = ['value' => \dirname(__DIR__).'/Resources/views', 'namespace' => 'FOSUser'];
$container->prependExtensionConfig('twig', $twigConfig);

Expand Down
2 changes: 1 addition & 1 deletion src/Kunstmaan/AdminBundle/Helper/DomainConfiguration.php
Expand Up @@ -141,7 +141,7 @@ public function getLocalesExtraData()
}

/**
* @return null|\Symfony\Component\HttpFoundation\Request
* @return \Symfony\Component\HttpFoundation\Request|null
*/
protected function getMasterRequest()
{
Expand Down
Expand Up @@ -117,7 +117,7 @@ private function generateIdentifier(TabInterface $tab)

/**
* @param TabInterface $tab The tab
* @param null|int $position The position
* @param int|null $position The position
*
* @return TabPane
*/
Expand Down
Expand Up @@ -249,7 +249,7 @@ public function getAllowedEntityIds(PermissionDefinition $permissionDef)
}

/**
* @return null|TokenStorageInterface
* @return TokenStorageInterface|null
*/
public function getTokenStorage()
{
Expand Down
Expand Up @@ -146,7 +146,7 @@ public function apply(QueryBuilder $queryBuilder, PermissionDefinition $permissi
}

/**
* @return null|TokenStorageInterface
* @return TokenStorageInterface|null
*/
public function getTokenStorage()
{
Expand Down
Expand Up @@ -57,7 +57,7 @@ public function getPattern()
/**
* Returns the code for the passed mask
*
* @param null|int $mask
* @param int|null $mask
*
* @throws InvalidArgumentException
* @throws \RuntimeException
Expand Down
Expand Up @@ -13,7 +13,7 @@ class AclChangesetRepository extends EntityRepository
/**
* Find a changeset with status RUNNING
*
* @return null|AclChangeset
* @return AclChangeset|null
*/
public function findRunningChangeset()
{
Expand All @@ -30,7 +30,7 @@ public function findRunningChangeset()
/**
* Fetch the oldest acl changeset for state NEW
*
* @return null|AclChangeset
* @return AclChangeset|null
*/
public function findNewChangeset()
{
Expand Down
Expand Up @@ -45,7 +45,7 @@ protected function setValidator($minDigits, $minUppercase, $minSpecialCharacters

/**
* @param string $password
* @param null|string $message
* @param string|null $message
* @param array $parameters
* @param null $code
*
Expand All @@ -58,7 +58,7 @@ public function testPasswordWithAllParametersSet($password, $message = null, arr

/**
* @param string $password
* @param null|string $message
* @param string|null $message
* @param array $parameters
* @param null $code
*
Expand All @@ -72,7 +72,7 @@ public function testPasswordToShortOnlySet($password, $message = null, array $pa

/**
* @param string $password
* @param null|string $message
* @param string|null $message
* @param array $parameters
* @param null $code
*
Expand All @@ -86,7 +86,7 @@ public function testPasswordToLongOnlySet($password, $message = null, array $par

/**
* @param string $password
* @param null|string $message
* @param string|null $message
* @param array $parameters
* @param null $code
*
Expand All @@ -100,7 +100,7 @@ public function testPasswordMinimumDigitsOnlySet($password, $message = null, arr

/**
* @param string $password
* @param null|string $message
* @param string|null $message
* @param array $parameters
* @param null $code
*
Expand All @@ -114,7 +114,7 @@ public function testPasswordMinimumUppercaseOnlySet($password, $message = null,

/**
* @param string $password
* @param null|string $message
* @param string|null $message
* @param array $parameters
* @param null $code
*
Expand All @@ -128,7 +128,7 @@ public function testPasswordMinimumSpecialCharactersOnlySet($password, $message

/**
* @param string $password
* @param null|string $message
* @param string|null $message
* @param array $parameters
* @param null $code
*
Expand All @@ -144,7 +144,7 @@ public function testPasswordLengthRangeSet($password, $message = null, array $pa
* Uses the set validator combined with data to assert.
*
* @param string $password
* @param null|string $message
* @param string|null $message
* @param array $parameters
* @param null $code
*/
Expand Down
Expand Up @@ -24,7 +24,7 @@ class SimpleBulkAction implements BulkActionInterface
private $label;

/**
* @var null|string
* @var string|null
*/
private $template;

Expand Down
4 changes: 2 additions & 2 deletions src/Kunstmaan/AdminListBundle/AdminList/Field.php
Expand Up @@ -25,12 +25,12 @@ class Field
private $sort;

/**
* @var null|string
* @var string|null
*/
private $template;

/**
* @var null|FieldAlias
* @var FieldAlias|null
*/
private $alias;

Expand Down
Expand Up @@ -10,12 +10,12 @@
abstract class AbstractFilterType implements FilterTypeInterface
{
/**
* @var null|string
* @var string|null
*/
protected $columnName;

/**
* @var null|string
* @var string|null
*/
protected $alias;

Expand Down
Expand Up @@ -24,7 +24,7 @@ class SimpleItemAction implements ItemActionInterface
private $label;

/**
* @var null|string
* @var string|null
*/
private $template;

Expand Down
Expand Up @@ -24,7 +24,7 @@ class SimpleListAction implements ListActionInterface
private $label;

/**
* @var null|string
* @var string|null
*/
private $template;

Expand Down
10 changes: 5 additions & 5 deletions src/Kunstmaan/AdminListBundle/Controller/AdminListController.php
Expand Up @@ -44,7 +44,7 @@ protected function getEntityManager()
* Shows the list of entities
*
* @param AbstractAdminListConfigurator $configurator
* @param null|Request $request
* @param Request|null $request
*
* @return Response
*/
Expand All @@ -69,7 +69,7 @@ protected function doIndexAction(AbstractAdminListConfigurator $configurator, Re
*
* @param AbstractAdminListConfigurator $configurator The adminlist configurator
* @param string $_format The format to export to
* @param null|Request $request
* @param Request|null $request
*
* @throws AccessDeniedHttpException
*
Expand All @@ -93,7 +93,7 @@ protected function doExportAction(AbstractAdminListConfigurator $configurator, $
*
* @param AbstractAdminListConfigurator $configurator The adminlist configurator
* @param string $type The type to add
* @param null|Request $request
* @param Request|null $request
*
* @throws AccessDeniedHttpException
*
Expand Down Expand Up @@ -188,7 +188,7 @@ protected function doAddAction(AbstractAdminListConfigurator $configurator, $typ
*
* @param AbstractAdminListConfigurator $configurator The adminlist configurator
* @param string $entityId The id of the entity that will be edited
* @param null|Request $request
* @param Request|null $request
*
* @throws NotFoundHttpException
* @throws AccessDeniedHttpException
Expand Down Expand Up @@ -342,7 +342,7 @@ protected function doViewAction(AbstractAdminListConfigurator $configurator, $en
*
* @param AbstractAdminListConfigurator $configurator The adminlist configurator
* @param int $entityId The id to delete
* @param null|Request $request
* @param Request|null $request
*
* @throws NotFoundHttpException
* @throws AccessDeniedHttpException
Expand Down
2 changes: 1 addition & 1 deletion src/Kunstmaan/DashboardBundle/Command/DashboardCommand.php
Expand Up @@ -44,7 +44,7 @@ protected function configure()
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|null|void
* @return int|void|null
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
Expand Down
Expand Up @@ -55,7 +55,7 @@ protected function configure()
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|null|void
* @return int|void|null
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
Expand Down
Expand Up @@ -48,7 +48,7 @@ protected function configure()
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|null|void
* @return int|void|null
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
Expand Down
Expand Up @@ -89,7 +89,7 @@ protected function configure()
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|null|void
* @return int|void|null
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
Expand Down
Expand Up @@ -51,7 +51,7 @@ protected function configure()
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|null|void
* @return int|void|null
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
Expand Down
Expand Up @@ -64,7 +64,7 @@ protected function configure()
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|null|void
* @return int|void|null
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
Expand Down
Expand Up @@ -63,7 +63,7 @@ protected function configure()
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|null|void
* @return int|void|null
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
Expand Down
Expand Up @@ -55,7 +55,7 @@ protected function configure()
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int|null|void
* @return int|void|null
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Kunstmaan/FixturesBundle/Parser/Property/Method.php
Expand Up @@ -125,7 +125,7 @@ private function findArguments($parameters, $additional)
* @param \ReflectionParameter $parameter
* @param $parameters
*
* @return null|object
* @return object|null
*/
private function typeHintChecker(\ReflectionParameter $parameter, $parameters)
{
Expand All @@ -149,7 +149,7 @@ private function typeHintChecker(\ReflectionParameter $parameter, $parameters)
* @param \ReflectionParameter $parameter
* @param $parameters
*
* @return null|mixed
* @return mixed|null
*/
private function getArgumentByName(\ReflectionParameter $parameter, $parameters)
{
Expand Down
Expand Up @@ -62,7 +62,7 @@ protected function configure()
*
* @throws \RuntimeException
*
* @return int|null|void
* @return int|void|null
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
Expand Down
Expand Up @@ -7,7 +7,7 @@
*/
final class Symfony4EntityRepositoryGenerator
{
protected static $_template =
private static $_template =
'<?php
namespace <namespace>;
Expand Down
Expand Up @@ -326,7 +326,7 @@ public function getHostBaseUrl($host = null)
/**
* @param string|null $host
*
* @return null|string
* @return string|null
*/
private function getRealHost($host = null)
{
Expand Down
Expand Up @@ -37,7 +37,7 @@ class DomainBasedLocaleRouter extends SlugRouter
* @param array $parameters The route parameters
* @param int|bool $referenceType The type of reference to be generated (one of the UrlGeneratorInterface constants)
*
* @return null|string
* @return string|null
*/
public function generate($name, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Kunstmaan/NodeBundle/Entity/NodeVersionLock.php
Expand Up @@ -112,7 +112,7 @@ public function getOwner()
*
* @return NodeVersionLock
*/
public function setNodeTranslation(\Kunstmaan\NodeBundle\Entity\NodeTranslation $nodeTranslation = null)
public function setNodeTranslation(NodeTranslation $nodeTranslation = null)
{
$this->nodeTranslation = $nodeTranslation;

Expand Down

0 comments on commit 6665aae

Please sign in to comment.