Skip to content

Fix Psalm errors #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions src/ExitCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,55 +31,73 @@ class ExitCode
{
/**
* The command completed successfully.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const OK = 0;

/**
* The command exited with an error code that says nothing about the error.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const UNSPECIFIED_ERROR = 1;

/**
* The command was used incorrectly, e.g., with the wrong number of
* arguments, a bad flag, a bad syntax in a parameter, or whatever.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const USAGE = 64;

/**
* The input data was incorrect in some way. This should only be used for
* user's data and not system files.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const DATAERR = 65;

/**
* An input file (not a system file) did not exist or was not readable.
* This could also include errors like ``No message'' to a mailer (if it
* cared to catch it).
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const NOINPUT = 66;

/**
* The user specified did not exist. This might be used for mail addresses
* or remote logins.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const NOUSER = 67;

/**
* The host specified did not exist. This is used in mail addresses or
* network requests.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const NOHOST = 68;

/**
* A service is unavailable. This can occur if a support program or file
* does not exist. This can also be used as a catchall message when
* something you wanted to do does not work, but you do not know why.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const UNAVAILABLE = 69;

/**
* An internal software error has been detected. This should be limited to
* non-operating system related errors as possible.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const SOFTWARE = 70;

Expand All @@ -88,47 +106,63 @@ class ExitCode
* used for such things as ``cannot fork'', ``cannot create pipe'', or the
* like. It includes things like getuid returning a user that does not
* exist in the passwd file.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const OSERR = 71;

/**
* Some system file (e.g., /etc/passwd, /var/run/utx.active, etc.) does not
* exist, cannot be opened, or has some sort of error (e.g., syntax error).
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const OSFILE = 72;

/**
* A (user specified) output file cannot be created.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const CANTCREAT = 73;

/**
* An error occurred while doing I/O on some file.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const IOERR = 74;

/**
* Temporary failure, indicating something that is not really an error. In
* sendmail, this means that a mailer (e.g.) could not create a connection,
* and the request should be reattempted later.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const TEMPFAIL = 75;

/**
* The remote system returned something that was ``not possible'' during a
* protocol exchange.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const PROTOCOL = 76;

/**
* You did not have sufficient permission to perform the operation. This
* is not intended for file system problems, which should use NOINPUT or
* CANTCREAT, but rather for higher level permissions.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const NOPERM = 77;

/**
* Something was found in an unconfigured or misconfigured state.
*
* @psalm-suppress MissingClassConstType It needs while supported PHP version is <=8.2
*/
public const CONFIG = 78;

Expand Down
Loading