for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Everlution\Navigation;
/**
* Class ContainerAlreadyRegisteredException.
*
* @author Ivan Barlog <[email protected]>
*/
class ContainerAlreadyRegisteredException extends \Exception
{
public function __construct(string $name)
parent::__construct("Container '$name' has been already registered.");
sprintf
$name
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.