Skip to main content
Fix link
Source Link

Or instead of parsing it manually, the URL interface could be used - including modifying the query string with the URLSearchParams get method on the URL.searchParams property and the href property (or the ``toString()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/toStringtoString() method) method).

Or instead of parsing it manually, the URL interface could be used - including modifying the query string with the URLSearchParams get method on the URL.searchParams property and the href property (or the ``toString()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/toString) method).

Or instead of parsing it manually, the URL interface could be used - including modifying the query string with the URLSearchParams get method on the URL.searchParams property and the href property (or the toString() method).

update links
Source Link

Note the shorter array syntaxshorter array syntax is used, presuming PHP 5.4+ is usedPHP 5.4+ is used - hopefully it is 7.3 or newer for the sake of support.

Note the shorter array syntax is used, presuming PHP 5.4+ is used - hopefully it is 7.3 or newer for the sake of support.

Note the shorter array syntax is used, presuming PHP 5.4+ is used - hopefully it is 7.3 or newer for the sake of support.

added 525 characters in body
Source Link

Perhaps the constructor is overridden because the documentation mentions them:

Constructors are useful if you need to set some default values, or run a default process when your class is instantiated. Constructors can’t return a value, but they can do some default work.

However in the Posts constructor no default values are set and no default process is run when the class is instantiated, so the override can be removed.


In the _initPagination() method the single-use variables - i.e. $limit and $offset - can be eliminated:

In the _initPagination() method the single-use variables - i.e. $limit and $offset - can be eliminated:

Perhaps the constructor is overridden because the documentation mentions them:

Constructors are useful if you need to set some default values, or run a default process when your class is instantiated. Constructors can’t return a value, but they can do some default work.

However in the Posts constructor no default values are set and no default process is run when the class is instantiated, so the override can be removed.


In the _initPagination() method the single-use variables - i.e. $limit and $offset - can be eliminated:

added 80 characters in body
Source Link
Loading
Source Link
Loading