mirror of
https://github.com/friendica/friendica
synced 2025-04-27 08:30:10 +00:00
Some fixes:
- $gsid's default value cannot sadly be 0, it now must be null to allow some code work - added some more type-hints - documented a bit more
This commit is contained in:
parent
4e53666c70
commit
33768ea1c6
8 changed files with 21 additions and 15 deletions
|
@ -102,7 +102,7 @@ class Attach
|
|||
* @return boolean
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function exists(array $conditions)
|
||||
public static function exists(array $conditions): bool
|
||||
{
|
||||
return DBA::exists('attach', $conditions);
|
||||
}
|
||||
|
|
|
@ -128,10 +128,10 @@ class Contact
|
|||
* @param array $fields Array of selected fields, empty for all
|
||||
* @param array $condition Array of fields for condition
|
||||
* @param array $params Array of several parameters
|
||||
* @return array
|
||||
* @return array|bool
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function selectFirst(array $fields = [], array $condition = [], array $params = []): array
|
||||
public static function selectFirst(array $fields = [], array $condition = [], array $params = [])
|
||||
{
|
||||
$contact = DBA::selectFirst('contact', $fields, $condition, $params);
|
||||
|
||||
|
|
|
@ -2054,7 +2054,7 @@ class GServer
|
|||
* @return int
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function getProtocol(int $gsid)
|
||||
public static function getProtocol(int $gsid): int
|
||||
{
|
||||
if (empty($gsid)) {
|
||||
return null;
|
||||
|
|
|
@ -110,7 +110,7 @@ class Photo
|
|||
* @throws \Exception
|
||||
* @see \Friendica\Database\DBA::select
|
||||
*/
|
||||
public static function getPhotosForUser($uid, $resourceid, array $conditions = [], array $params = [])
|
||||
public static function getPhotosForUser(int $uid, string $resourceid, array $conditions = [], array $params = [])
|
||||
{
|
||||
$conditions["resource-id"] = $resourceid;
|
||||
$conditions["uid"] = $uid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue