Skip to content
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

Mark classes as final #437

Merged
merged 1 commit into from
Oct 9, 2020
Merged
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
6 changes: 3 additions & 3 deletions src/Admin/FieldDescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

use Sonata\AdminBundle\Admin\BaseFieldDescription;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class FieldDescription extends BaseFieldDescription
{
public function __construct()
Expand Down Expand Up @@ -52,9 +55,6 @@ public function getTargetEntity()
return $this->getTargetModel();
}

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.4.
*/
public function getTargetModel(): ?string
{
if ($this->associationMapping) {
Expand Down
3 changes: 3 additions & 0 deletions src/Builder/DatagridBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\FormFactoryInterface;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class DatagridBuilder implements DatagridBuilderInterface
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Builder/FormContractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\FormFactoryInterface;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class FormContractor implements FormContractorInterface
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Builder/ListBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
use Sonata\AdminBundle\Builder\ListBuilderInterface;
use Sonata\AdminBundle\Guesser\TypeGuesserInterface;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class ListBuilder implements ListBuilderInterface
{
protected $guesser;
Expand Down
3 changes: 3 additions & 0 deletions src/Builder/ShowBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
use Sonata\AdminBundle\Builder\ShowBuilderInterface;
use Sonata\AdminBundle\Guesser\TypeGuesserInterface;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class ShowBuilder implements ShowBuilderInterface
{
protected $guesser;
Expand Down
2 changes: 2 additions & 0 deletions src/Datagrid/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*
* @author Jonathan H. Wage <[email protected]>
* @author Kévin Dunglas <[email protected]>
*
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class Pager extends BasePager
{
Expand Down
2 changes: 2 additions & 0 deletions src/Datagrid/ProxyQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

/**
* This class try to unify the query usage with Doctrine.
*
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class ProxyQuery implements ProxyQueryInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyInjection/Compiler/AddGuesserCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

/**
* @author Thomas Rabaix <[email protected]>
*
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class AddGuesserCompilerPass implements CompilerPassInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyInjection/Compiler/AddTemplatesCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

/**
* @author Thomas Rabaix <[email protected]>
*
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class AddTemplatesCompilerPass implements CompilerPassInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* sections are normalized, and merged.
*
* @author Michael Williams <[email protected]>
*
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class Configuration implements ConfigurationInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
/**
* @author Thomas Rabaix <[email protected]>
* @author Michael Williams <[email protected]>
*
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class SonataDoctrineMongoDBAdminExtension extends AbstractSonataAdminExtension
{
Expand Down
3 changes: 3 additions & 0 deletions src/Filter/BooleanFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Sonata\Form\Type\BooleanType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class BooleanFilter extends Filter
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Filter/CallbackFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\TextType;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class CallbackFilter extends Filter
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Filter/ChoiceFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Sonata\AdminBundle\Form\Type\Filter\DefaultType;
use Sonata\AdminBundle\Form\Type\Operator\ContainsOperatorType;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class ChoiceFilter extends Filter
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Filter/DateFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;
use Symfony\Component\Form\Extension\Core\Type\DateType;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class DateFilter extends AbstractDateFilter
{
public function getFieldType(): string
Expand Down
3 changes: 3 additions & 0 deletions src/Filter/DateTimeFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class DateTimeFilter extends AbstractDateFilter
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Filter/ModelFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
use Sonata\AdminBundle\Form\Type\Filter\DefaultType;
use Sonata\AdminBundle\Form\Type\Operator\EqualOperatorType;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class ModelFilter extends Filter
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Filter/NumberFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Sonata\AdminBundle\Form\Type\Filter\NumberType;
use Sonata\AdminBundle\Form\Type\Operator\NumberOperatorType;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class NumberFilter extends Filter
{
private const CHOICES = [
Expand Down
3 changes: 3 additions & 0 deletions src/Filter/StringFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Sonata\AdminBundle\Form\Type\Filter\ChoiceType;
use Sonata\AdminBundle\Form\Type\Operator\ContainsOperatorType;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class StringFilter extends Filter
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Guesser/FilterTypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
use Symfony\Component\Form\Guess\Guess;
use Symfony\Component\Form\Guess\TypeGuess;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class FilterTypeGuesser extends AbstractTypeGuesser
{
public function guessType($class, $property, ModelManagerInterface $modelManager)
Expand Down
3 changes: 3 additions & 0 deletions src/Guesser/TypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
use Symfony\Component\Form\Guess\Guess;
use Symfony\Component\Form\Guess\TypeGuess;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class TypeGuesser extends AbstractTypeGuesser
{
public function guessType($class, $property, ModelManagerInterface $modelManager)
Expand Down
6 changes: 1 addition & 5 deletions src/Model/MissingPropertyMetadataException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@
*/
final class MissingPropertyMetadataException extends \LogicException
{
/**
* @param string $class
* @param string $property
*/
public function __construct($class, $property)
public function __construct(string $class, string $property)
{
parent::__construct(sprintf(
'No metadata found for property `%s::$%s`.'
Expand Down
3 changes: 3 additions & 0 deletions src/Model/ModelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class ModelManager implements ModelManagerInterface
{
public const ID_SEPARATOR = '-';
Expand Down
3 changes: 3 additions & 0 deletions src/SonataDoctrineMongoDBAdminBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class SonataDoctrineMongoDBAdminBundle extends Bundle
{
public function build(ContainerBuilder $container)
Expand Down
3 changes: 3 additions & 0 deletions src/Util/ObjectAclManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;

/**
* @final since sonata-project/doctrine-mongodb-admin-bundle 3.x.
*/
class ObjectAclManipulator extends BaseObjectAclManipulator
{
/**
Expand Down