Skip to content

Commit

Permalink
Drop unnesessary constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
wbloszyk authored and greg0ire committed May 8, 2020
1 parent 5b5115a commit 7dd12dd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Block/BlockContextManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function get($meta, array $settings = [])
*/
protected function setDefaultSettings(OptionsResolverInterface $optionsResolver, BlockInterface $block)
{
if (__CLASS__ !== \get_called_class()) {
if (__CLASS__ !== static::class) {
@trigger_error(
'The '.__METHOD__.' is deprecated since version 2.3, to be renamed in 4.0.'
.' Use '.__CLASS__.'::configureSettings instead.',
Expand Down
9 changes: 0 additions & 9 deletions src/Block/Service/AbstractAdminBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Sonata\BlockBundle\Meta\Metadata;
use Sonata\BlockBundle\Model\BlockInterface;
use Sonata\CoreBundle\Validator\ErrorElement;
use Symfony\Component\Templating\EngineInterface;

@trigger_error(
'The '.__NAMESPACE__.'\AbstractAdminBlockService class is deprecated since sonata-project/block-bundle 3.16 '.
Expand All @@ -32,14 +31,6 @@
*/
abstract class AbstractAdminBlockService extends AbstractBlockService implements AdminBlockServiceInterface
{
/**
* @param string $name
*/
public function __construct($name, EngineInterface $templating)
{
parent::__construct($name, $templating);
}

public function buildCreateForm(FormMapper $formMapper, BlockInterface $block)
{
$this->buildEditForm($formMapper, $block);
Expand Down
2 changes: 1 addition & 1 deletion src/Block/Service/AbstractBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ abstract class AbstractBlockService implements BlockServiceInterface
*
* @param Environment|EngineInterface|string $templatingOrDeprecatedName
*/
public function __construct($templatingOrDeprecatedName = null, EngineInterface $templating = null)
public function __construct($templatingOrDeprecatedName = null, ?EngineInterface $templating = null)
{
// $this->twig = $twig;
// NEXT_MAJOR: Uncomment the previous assignment and remove the following lines in this method.
Expand Down

0 comments on commit 7dd12dd

Please sign in to comment.