for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Everlution\Navigation\Url;
use Everlution\Navigation\Item\ItemInterface;
/**
* Class CannotProvideUrlForItemException.
*
* @author Ivan Barlog <[email protected]>
*/
class CannotProvideUrlForItemException extends \Exception
{
public function __construct(ItemInterface $item)
$class = get_class($item);
parent::__construct("No suitable url provider found for '$class' item.");
sprintf
$class
It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.
// Instead of $x = "foo $bar $baz"; // Better use either $x = "foo " . $bar . " " . $baz; $x = sprintf("foo %s %s", $bar, $baz);
}
It is generally a best practice as it is often more readable to use concatenation instead of interpolation for variables inside strings.