Skip to content

Commit

Permalink
give constants types
Browse files Browse the repository at this point in the history
Boldewyn committed Dec 15, 2024
1 parent c698af0 commit 69e9beb
Showing 3 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions codepoints.net/lib/Api/Exception.php
Original file line number Diff line number Diff line change
@@ -6,14 +6,14 @@

class Exception extends BaseException {

public const BAD_REQUEST = 400;
public const NOT_FOUND = 404;
public const METHOD_NOT_ALLOWED = 405;
public const PRECONDITION_FAILED = 412;
public const REQUEST_ENTITY_TOO_LARGE = 413;
public const REQUEST_URI_TOO_LONG = 414;
public const INTERNAL_SERVER_ERROR = 500;
public const NOT_IMPLEMENTED = 501;
public const int BAD_REQUEST = 400;
public const int NOT_FOUND = 404;
public const int METHOD_NOT_ALLOWED = 405;
public const int PRECONDITION_FAILED = 412;
public const int REQUEST_ENTITY_TOO_LARGE = 413;
public const int REQUEST_URI_TOO_LONG = 414;
public const int INTERNAL_SERVER_ERROR = 500;
public const int NOT_IMPLEMENTED = 501;

/**
* @param string $message the error payload
2 changes: 1 addition & 1 deletion codepoints.net/lib/Router/Pagination.php
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ class Pagination {

private int $page = 1;

public const PAGE_SIZE = 0x100;
public const int PAGE_SIZE = 0x100;

private string $urlTemplate;

2 changes: 1 addition & 1 deletion codepoints.net/lib/Translator.php
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ class Translator {

private ?string $language = null;

public const SUPPORTED_LANGUAGES = ['en', 'de', 'es', 'pl'];
public const array SUPPORTED_LANGUAGES = ['en', 'de', 'es', 'pl'];

private ?Translations $translations = null;

0 comments on commit 69e9beb

Please sign in to comment.