for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Tkotosz\CatalogRouter\Model\Service\UrlPathUsedChecker;
use Tkotosz\CatalogRouter\Api\ProductResolverInterface;
use Tkotosz\CatalogRouter\Api\UrlPathUsedChecker;
use Tkotosz\CatalogRouter\Model\UrlPath;
use Tkotosz\CatalogRouter\Model\EntityData;
class ProductUrlPathChecker implements UrlPathUsedChecker
{
/**
* @var ProductResolverInterface
*/
private $productResolver;
* @param ProductResolverInterface $productResolver
public function __construct(ProductResolverInterface $productResolver)
$this->productResolver = $productResolver;
}
* @param UrlPath $urlPath
* @param int $storeId
*
* @return EntityData[]
public function check(UrlPath $urlPath, int $storeId) : array
return $this->productResolver->resolveAllByUrlKey($urlPath->getLastPart(), $storeId);
resolveAllByUrlKey()
Tkotosz\CatalogRouter\Api\ProductResolverInterface
resolveByUrlKey()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.