Skip to content

Commit

Permalink
Merge pull request #7290 from CarsonF/bugfix/concrete-reference
Browse files Browse the repository at this point in the history
Fix reference to concrete Slugify instead of its interface
  • Loading branch information
GwendolenLynch committed Jan 9, 2018
2 parents 5187ec4 + b84530e commit 9d4c51d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/Storage/ContentRequest/Save.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Bolt\Users;
use Carbon\Carbon;
use Cocur\Slugify\Slugify;
use Cocur\Slugify\SlugifyInterface;
use Psr\Log\LoggerInterface;
use RecursiveArrayIterator;
use RecursiveIteratorIterator;
Expand Down Expand Up @@ -44,7 +45,7 @@ class Save
protected $loggerFlash;
/** @var UrlGeneratorInterface */
protected $urlGenerator;
/** @var Slugify */
/** @var SlugifyInterface */
private $slugify;

/**
Expand All @@ -57,7 +58,7 @@ class Save
* @param LoggerInterface $loggerSystem
* @param FlashLoggerInterface $loggerFlash
* @param UrlGeneratorInterface $urlGenerator
* @param Slugify $slugify
* @param SlugifyInterface $slugify
*/
public function __construct(
EntityManager $em,
Expand All @@ -67,7 +68,7 @@ public function __construct(
LoggerInterface $loggerSystem,
FlashLoggerInterface $loggerFlash,
UrlGeneratorInterface $urlGenerator,
Slugify $slugify = null
SlugifyInterface $slugify = null
) {
$this->em = $em;
$this->config = $config;
Expand Down
10 changes: 5 additions & 5 deletions src/Twig/Runtime/TextRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Bolt\Common\Exception\ParseException;
use Bolt\Common\Json;
use Bolt\Helpers\Str;
use Cocur\Slugify\Slugify;
use Cocur\Slugify\SlugifyInterface;
use Psr\Log\LoggerInterface;

/**
Expand All @@ -17,16 +17,16 @@ class TextRuntime
{
/** @var LoggerInterface */
private $systemLogger;
/** @var Slugify */
/** @var SlugifyInterface */
private $slugify;

/**
* Constructor.
*
* @param LoggerInterface $systemLogger
* @param Slugify $slugify
* @param LoggerInterface $systemLogger
* @param SlugifyInterface $slugify
*/
public function __construct(LoggerInterface $systemLogger, Slugify $slugify)
public function __construct(LoggerInterface $systemLogger, SlugifyInterface $slugify)
{
$this->systemLogger = $systemLogger;
$this->slugify = $slugify;
Expand Down

0 comments on commit 9d4c51d

Please sign in to comment.