for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace ReliqArts\Docweaver\Exceptions;
use ReliqArts\Docweaver\Contracts\Exception as ExceptionContract;
class InvalidDirectory extends Exception
{
private const CODE = 4002;
/**
* @var null|string
*/
protected $directory;
* @param string $directory Directory
* @param ExceptionContract $previous Previous Exception if nested exception
$previous
null|ExceptionContract
This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.
@param
It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.
*
* @return ExceptionContract
public static function forDirectory(string $directory, ExceptionContract $previous = null): ExceptionContract
$message = sprintf('Invalid directory: `%s`.', $directory);
$self = new self($message, self::CODE, $previous);
$self->directory = $directory;
return $self;
}
* @return null|string
final public function getDirectory(): ?string
return $this->directory;
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.