diff --git a/src/ncc/Exceptions/ArchiveException.php b/src/ncc/Exceptions/ArchiveException.php index a7e7a22..065c445 100644 --- a/src/ncc/Exceptions/ArchiveException.php +++ b/src/ncc/Exceptions/ArchiveException.php @@ -8,6 +8,10 @@ class ArchiveException extends Exception { + /** + * @param string $message + * @param Throwable|null $previous + */ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::ArchiveException, $previous); diff --git a/src/ncc/Exceptions/AuthenticationException.php b/src/ncc/Exceptions/AuthenticationException.php index 29a927c..d8dd399 100644 --- a/src/ncc/Exceptions/AuthenticationException.php +++ b/src/ncc/Exceptions/AuthenticationException.php @@ -15,6 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::AuthenticationException, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/BuildConfigurationNotFoundException.php b/src/ncc/Exceptions/BuildConfigurationNotFoundException.php index 59d0e43..e12dd75 100644 --- a/src/ncc/Exceptions/BuildConfigurationNotFoundException.php +++ b/src/ncc/Exceptions/BuildConfigurationNotFoundException.php @@ -10,8 +10,6 @@ class BuildConfigurationNotFoundException extends Exception { - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -19,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::BuildConfigurationNotFoundException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/BuildException.php b/src/ncc/Exceptions/BuildException.php index 7fbb3d8..877f3a2 100644 --- a/src/ncc/Exceptions/BuildException.php +++ b/src/ncc/Exceptions/BuildException.php @@ -10,11 +10,6 @@ class BuildException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::BuildException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/ComponentChecksumException.php b/src/ncc/Exceptions/ComponentChecksumException.php index 68bb520..b8e193a 100644 --- a/src/ncc/Exceptions/ComponentChecksumException.php +++ b/src/ncc/Exceptions/ComponentChecksumException.php @@ -10,10 +10,6 @@ class ComponentChecksumException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; /** * @param string $message @@ -22,7 +18,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::ComponentChecksumException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/ComponentDecodeException.php b/src/ncc/Exceptions/ComponentDecodeException.php index 593255f..40012fd 100644 --- a/src/ncc/Exceptions/ComponentDecodeException.php +++ b/src/ncc/Exceptions/ComponentDecodeException.php @@ -10,11 +10,6 @@ class ComponentDecodeException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::ComponentDecodeException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/ComposerDisabledException.php b/src/ncc/Exceptions/ComposerDisabledException.php index 01c5be6..3538443 100644 --- a/src/ncc/Exceptions/ComposerDisabledException.php +++ b/src/ncc/Exceptions/ComposerDisabledException.php @@ -9,11 +9,6 @@ class ComposerDisabledException extends \Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -21,7 +16,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::ComposerDisabledException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/ComposerException.php b/src/ncc/Exceptions/ComposerException.php index 9e37388..8e6607b 100644 --- a/src/ncc/Exceptions/ComposerException.php +++ b/src/ncc/Exceptions/ComposerException.php @@ -10,11 +10,6 @@ class ComposerException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::ComposerException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/ComposerNotAvailableException.php b/src/ncc/Exceptions/ComposerNotAvailableException.php index 2fa1d4b..453de30 100644 --- a/src/ncc/Exceptions/ComposerNotAvailableException.php +++ b/src/ncc/Exceptions/ComposerNotAvailableException.php @@ -10,11 +10,6 @@ class ComposerNotAvailableException extends Exception { - /** - * @var null - */ - private $previous; - /** * @param string $message * @param $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", $previous = null) { parent::__construct($message, ExceptionCodes::ComposerNotAvailableException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/DirectoryNotFoundException.php b/src/ncc/Exceptions/DirectoryNotFoundException.php index cb6fe49..26308dd 100644 --- a/src/ncc/Exceptions/DirectoryNotFoundException.php +++ b/src/ncc/Exceptions/DirectoryNotFoundException.php @@ -17,6 +17,5 @@ public function __construct(string $path = "", ?Throwable $previous = null) { parent::__construct('The file \'' . realpath($path) . '\' was not found', ExceptionCodes::DirectoryNotFoundException, $previous); - $this->code = ExceptionCodes::DirectoryNotFoundException; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/ExecutionUnitNotFoundException.php b/src/ncc/Exceptions/ExecutionUnitNotFoundException.php deleted file mode 100644 index 228f512..0000000 --- a/src/ncc/Exceptions/ExecutionUnitNotFoundException.php +++ /dev/null @@ -1,8 +0,0 @@ -code = ExceptionCodes::FileNotFoundException; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/GitCheckoutException.php b/src/ncc/Exceptions/GitCheckoutException.php index cd84341..73bb744 100644 --- a/src/ncc/Exceptions/GitCheckoutException.php +++ b/src/ncc/Exceptions/GitCheckoutException.php @@ -14,6 +14,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::GitCheckoutException, $previous); - $this->message = $message; } } diff --git a/src/ncc/Exceptions/GitCloneException.php b/src/ncc/Exceptions/GitCloneException.php index a9cc009..547f3be 100644 --- a/src/ncc/Exceptions/GitCloneException.php +++ b/src/ncc/Exceptions/GitCloneException.php @@ -15,6 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::GitCloneException, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/GitTagsException.php b/src/ncc/Exceptions/GitTagsException.php index 385de18..cfeda4d 100644 --- a/src/ncc/Exceptions/GitTagsException.php +++ b/src/ncc/Exceptions/GitTagsException.php @@ -15,6 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::GitTagsException, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/GithubServiceException.php b/src/ncc/Exceptions/GithubServiceException.php index 5d62b3b..f4deb06 100644 --- a/src/ncc/Exceptions/GithubServiceException.php +++ b/src/ncc/Exceptions/GithubServiceException.php @@ -15,6 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::GithubServiceException, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/GitlabServiceException.php b/src/ncc/Exceptions/GitlabServiceException.php index 202ee1e..8cafebb 100644 --- a/src/ncc/Exceptions/GitlabServiceException.php +++ b/src/ncc/Exceptions/GitlabServiceException.php @@ -15,6 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::GitlabServiceException, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/HttpException.php b/src/ncc/Exceptions/HttpException.php index 73d5cd7..c6904fc 100644 --- a/src/ncc/Exceptions/HttpException.php +++ b/src/ncc/Exceptions/HttpException.php @@ -15,6 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::HttpException, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/IOException.php b/src/ncc/Exceptions/IOException.php index e733d0c..3bc85be 100644 --- a/src/ncc/Exceptions/IOException.php +++ b/src/ncc/Exceptions/IOException.php @@ -10,11 +10,6 @@ class IOException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::IOException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/ImportException.php b/src/ncc/Exceptions/ImportException.php index 37defdf..a229f6a 100644 --- a/src/ncc/Exceptions/ImportException.php +++ b/src/ncc/Exceptions/ImportException.php @@ -15,6 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::ImportException, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/InstallationException.php b/src/ncc/Exceptions/InstallationException.php index 1b99c67..5caa275 100644 --- a/src/ncc/Exceptions/InstallationException.php +++ b/src/ncc/Exceptions/InstallationException.php @@ -10,11 +10,6 @@ class InstallationException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::InstallationException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/InternalComposerNotAvailableException.php b/src/ncc/Exceptions/InternalComposerNotAvailableException.php index 718114b..94ad473 100644 --- a/src/ncc/Exceptions/InternalComposerNotAvailableException.php +++ b/src/ncc/Exceptions/InternalComposerNotAvailableException.php @@ -10,11 +10,6 @@ class InternalComposerNotAvailableException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::InternalComposerNotAvailable, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/InvalidBuildConfigurationException.php b/src/ncc/Exceptions/InvalidBuildConfigurationException.php index cc2ea91..8e1cf60 100644 --- a/src/ncc/Exceptions/InvalidBuildConfigurationException.php +++ b/src/ncc/Exceptions/InvalidBuildConfigurationException.php @@ -15,6 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::InvalidBuildConfigurationException, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/InvalidConstantNameException.php b/src/ncc/Exceptions/InvalidConstantNameException.php index 1e8e36e..5e7b020 100644 --- a/src/ncc/Exceptions/InvalidConstantNameException.php +++ b/src/ncc/Exceptions/InvalidConstantNameException.php @@ -10,11 +10,6 @@ class InvalidConstantNameException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::InvalidConstantNameException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/InvalidDependencyConfiguration.php b/src/ncc/Exceptions/InvalidDependencyConfiguration.php index 8745d53..caa31bb 100644 --- a/src/ncc/Exceptions/InvalidDependencyConfiguration.php +++ b/src/ncc/Exceptions/InvalidDependencyConfiguration.php @@ -15,6 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::InvalidDependencyConfiguration, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/InvalidExecutionPolicyName.php b/src/ncc/Exceptions/InvalidExecutionPolicyName.php index 2699960..b5e96ca 100644 --- a/src/ncc/Exceptions/InvalidExecutionPolicyName.php +++ b/src/ncc/Exceptions/InvalidExecutionPolicyName.php @@ -3,12 +3,17 @@ namespace ncc\Exceptions; use Exception; + use ncc\Abstracts\ExceptionCodes; use Throwable; class InvalidExecutionPolicyName extends Exception { + /** + * @param string $message + * @param Throwable|null $previous + */ public function __construct(string $message = "", ?Throwable $previous = null) { - parent::__construct($message, $code, $previous); + parent::__construct($message, ExceptionCodes::InvalidExecutionPolicyName, $previous); } } \ No newline at end of file diff --git a/src/ncc/Exceptions/InvalidPackageException.php b/src/ncc/Exceptions/InvalidPackageException.php index 04d3ff9..6175501 100644 --- a/src/ncc/Exceptions/InvalidPackageException.php +++ b/src/ncc/Exceptions/InvalidPackageException.php @@ -10,8 +10,6 @@ class InvalidPackageException extends Exception { - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -19,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::InvalidPackageException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/InvalidProjectBuildConfiguration.php b/src/ncc/Exceptions/InvalidProjectBuildConfiguration.php index 51d12fb..cce36d5 100644 --- a/src/ncc/Exceptions/InvalidProjectBuildConfiguration.php +++ b/src/ncc/Exceptions/InvalidProjectBuildConfiguration.php @@ -10,8 +10,6 @@ class InvalidProjectBuildConfiguration extends Exception { - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -19,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::InvalidProjectBuildConfiguration, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/InvalidProjectConfigurationException.php b/src/ncc/Exceptions/InvalidProjectConfigurationException.php index 4923365..1662fc7 100644 --- a/src/ncc/Exceptions/InvalidProjectConfigurationException.php +++ b/src/ncc/Exceptions/InvalidProjectConfigurationException.php @@ -12,15 +12,7 @@ */ class InvalidProjectConfigurationException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - - /** - * The full property name that needs correcting - * * @var string|null */ private ?string $property; @@ -33,8 +25,14 @@ public function __construct(string $message = "", ?string $property=null, ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::InvalidProjectConfigurationException, $previous); - $this->message = $message; - $this->previous = $previous; $this->property = $property; } + + /** + * @return string|null + */ + public function getProperty(): ?string + { + return $this->property; + } } \ No newline at end of file diff --git a/src/ncc/Exceptions/InvalidPropertyValueException.php b/src/ncc/Exceptions/InvalidPropertyValueException.php index eb1ac64..0606ace 100644 --- a/src/ncc/Exceptions/InvalidPropertyValueException.php +++ b/src/ncc/Exceptions/InvalidPropertyValueException.php @@ -2,10 +2,18 @@ namespace ncc\Exceptions; - class InvalidPropertyValueException extends \Exception + use Exception; + use ncc\Abstracts\ExceptionCodes; + use Throwable; + + class InvalidPropertyValueException extends Exception { - public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) + /** + * @param string $message + * @param Throwable|null $previous + */ + public function __construct(string $message = "", ?Throwable $previous = null) { - parent::__construct($message, $code, $previous); + parent::__construct($message, ExceptionCodes::InvalidPropertyValueException, $previous); } } \ No newline at end of file diff --git a/src/ncc/Exceptions/InvalidScopeException.php b/src/ncc/Exceptions/InvalidScopeException.php index 2bc6070..cebd2ea 100644 --- a/src/ncc/Exceptions/InvalidScopeException.php +++ b/src/ncc/Exceptions/InvalidScopeException.php @@ -9,8 +9,6 @@ class InvalidScopeException extends Exception { /** - * Public Constructor - * * @param string $scope * @param Throwable|null $previous */ diff --git a/src/ncc/Exceptions/InvalidVersionConfigurationException.php b/src/ncc/Exceptions/InvalidVersionConfigurationException.php index 3895476..9c45021 100644 --- a/src/ncc/Exceptions/InvalidVersionConfigurationException.php +++ b/src/ncc/Exceptions/InvalidVersionConfigurationException.php @@ -10,11 +10,6 @@ class InvalidVersionConfigurationException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::InvalidVersionConfigurationException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/MissingDependencyException.php b/src/ncc/Exceptions/MissingDependencyException.php index bd3104e..df2b8e6 100644 --- a/src/ncc/Exceptions/MissingDependencyException.php +++ b/src/ncc/Exceptions/MissingDependencyException.php @@ -10,11 +10,6 @@ class MissingDependencyException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::MissingDependencyException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/NoAvailableUnitsException.php b/src/ncc/Exceptions/NoAvailableUnitsException.php index 56d61ac..86f4de6 100644 --- a/src/ncc/Exceptions/NoAvailableUnitsException.php +++ b/src/ncc/Exceptions/NoAvailableUnitsException.php @@ -10,11 +10,6 @@ class NoAvailableUnitsException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::NoAvailableUnitsException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/NoUnitsFoundException.php b/src/ncc/Exceptions/NoUnitsFoundException.php index a59e3da..5bd312a 100644 --- a/src/ncc/Exceptions/NoUnitsFoundException.php +++ b/src/ncc/Exceptions/NoUnitsFoundException.php @@ -8,11 +8,6 @@ class NoUnitsFoundException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -20,7 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::NoUnitsFoundException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/NotImplementedException.php b/src/ncc/Exceptions/NotImplementedException.php index e53d390..69d005f 100644 --- a/src/ncc/Exceptions/NotImplementedException.php +++ b/src/ncc/Exceptions/NotImplementedException.php @@ -10,11 +10,6 @@ class NotImplementedException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::NotImplementedException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/NotSupportedException.php b/src/ncc/Exceptions/NotSupportedException.php index 9ea4f25..14ba7c7 100644 --- a/src/ncc/Exceptions/NotSupportedException.php +++ b/src/ncc/Exceptions/NotSupportedException.php @@ -15,6 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::NotSupportedException, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/PackageAlreadyInstalledException.php b/src/ncc/Exceptions/PackageAlreadyInstalledException.php index fbf5c49..7b3685d 100644 --- a/src/ncc/Exceptions/PackageAlreadyInstalledException.php +++ b/src/ncc/Exceptions/PackageAlreadyInstalledException.php @@ -10,11 +10,6 @@ class PackageAlreadyInstalledException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::PackageAlreadyInstalledException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/PackageFetchException.php b/src/ncc/Exceptions/PackageFetchException.php index 031f860..27d60ec 100644 --- a/src/ncc/Exceptions/PackageFetchException.php +++ b/src/ncc/Exceptions/PackageFetchException.php @@ -7,6 +7,10 @@ class PackageFetchException extends \Exception { + /** + * @param string $message + * @param Throwable|null $previous + */ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::PackageFetchException, $previous); diff --git a/src/ncc/Exceptions/PackageLockException.php b/src/ncc/Exceptions/PackageLockException.php index b86c20c..c5623d0 100644 --- a/src/ncc/Exceptions/PackageLockException.php +++ b/src/ncc/Exceptions/PackageLockException.php @@ -10,11 +10,6 @@ class PackageLockException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::PackageLockException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/PackageNotFoundException.php b/src/ncc/Exceptions/PackageNotFoundException.php index 88bd370..3fc7ab0 100644 --- a/src/ncc/Exceptions/PackageNotFoundException.php +++ b/src/ncc/Exceptions/PackageNotFoundException.php @@ -10,11 +10,6 @@ class PackageNotFoundException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::PackageNotFoundException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/PackageParsingException.php b/src/ncc/Exceptions/PackageParsingException.php index 70c1be7..ae1dfaa 100644 --- a/src/ncc/Exceptions/PackageParsingException.php +++ b/src/ncc/Exceptions/PackageParsingException.php @@ -10,11 +10,6 @@ class PackageParsingException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::PackageParsingException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/PackagePreparationFailedException.php b/src/ncc/Exceptions/PackagePreparationFailedException.php index 5a45e3e..2a7fccb 100644 --- a/src/ncc/Exceptions/PackagePreparationFailedException.php +++ b/src/ncc/Exceptions/PackagePreparationFailedException.php @@ -10,11 +10,6 @@ class PackagePreparationFailedException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::PackagePreparationFailedException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/ProjectConfigurationNotFoundException.php b/src/ncc/Exceptions/ProjectConfigurationNotFoundException.php index 2897f72..933a095 100644 --- a/src/ncc/Exceptions/ProjectConfigurationNotFoundException.php +++ b/src/ncc/Exceptions/ProjectConfigurationNotFoundException.php @@ -3,11 +3,17 @@ namespace ncc\Exceptions; use Exception; + use ncc\Abstracts\ExceptionCodes; + use Throwable; class ProjectConfigurationNotFoundException extends Exception { + /** + * @param string $message + * @param Throwable|null $previous + */ public function __construct(string $message = "", ?Throwable $previous = null) { - parent::__construct($message, $previous); + parent::__construct($message, ExceptionCodes::ProjectConfigurationNotFoundException, $previous); } } \ No newline at end of file diff --git a/src/ncc/Exceptions/ResourceChecksumException.php b/src/ncc/Exceptions/ResourceChecksumException.php index 911a885..edc0b82 100644 --- a/src/ncc/Exceptions/ResourceChecksumException.php +++ b/src/ncc/Exceptions/ResourceChecksumException.php @@ -9,11 +9,6 @@ class ResourceChecksumException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param int $code @@ -22,8 +17,5 @@ public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); - $this->message = $message; - $this->code = $code; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/RunnerExecutionException.php b/src/ncc/Exceptions/RunnerExecutionException.php index e568dd1..7022c73 100644 --- a/src/ncc/Exceptions/RunnerExecutionException.php +++ b/src/ncc/Exceptions/RunnerExecutionException.php @@ -10,11 +10,6 @@ class RunnerExecutionException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::RunnerExecutionException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/SymlinkException.php b/src/ncc/Exceptions/SymlinkException.php index 5a315eb..a10038f 100644 --- a/src/ncc/Exceptions/SymlinkException.php +++ b/src/ncc/Exceptions/SymlinkException.php @@ -15,6 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::SymlinkException, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/UndefinedExecutionPolicyException.php b/src/ncc/Exceptions/UndefinedExecutionPolicyException.php index 8797b5e..ffd4e54 100644 --- a/src/ncc/Exceptions/UndefinedExecutionPolicyException.php +++ b/src/ncc/Exceptions/UndefinedExecutionPolicyException.php @@ -10,11 +10,6 @@ class UndefinedExecutionPolicyException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::UndefinedExecutionPolicyException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/UnsupportedArchiveException.php b/src/ncc/Exceptions/UnsupportedArchiveException.php index c667c79..114012c 100644 --- a/src/ncc/Exceptions/UnsupportedArchiveException.php +++ b/src/ncc/Exceptions/UnsupportedArchiveException.php @@ -15,6 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::UnsupportedArchiveException, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/UnsupportedCompilerExtensionException.php b/src/ncc/Exceptions/UnsupportedCompilerExtensionException.php index ddd520c..ba91f2b 100644 --- a/src/ncc/Exceptions/UnsupportedCompilerExtensionException.php +++ b/src/ncc/Exceptions/UnsupportedCompilerExtensionException.php @@ -10,11 +10,6 @@ class UnsupportedCompilerExtensionException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::UnsupportedCompilerExtensionException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/UnsupportedComponentTypeException.php b/src/ncc/Exceptions/UnsupportedComponentTypeException.php index ecd4c79..50887f7 100644 --- a/src/ncc/Exceptions/UnsupportedComponentTypeException.php +++ b/src/ncc/Exceptions/UnsupportedComponentTypeException.php @@ -10,11 +10,6 @@ class UnsupportedComponentTypeException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::UnsupportedComponentTypeException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/UnsupportedExtensionVersionException.php b/src/ncc/Exceptions/UnsupportedExtensionVersionException.php index f24b429..9196106 100644 --- a/src/ncc/Exceptions/UnsupportedExtensionVersionException.php +++ b/src/ncc/Exceptions/UnsupportedExtensionVersionException.php @@ -3,11 +3,17 @@ namespace ncc\Exceptions; use Exception; + use ncc\Abstracts\ExceptionCodes; + use Throwable; class UnsupportedExtensionVersionException extends Exception { - public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null) + /** + * @param string $message + * @param Throwable|null $previous + */ + public function __construct(string $message = "", ?Throwable $previous = null) { - parent::__construct($message, $code, $previous); + parent::__construct($message, ExceptionCodes::UnsupportedExtensionVersionException, $previous); } } \ No newline at end of file diff --git a/src/ncc/Exceptions/UnsupportedPackageException.php b/src/ncc/Exceptions/UnsupportedPackageException.php index e16c0e2..2e1f108 100644 --- a/src/ncc/Exceptions/UnsupportedPackageException.php +++ b/src/ncc/Exceptions/UnsupportedPackageException.php @@ -10,8 +10,6 @@ class UnsupportedPackageException extends Exception { - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -19,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::UnsupportedPackageException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/UnsupportedProjectTypeException.php b/src/ncc/Exceptions/UnsupportedProjectTypeException.php index 384a2b2..24367fd 100644 --- a/src/ncc/Exceptions/UnsupportedProjectTypeException.php +++ b/src/ncc/Exceptions/UnsupportedProjectTypeException.php @@ -16,6 +16,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::UnsupportedProjectTypeException, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/UnsupportedRemoteSourceTypeException.php b/src/ncc/Exceptions/UnsupportedRemoteSourceTypeException.php index 6548f35..bf8d2ff 100644 --- a/src/ncc/Exceptions/UnsupportedRemoteSourceTypeException.php +++ b/src/ncc/Exceptions/UnsupportedRemoteSourceTypeException.php @@ -15,6 +15,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::UnsupportedRemoteSourceTypeException, $previous); - $this->message = $message; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/UnsupportedRunnerException.php b/src/ncc/Exceptions/UnsupportedRunnerException.php deleted file mode 100644 index 830a7a1..0000000 --- a/src/ncc/Exceptions/UnsupportedRunnerException.php +++ /dev/null @@ -1,11 +0,0 @@ -message = $message; - $this->previous = $previous; } } \ No newline at end of file diff --git a/src/ncc/Exceptions/VersionNotFoundException.php b/src/ncc/Exceptions/VersionNotFoundException.php index b7b4acc..6127154 100644 --- a/src/ncc/Exceptions/VersionNotFoundException.php +++ b/src/ncc/Exceptions/VersionNotFoundException.php @@ -10,11 +10,6 @@ class VersionNotFoundException extends Exception { - /** - * @var Throwable|null - */ - private ?Throwable $previous; - /** * @param string $message * @param Throwable|null $previous @@ -22,7 +17,5 @@ public function __construct(string $message = "", ?Throwable $previous = null) { parent::__construct($message, ExceptionCodes::VersionNotFoundException, $previous); - $this->message = $message; - $this->previous = $previous; } } \ No newline at end of file