[DOCUMENTATION][TOOL] Small bug fixes and docblock elaboration

This commit is contained in:
Diogo Cordeiro 2020-05-10 21:43:15 +01:00 committed by Hugo Sales
parent 87a768ac8d
commit 4efbf9361c
74 changed files with 655 additions and 449 deletions

View File

@ -45,8 +45,8 @@ Prerequisites
----- -----
In order to host your GNU social instance, you'll need a domain, a In order to host your GNU social instance, you'll need a domain, a
server with a constant IP and `docker` and `docker-compose` installed server with a constant IP and both `docker` and `docker-compose`
on your system. installed on your system.
Alternatively, for local hosting or development, behind a NAT, use a Alternatively, for local hosting or development, behind a NAT, use a
dynamic DNS solutions. I recommend you go to dynamic DNS solutions. I recommend you go to
@ -59,7 +59,7 @@ With TLS/SSL
---- ----
Next, if you want to setup SSL (which you should in most cases, Next, if you want to setup SSL (which you should in most cases,
exceptions being wanting to use the Thor network), you'll need a exceptions being wanting to use the Tor network), you'll need a
certificate. There are multiple approaches to achieve this, among certificate. There are multiple approaches to achieve this, among
which are using a proxy server capable of either proxying an HTTP which are using a proxy server capable of either proxying an HTTP
connection to HTTPS or an HTTPS connection to HTTPS, or creating a connection to HTTPS or an HTTPS connection to HTTPS, or creating a

View File

@ -64,7 +64,7 @@ $license_header = '
foreach ($classes as $cls) { foreach ($classes as $cls) {
$ref = new ReflectionClass($cls); $ref = new ReflectionClass($cls);
$class_name = Common::toCamelCase($cls); $class_name = Common::snakeCaseToCamelCase($cls);
$file = $ref->getFileName(); $file = $ref->getFileName();
$class_comment = $ref->getDocComment(); $class_comment = $ref->getDocComment();
$table_name = $ref->getDefaultProperties()['__table']; $table_name = $ref->getDefaultProperties()['__table'];

View File

@ -29,20 +29,20 @@ services:
done & done &
nginx -g "daemon off;"' nginx -g "daemon off;"'
certbot: #certbot:
image: certbot/certbot # image: certbot/certbot
depends_on: # depends_on:
- nginx # - nginx
# Check for certificate renewal every 12h as # # Check for certificate renewal every 12h as
# recomnended by Let's Encryot # # recomnended by Let's Encryot
entrypoint: /bin/sh -c 'trap exit TERM; # entrypoint: /bin/sh -c 'trap exit TERM;
while :; do # while :; do
certbot renew > /dev/null; # certbot renew > /dev/null;
sleep 12h & wait $${!}; # sleep 12h & wait $${!};
done' # done'
volumes: # volumes:
- ./docker/certbot/www:/var/www/certbot # - ./docker/certbot/www:/var/www/certbot
- ./docker/certbot/files:/etc/letsencrypt # - ./docker/certbot/files:/etc/letsencrypt
php: php:
build: docker/php build: docker/php

View File

@ -9,6 +9,6 @@ class TestController extends AbstractController
{ {
public function __invoke() public function __invoke()
{ {
return new Response('<div style="background: #333; text: #999"> Test controller </div>'); return new Response('<div style="background: #333; text-color: #999"> Test controller </div>');
} }
} }

View File

@ -31,6 +31,7 @@
namespace App\Command; namespace App\Command;
use Functional as F; use Functional as F;
use ReflectionFunction;
use Symfony\Bundle\FrameworkBundle\Command\EventDispatcherDebugCommand; use Symfony\Bundle\FrameworkBundle\Command\EventDispatcherDebugCommand;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
@ -72,7 +73,7 @@ class ListEventsCommand extends EventDispatcherDebugCommand
foreach ($listeners as $event => $listener) { foreach ($listeners as $event => $listener) {
echo 'Event \'' . $event . "\\' handled by:\n"; echo 'Event \'' . $event . "\\' handled by:\n";
foreach ($listener as $c) { foreach ($listener as $c) {
$r = new \ReflectionFunction($c); $r = new ReflectionFunction($c);
echo ' ' . get_class($r->getStaticVariables()['handler'][0]) . "\n"; echo ' ' . get_class($r->getStaticVariables()['handler'][0]) . "\n";
} }
} }

View File

@ -18,7 +18,7 @@
*/ */
/** /**
* Compiler pass which triggers Symgony to tell Doctrine to * Compiler pass which triggers Symfony to tell Doctrine to
* use out `SchemaDef` metadata driver * use out `SchemaDef` metadata driver
* *
* @package GNUsocial * @package GNUsocial

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for attentions * Entity for attentions
* *
@ -40,8 +42,8 @@ class Attention
private int $notice_id; private int $notice_id;
private int $profile_id; private int $profile_id;
private ?string $reason; private ?string $reason;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setNoticeId(int $notice_id): self public function setNoticeId(int $notice_id): self
{ {
@ -73,22 +75,22 @@ class Attention
return $this->reason; return $this->reason;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for user's avatar * Entity for user's avatar
* *
@ -43,8 +45,8 @@ class Avatar
private int $height; private int $height;
private string $mediatype; private string $mediatype;
private ?string $filename; private ?string $filename;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setProfileId(int $profile_id): self public function setProfileId(int $profile_id): self
{ {
@ -106,22 +108,22 @@ class Avatar
return $this->filename; return $this->filename;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,7 +13,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for user's email confimation * Entity for user's email confimation
* *
@ -42,9 +44,9 @@ class ConfirmAddress
private string $address; private string $address;
private ?string $address_extra; private ?string $address_extra;
private string $address_type; private string $address_type;
private ?\DateTimeInterface $claimed; private ?DateTimeInterface $claimed;
private ?\DateTimeInterface $sent; private ?DateTimeInterface $sent;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setCode(string $code): self public function setCode(string $code): self
{ {
@ -96,32 +98,32 @@ class ConfirmAddress
return $this->address_type; return $this->address_type;
} }
public function setClaimed(?\DateTimeInterface $claimed): self public function setClaimed(?DateTimeInterface $claimed): self
{ {
$this->claimed = $claimed; $this->claimed = $claimed;
return $this; return $this;
} }
public function getClaimed(): ?\DateTimeInterface public function getClaimed(): ?DateTimeInterface
{ {
return $this->claimed; return $this->claimed;
} }
public function setSent(?\DateTimeInterface $sent): self public function setSent(?DateTimeInterface $sent): self
{ {
$this->sent = $sent; $this->sent = $sent;
return $this; return $this;
} }
public function getSent(): ?\DateTimeInterface public function getSent(): ?DateTimeInterface
{ {
return $this->sent; return $this->sent;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for OAuth consumer * Entity for OAuth consumer
* *
@ -40,8 +42,8 @@ class Consumer
private string $consumer_key; private string $consumer_key;
private string $consumer_secret; private string $consumer_secret;
private string $seed; private string $seed;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setConsumerKey(string $consumer_key): self public function setConsumerKey(string $consumer_key): self
{ {
@ -73,22 +75,22 @@ class Consumer
return $this->seed; return $this->seed;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Data class for Conversations * Data class for Conversations
* *
@ -38,8 +40,8 @@ class Conversation
private int $id; private int $id;
private string $uri; private string $uri;
private ?string $url; private ?string $url;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setId(int $id): self public function setId(int $id): self
{ {
@ -71,22 +73,22 @@ class Conversation
return $this->url; return $this->url;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }
@ -100,7 +102,7 @@ class Conversation
'fields' => [ 'fields' => [
'id' => ['type' => 'serial', 'not null' => true, 'description' => 'Unique identifier, (again) unrelated to notice id since 2016-01-06'], 'id' => ['type' => 'serial', 'not null' => true, 'description' => 'Unique identifier, (again) unrelated to notice id since 2016-01-06'],
'uri' => ['type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'URI of the conversation'], 'uri' => ['type' => 'varchar', 'not null' => true, 'length' => 191, 'description' => 'URI of the conversation'],
'url' => ['type' => 'varchar', 'length' => 191, 'description' => 'Resolvable URL, preferrably remote (local can be generated on the fly)'], 'url' => ['type' => 'varchar', 'length' => 191, 'description' => 'Resolvable URL, preferably remote (local can be generated on the fly)'],
'created' => ['type' => 'datetime', 'not null' => true, 'default' => '0000-00-00 00:00:00', 'description' => 'date this record was created'], 'created' => ['type' => 'datetime', 'not null' => true, 'default' => '0000-00-00 00:00:00', 'description' => 'date this record was created'],
'modified' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'], 'modified' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'],
], ],

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for uploaded files * Entity for uploaded files
* *
@ -49,7 +51,7 @@ class File
private ?string $filename; private ?string $filename;
private ?int $width; private ?int $width;
private ?int $height; private ?int $height;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setId(int $id): self public function setId(int $id): self
{ {
@ -171,12 +173,12 @@ class File
return $this->height; return $this->height;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for File redirects * Entity for File redirects
* *
@ -42,7 +44,7 @@ class FileRedirection
private ?int $file_id; private ?int $file_id;
private ?int $redirections; private ?int $redirections;
private ?int $httpcode; private ?int $httpcode;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setUrlhash(string $urlhash): self public function setUrlhash(string $urlhash): self
{ {
@ -94,12 +96,12 @@ class FileRedirection
return $this->httpcode; return $this->httpcode;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for File thumbnails * Entity for File thumbnails
* *
@ -43,7 +45,7 @@ class FileThumbnail
private ?string $filename; private ?string $filename;
private int $width; private int $width;
private int $height; private int $height;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setFileId(int $file_id): self public function setFileId(int $file_id): self
{ {
@ -105,12 +107,12 @@ class FileThumbnail
return $this->height; return $this->height;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for relating a file to a post * Entity for relating a file to a post
* *
@ -39,7 +41,7 @@ class FileToPost
private int $file_id; private int $file_id;
private int $post_id; private int $post_id;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setFileId(int $file_id): self public function setFileId(int $file_id): self
{ {
@ -61,12 +63,12 @@ class FileToPost
return $this->post_id; return $this->post_id;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for user's foreign profile * Entity for user's foreign profile
* *
@ -44,10 +46,10 @@ class ForeignLink
private int $noticesync; private int $noticesync;
private int $friendsync; private int $friendsync;
private int $profilesync; private int $profilesync;
private ?\DateTimeInterface $last_noticesync; private ?DateTimeInterface $last_noticesync;
private ?\DateTimeInterface $last_friendsync; private ?DateTimeInterface $last_friendsync;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setUserId(int $user_id): self public function setUserId(int $user_id): self
{ {
@ -119,42 +121,42 @@ class ForeignLink
return $this->profilesync; return $this->profilesync;
} }
public function setLastNoticesync(?\DateTimeInterface $last_noticesync): self public function setLastNoticesync(?DateTimeInterface $last_noticesync): self
{ {
$this->last_noticesync = $last_noticesync; $this->last_noticesync = $last_noticesync;
return $this; return $this;
} }
public function getLastNoticesync(): ?\DateTimeInterface public function getLastNoticesync(): ?DateTimeInterface
{ {
return $this->last_noticesync; return $this->last_noticesync;
} }
public function setLastFriendsync(?\DateTimeInterface $last_friendsync): self public function setLastFriendsync(?DateTimeInterface $last_friendsync): self
{ {
$this->last_friendsync = $last_friendsync; $this->last_friendsync = $last_friendsync;
return $this; return $this;
} }
public function getLastFriendsync(): ?\DateTimeInterface public function getLastFriendsync(): ?DateTimeInterface
{ {
return $this->last_friendsync; return $this->last_friendsync;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for foreign services * Entity for foreign services
* *
@ -40,8 +42,8 @@ class ForeignService
private int $id; private int $id;
private string $name; private string $name;
private ?string $description; private ?string $description;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setId(int $id): self public function setId(int $id): self
{ {
@ -73,22 +75,22 @@ class ForeignService
return $this->description; return $this->description;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for user's foreign subscriptions * Entity for user's foreign subscriptions
* *
@ -40,7 +42,7 @@ class ForeignSubscription
private int $service; private int $service;
private int $subscriber; private int $subscriber;
private int $subscribed; private int $subscribed;
private \DateTimeInterface $created; private DateTimeInterface $created;
public function setService(int $service): self public function setService(int $service): self
{ {
@ -72,12 +74,12 @@ class ForeignSubscription
return $this->subscribed; return $this->subscribed;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Foreign Users * Entity for Foreign Users
* *
@ -41,8 +43,8 @@ class ForeignUser
private int $service; private int $service;
private string $uri; private string $uri;
private ?string $nickname; private ?string $nickname;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setId(int $id): self public function setId(int $id): self
{ {
@ -84,22 +86,22 @@ class ForeignUser
return $this->nickname; return $this->nickname;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Group Alias * Entity for Group Alias
* *
@ -39,7 +41,7 @@ class GroupAlias
private string $alias; private string $alias;
private int $group_id; private int $group_id;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setAlias(string $alias): self public function setAlias(string $alias): self
{ {
@ -61,12 +63,12 @@ class GroupAlias
return $this->group_id; return $this->group_id;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Group Block * Entity for Group Block
* *
@ -40,7 +42,7 @@ class GroupBlock
private int $group_id; private int $group_id;
private int $blocked; private int $blocked;
private int $blocker; private int $blocker;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setGroupId(int $group_id): self public function setGroupId(int $group_id): self
{ {
@ -72,12 +74,12 @@ class GroupBlock
return $this->blocker; return $this->blocker;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Group's inbox * Entity for Group's inbox
* *
@ -39,7 +41,7 @@ class GroupInbox
private int $group_id; private int $group_id;
private int $notice_id; private int $notice_id;
private \DateTimeInterface $created; private DateTimeInterface $created;
public function setGroupId(int $group_id): self public function setGroupId(int $group_id): self
{ {
@ -61,12 +63,12 @@ class GroupInbox
return $this->notice_id; return $this->notice_id;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Queue on joining a group * Entity for Queue on joining a group
* *
@ -39,7 +41,7 @@ class GroupJoinQueue
private int $profile_id; private int $profile_id;
private int $group_id; private int $group_id;
private \DateTimeInterface $created; private DateTimeInterface $created;
public function setProfileId(int $profile_id): self public function setProfileId(int $profile_id): self
{ {
@ -61,12 +63,12 @@ class GroupJoinQueue
return $this->group_id; return $this->group_id;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for a Group Member * Entity for a Group Member
* *
@ -41,8 +43,8 @@ class GroupMember
private int $profile_id; private int $profile_id;
private ?bool $is_admin; private ?bool $is_admin;
private ?string $uri; private ?string $uri;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setGroupId(int $group_id): self public function setGroupId(int $group_id): self
{ {
@ -84,22 +86,22 @@ class GroupMember
return $this->uri; return $this->uri;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for user invitations * Entity for user invitations
* *
@ -41,7 +43,7 @@ class Invitation
private int $user_id; private int $user_id;
private string $address; private string $address;
private string $address_type; private string $address_type;
private \DateTimeInterface $created; private DateTimeInterface $created;
private ?int $registered_user_id; private ?int $registered_user_id;
public function setCode(string $code): self public function setCode(string $code): self
@ -84,12 +86,12 @@ class Invitation
return $this->address_type; return $this->address_type;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }

View File

@ -19,6 +19,8 @@
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for local groups * Entity for local groups
* *
@ -39,8 +41,8 @@ class LocalGroup
private int $group_id; private int $group_id;
private ?string $nickname; private ?string $nickname;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setGroupId(int $group_id): self public function setGroupId(int $group_id): self
{ {
@ -62,22 +64,22 @@ class LocalGroup
return $this->nickname; return $this->nickname;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for location namespace * Entity for location namespace
* *
@ -39,8 +41,8 @@ class LocationNamespace
private int $id; private int $id;
private ?string $description; private ?string $description;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setId(int $id): self public function setId(int $id): self
{ {
@ -62,22 +64,22 @@ class LocationNamespace
return $this->description; return $this->description;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Login tokens * Entity for Login tokens
* *
@ -39,8 +41,8 @@ class LoginToken
private int $user_id; private int $user_id;
private string $token; private string $token;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setUserId(int $user_id): self public function setUserId(int $user_id): self
{ {
@ -62,22 +64,22 @@ class LoginToken
return $this->token; return $this->token;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for nonce * Entity for nonce
* *
@ -40,9 +42,9 @@ class Nonce
private string $consumer_key; private string $consumer_key;
private ?string $tok; private ?string $tok;
private string $nonce; private string $nonce;
private \DateTimeInterface $ts; private DateTimeInterface $ts;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setConsumerKey(string $consumer_key): self public function setConsumerKey(string $consumer_key): self
{ {
@ -74,32 +76,32 @@ class Nonce
return $this->nonce; return $this->nonce;
} }
public function setTs(\DateTimeInterface $ts): self public function setTs(DateTimeInterface $ts): self
{ {
$this->ts = $ts; $this->ts = $ts;
return $this; return $this;
} }
public function getTs(): \DateTimeInterface public function getTs(): DateTimeInterface
{ {
return $this->ts; return $this->ts;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for notices * Entity for notices
* *
@ -43,8 +45,8 @@ class Notice
private ?string $content; private ?string $content;
private ?string $rendered; private ?string $rendered;
private ?string $url; private ?string $url;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
private ?int $reply_to; private ?int $reply_to;
private ?int $is_local; private ?int $is_local;
private ?string $source; private ?string $source;
@ -114,22 +116,22 @@ class Notice
return $this->url; return $this->url;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }
@ -258,7 +260,7 @@ class Notice
'notice_object_type_idx' => ['object_type'], 'notice_object_type_idx' => ['object_type'],
'notice_verb_idx' => ['verb'], 'notice_verb_idx' => ['verb'],
'notice_profile_id_verb_idx' => ['profile_id', 'verb'], 'notice_profile_id_verb_idx' => ['profile_id', 'verb'],
'notice_url_idx' => ['url'], // Qvitter wants this 'notice_url_idx' => ['url'],
'notice_replyto_idx' => ['reply_to'], 'notice_replyto_idx' => ['reply_to'],
], ],
]; ];

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Notice's location * Entity for Notice's location
* *
@ -42,7 +44,7 @@ class NoticeLocation
private ?float $lon; private ?float $lon;
private ?int $location_id; private ?int $location_id;
private ?int $location_ns; private ?int $location_ns;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setNoticeId(int $notice_id): self public function setNoticeId(int $notice_id): self
{ {
@ -94,12 +96,12 @@ class NoticeLocation
return $this->location_ns; return $this->location_ns;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Notice preferences * Entity for Notice preferences
* *
@ -43,8 +45,8 @@ class NoticePrefs
private string $namespace; private string $namespace;
private string $topic; private string $topic;
private $data; private $data;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setNoticeId(int $notice_id): self public function setNoticeId(int $notice_id): self
{ {
@ -86,22 +88,22 @@ class NoticePrefs
return $this->data; return $this->data;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Notices sources * Entity for Notices sources
* *
@ -41,8 +43,8 @@ class NoticeSource
private string $name; private string $name;
private string $url; private string $url;
private int $notice_id; private int $notice_id;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setCode(string $code): self public function setCode(string $code): self
{ {
@ -84,22 +86,22 @@ class NoticeSource
return $this->notice_id; return $this->notice_id;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Notice Tag * Entity for Notice Tag
* *
@ -39,7 +41,7 @@ class NoticeTag
private string $tag; private string $tag;
private int $notice_id; private int $notice_id;
private \DateTimeInterface $created; private DateTimeInterface $created;
public function setTag(string $tag): self public function setTag(string $tag): self
{ {
@ -61,12 +63,12 @@ class NoticeTag
return $this->notice_id; return $this->notice_id;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for OAuth Application * Entity for OAuth Application
* *
@ -49,8 +51,8 @@ class OauthApplication
private ?string $callback_url; private ?string $callback_url;
private ?int $type; private ?int $type;
private ?int $access_type; private ?int $access_type;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setId(int $id): self public function setId(int $id): self
{ {
@ -172,22 +174,22 @@ class OauthApplication
return $this->access_type; return $this->access_type;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for OAuth Application User * Entity for OAuth Application User
* *
@ -41,8 +43,8 @@ class OauthApplicationUser
private int $application_id; private int $application_id;
private ?int $access_type; private ?int $access_type;
private ?string $token; private ?string $token;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setProfileId(int $profile_id): self public function setProfileId(int $profile_id): self
{ {
@ -84,22 +86,22 @@ class OauthApplicationUser
return $this->token; return $this->token;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for association between OAuth and internal token * Entity for association between OAuth and internal token
* *
@ -40,8 +42,8 @@ class OauthTokenAssociation
private int $profile_id; private int $profile_id;
private int $application_id; private int $application_id;
private string $token; private string $token;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setProfileId(int $profile_id): self public function setProfileId(int $profile_id): self
{ {
@ -73,22 +75,22 @@ class OauthTokenAssociation
return $this->token; return $this->token;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Separate table for storing UI preferences * Entity for Separate table for storing UI preferences
* *
@ -41,8 +43,8 @@ class OldSchoolPrefs
private ?bool $stream_mode_only; private ?bool $stream_mode_only;
private ?bool $conversation_tree; private ?bool $conversation_tree;
private ?bool $stream_nicknames; private ?bool $stream_nicknames;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setUserId(int $user_id): self public function setUserId(int $user_id): self
{ {
@ -84,22 +86,22 @@ class OldSchoolPrefs
return $this->stream_nicknames; return $this->stream_nicknames;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for user profiles * Entity for user profiles
* *
@ -48,8 +50,8 @@ class Profile
private ?float $lon; private ?float $lon;
private ?int $location_id; private ?int $location_id;
private ?int $location_ns; private ?int $location_ns;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setId(int $id): self public function setId(int $id): self
{ {
@ -161,22 +163,22 @@ class Profile
return $this->location_ns; return $this->location_ns;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for User's Profile Block * Entity for User's Profile Block
* *
@ -39,7 +41,7 @@ class ProfileBlock
private int $blocker; private int $blocker;
private int $blocked; private int $blocked;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setBlocker(int $blocker): self public function setBlocker(int $blocker): self
{ {
@ -61,12 +63,12 @@ class ProfileBlock
return $this->blocked; return $this->blocked;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for List of profiles * Entity for List of profiles
* *
@ -42,8 +44,8 @@ class ProfileList
private string $tag; private string $tag;
private ?string $description; private ?string $description;
private ?bool $private; private ?bool $private;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
private ?string $uri; private ?string $uri;
private ?string $mainpage; private ?string $mainpage;
private ?int $tagged_count; private ?int $tagged_count;
@ -99,22 +101,22 @@ class ProfileList
return $this->private; return $this->private;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Data class for Profile preferences * Entity for Data class for Profile preferences
* *
@ -41,8 +43,8 @@ class ProfilePrefs
private string $namespace; private string $namespace;
private string $topic; private string $topic;
private $data; private $data;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setProfileId(int $profile_id): self public function setProfileId(int $profile_id): self
{ {
@ -84,22 +86,22 @@ class ProfilePrefs
return $this->data; return $this->data;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for user profile role * Entity for user profile role
* *
@ -39,7 +41,7 @@ class ProfileRole
private int $profile_id; private int $profile_id;
private string $role; private string $role;
private \DateTimeInterface $created; private DateTimeInterface $created;
public function setProfileId(int $profile_id): self public function setProfileId(int $profile_id): self
{ {
@ -61,12 +63,12 @@ class ProfileRole
return $this->role; return $this->role;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Profile Tag * Entity for Profile Tag
* *
@ -40,7 +42,7 @@ class ProfileTag
private int $tagger; private int $tagger;
private int $tagged; private int $tagged;
private string $tag; private string $tag;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setTagger(int $tagger): self public function setTagger(int $tagger): self
{ {
@ -72,12 +74,12 @@ class ProfileTag
return $this->tag; return $this->tag;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Profile Tag Subscription * Entity for Profile Tag Subscription
* *
@ -39,8 +41,8 @@ class ProfileTagSubscription
private int $profile_tag_id; private int $profile_tag_id;
private int $profile_id; private int $profile_id;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setProfileTagId(int $profile_tag_id): self public function setProfileTagId(int $profile_tag_id): self
{ {
@ -62,22 +64,22 @@ class ProfileTagSubscription
return $this->profile_id; return $this->profile_id;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for a Queue Item * Entity for a Queue Item
* *
@ -40,8 +42,8 @@ class QueueItem
private int $id; private int $id;
private $frame; private $frame;
private string $transport; private string $transport;
private \DateTimeInterface $created; private DateTimeInterface $created;
private ?\DateTimeInterface $claimed; private ?DateTimeInterface $claimed;
public function setId(int $id): self public function setId(int $id): self
{ {
@ -73,22 +75,22 @@ class QueueItem
return $this->transport; return $this->transport;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setClaimed(?\DateTimeInterface $claimed): self public function setClaimed(?DateTimeInterface $claimed): self
{ {
$this->claimed = $claimed; $this->claimed = $claimed;
return $this; return $this;
} }
public function getClaimed(): ?\DateTimeInterface public function getClaimed(): ?DateTimeInterface
{ {
return $this->claimed; return $this->claimed;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for related groups * Entity for related groups
* *
@ -39,7 +41,7 @@ class RelatedGroup
private int $group_id; private int $group_id;
private int $related_group_id; private int $related_group_id;
private \DateTimeInterface $created; private DateTimeInterface $created;
public function setGroupId(int $group_id): self public function setGroupId(int $group_id): self
{ {
@ -61,12 +63,12 @@ class RelatedGroup
return $this->related_group_id; return $this->related_group_id;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for user remember me * Entity for user remember me
* *
@ -39,7 +41,7 @@ class RememberMe
private string $code; private string $code;
private int $user_id; private int $user_id;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setCode(string $code): self public function setCode(string $code): self
{ {
@ -61,12 +63,12 @@ class RememberMe
return $this->user_id; return $this->user_id;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Notice reply * Entity for Notice reply
* *
@ -39,7 +41,7 @@ class Reply
private int $notice_id; private int $notice_id;
private int $profile_id; private int $profile_id;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
private ?int $replied_id; private ?int $replied_id;
public function setNoticeId(int $notice_id): self public function setNoticeId(int $notice_id): self
@ -62,12 +64,12 @@ class Reply
return $this->profile_id; return $this->profile_id;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for the Schema Version * Entity for the Schema Version
* *
@ -39,7 +41,7 @@ class SchemaVersion
private string $table_name; private string $table_name;
private string $checksum; private string $checksum;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setTableName(string $table_name): self public function setTableName(string $table_name): self
{ {
@ -61,12 +63,12 @@ class SchemaVersion
return $this->checksum; return $this->checksum;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Superclass representing a saved session as it exists in the database. * Entity for Superclass representing a saved session as it exists in the database.
* *
@ -41,8 +43,8 @@ class Session
private string $id; private string $id;
private ?string $session_data; private ?string $session_data;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setId(string $id): self public function setId(string $id): self
{ {
@ -64,22 +66,22 @@ class Session
return $this->session_data; return $this->session_data;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for SMS carriers * Entity for SMS carriers
* *
@ -40,8 +42,8 @@ class SmsCarrier
private int $id; private int $id;
private ?string $name; private ?string $name;
private string $email_pattern; private string $email_pattern;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setId(int $id): self public function setId(int $id): self
{ {
@ -73,22 +75,22 @@ class SmsCarrier
return $this->email_pattern; return $this->email_pattern;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for subscription * Entity for subscription
* *
@ -45,8 +47,8 @@ class Subscription
private ?string $token; private ?string $token;
private ?string $secret; private ?string $secret;
private ?string $uri; private ?string $uri;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setSubscriber(int $subscriber): self public function setSubscriber(int $subscriber): self
{ {
@ -118,22 +120,22 @@ class Subscription
return $this->uri; return $this->uri;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for Subscription queue * Entity for Subscription queue
* *
@ -39,7 +41,7 @@ class SubscriptionQueue
private int $subscriber; private int $subscriber;
private int $subscribed; private int $subscribed;
private \DateTimeInterface $created; private DateTimeInterface $created;
public function setSubscriber(int $subscriber): self public function setSubscriber(int $subscriber): self
{ {
@ -61,12 +63,12 @@ class SubscriptionQueue
return $this->subscribed; return $this->subscribed;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for User token * Entity for User token
* *
@ -44,8 +46,8 @@ class Token
private ?int $state; private ?int $state;
private ?string $verifier; private ?string $verifier;
private ?string $verified_callback; private ?string $verified_callback;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setConsumerKey(string $consumer_key): self public function setConsumerKey(string $consumer_key): self
{ {
@ -117,22 +119,22 @@ class Token
return $this->verified_callback; return $this->verified_callback;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity that Keeps a list of unavailable status network names * Entity that Keeps a list of unavailable status network names
* *
@ -38,7 +40,7 @@ class UnavailableStatusNetwork
// {{{ Autocode // {{{ Autocode
private string $nickname; private string $nickname;
private \DateTimeInterface $created; private DateTimeInterface $created;
public function setNickname(string $nickname): self public function setNickname(string $nickname): self
{ {
@ -50,12 +52,12 @@ class UnavailableStatusNetwork
return $this->nickname; return $this->nickname;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for users * Entity for users
* *
@ -60,8 +62,8 @@ class User
private ?int $subscribe_policy; private ?int $subscribe_policy;
private ?string $urlshorteningservice; private ?string $urlshorteningservice;
private ?bool $private_stream; private ?bool $private_stream;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setId(int $id): self public function setId(int $id): self
{ {
@ -293,22 +295,22 @@ class User
return $this->private_stream; return $this->private_stream;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for groups a user is in * Entity for groups a user is in
* *
@ -48,8 +50,8 @@ class UserGroup
private ?string $homepage_logo; private ?string $homepage_logo;
private ?string $stream_logo; private ?string $stream_logo;
private ?string $mini_logo; private ?string $mini_logo;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
private ?string $uri; private ?string $uri;
private ?string $mainpage; private ?string $mainpage;
private ?int $join_policy; private ?int $join_policy;
@ -165,22 +167,22 @@ class UserGroup
return $this->mini_logo; return $this->mini_logo;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for user IM preferences * Entity for user IM preferences
* *
@ -41,8 +43,8 @@ class UserImPrefs
private bool $notify; private bool $notify;
private bool $replies; private bool $replies;
private bool $updatefrompresence; private bool $updatefrompresence;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setUserId(int $user_id): self public function setUserId(int $user_id): self
{ {
@ -104,22 +106,22 @@ class UserImPrefs
return $this->updatefrompresence; return $this->updatefrompresence;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for user location preferences * Entity for user location preferences
* *
@ -37,8 +39,8 @@ class UserLocationPrefs
private int $user_id; private int $user_id;
private ?bool $share_location; private ?bool $share_location;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setUserId(int $user_id): self public function setUserId(int $user_id): self
{ {
@ -60,22 +62,22 @@ class UserLocationPrefs
return $this->share_location; return $this->share_location;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for user's url shortener preferences * Entity for user's url shortener preferences
* *
@ -41,8 +43,8 @@ class UserUrlshortenerPrefs
private ?string $urlshorteningservice; private ?string $urlshorteningservice;
private int $maxurllength; private int $maxurllength;
private int $maxnoticelength; private int $maxnoticelength;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setUserId(int $user_id): self public function setUserId(int $user_id): self
{ {
@ -84,22 +86,22 @@ class UserUrlshortenerPrefs
return $this->maxnoticelength; return $this->maxnoticelength;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -4,7 +4,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -13,12 +13,14 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Entity; namespace App\Entity;
use DateTimeInterface;
/** /**
* Entity for association between user and username * Entity for association between user and username
* *
@ -40,8 +42,8 @@ class UserUsername
private string $provider_name; private string $provider_name;
private string $username; private string $username;
private int $user_id; private int $user_id;
private \DateTimeInterface $created; private DateTimeInterface $created;
private \DateTimeInterface $modified; private DateTimeInterface $modified;
public function setProviderName(string $provider_name): self public function setProviderName(string $provider_name): self
{ {
@ -73,22 +75,22 @@ class UserUsername
return $this->user_id; return $this->user_id;
} }
public function setCreated(\DateTimeInterface $created): self public function setCreated(DateTimeInterface $created): self
{ {
$this->created = $created; $this->created = $created;
return $this; return $this;
} }
public function getCreated(): \DateTimeInterface public function getCreated(): DateTimeInterface
{ {
return $this->created; return $this->created;
} }
public function setModified(\DateTimeInterface $modified): self public function setModified(DateTimeInterface $modified): self
{ {
$this->modified = $modified; $this->modified = $modified;
return $this; return $this;
} }
public function getModified(): \DateTimeInterface public function getModified(): DateTimeInterface
{ {
return $this->modified; return $this->modified;
} }

View File

@ -115,6 +115,6 @@ class Kernel extends BaseKernel
{ {
parent::build($container); parent::build($container);
$container->addCompilerPass(new SchemaDefPass($container)); $container->addCompilerPass(new SchemaDefPass());
} }
} }

View File

@ -30,12 +30,13 @@
namespace App\Routes; namespace App\Routes;
use App\Controller\NetworkPublic;
use App\Util\RouteLoader; use App\Util\RouteLoader;
abstract class Main abstract class Main
{ {
public static function load(RouteLoader $r): void public static function load(RouteLoader $r): void
{ {
$r->connect('main_all', '/main/all', \App\Controller\NetworkPublic::class); $r->connect('main_all', '/main/all', NetworkPublic::class);
} }
} }

View File

@ -31,20 +31,33 @@
namespace App\Util; namespace App\Util;
use Functional as F; use Functional as F;
use InvalidArgumentException;
use Symfony\Component\Config\Definition\Exception\Exception; use Symfony\Component\Config\Definition\Exception\Exception;
use const DIRECTORY_SEPARATOR;
abstract class Common abstract class Common
{ {
/**
* Access sysadmin's configuration preferences for GNU social
*
* @param string $section
* @param string $field
* @return mixed
*/
public static function config(string $section, string $field) public static function config(string $section, string $field)
{ {
// TODO: implement it x)
return [];
} }
/** /**
* Normalize path by converting \ to / * Normalize path by converting \ to /
* @param string $path
* @return string
*/ */
public static function normalizePath(string $path): string public static function normalizePath(string $path): string
{ {
if (\DIRECTORY_SEPARATOR !== '/') { if (DIRECTORY_SEPARATOR !== '/') {
$path = strtr($path, DIRECTORY_SEPARATOR, '/'); $path = strtr($path, DIRECTORY_SEPARATOR, '/');
} }
return $path; return $path;
@ -52,6 +65,8 @@ abstract class Common
/** /**
* Get plugin name from it's path, or null if not a plugin * Get plugin name from it's path, or null if not a plugin
* @param string $path
* @return string|null
*/ */
public static function pluginFromPath(string $path): ?string public static function pluginFromPath(string $path): ?string
{ {
@ -75,6 +90,8 @@ abstract class Common
* Check whether $haystack starts with $needle * Check whether $haystack starts with $needle
* *
* @param array|string $haystack if array, check that all strings start with $needle * @param array|string $haystack if array, check that all strings start with $needle
* @param string $needle
* @return bool
*/ */
public static function startsWith($haystack, string $needle): bool public static function startsWith($haystack, string $needle): bool
{ {
@ -92,6 +109,8 @@ abstract class Common
* Check whether $haystack ends with $needle * Check whether $haystack ends with $needle
* *
* @param array|string $haystack if array, check that all strings end with $needle * @param array|string $haystack if array, check that all strings end with $needle
* @param string $needle
* @return bool
*/ */
public static function endsWith($haystack, string $needle) public static function endsWith($haystack, string $needle)
{ {
@ -111,6 +130,9 @@ abstract class Common
/** /**
* Call $func with only abs($count) arguments, taken either from the * Call $func with only abs($count) arguments, taken either from the
* left or right depending on the sign * left or right depending on the sign
* @param callable $func
* @param int $count
* @return callable
*/ */
public static function arity(callable $func, int $count): callable public static function arity(callable $func, int $count): callable
{ {
@ -122,12 +144,20 @@ abstract class Common
}; };
} }
public static function toSnakeCase(string $str): string /**
* @param string $str
* @return string
*/
public static function camelCaseToSnakeCase(string $str): string
{ {
return strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $str)); return strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $str));
} }
public static function toCamelCase(string $str): string /**
* @param string $str
* @return string
*/
public static function snakeCaseToCamelCase(string $str): string
{ {
return implode('', F\map(preg_split('/[\b_]/', $str), self::arity('ucfirst', 1))); return implode('', F\map(preg_split('/[\b_]/', $str), self::arity('ucfirst', 1)));
} }
@ -136,6 +166,9 @@ abstract class Common
* Indent $in, a string or array, $level levels * Indent $in, a string or array, $level levels
* *
* @param array|string $in * @param array|string $in
* @param int $level
* @param int $count
* @return string
*/ */
public static function indent($in, int $level = 1, int $count = 2): string public static function indent($in, int $level = 1, int $count = 2): string
{ {
@ -149,5 +182,6 @@ abstract class Common
return F\concat($indent . $val); return F\concat($indent . $val);
})); }));
} }
throw new InvalidArgumentException('Common:indent first parameter must be either an array or a string. Input was: '.$in);
} }
} }

View File

@ -57,6 +57,9 @@ class GNUsocial implements EventSubscriberInterface
/** /**
* Symfony dependency injection gives us access to these services * Symfony dependency injection gives us access to these services
* @param ContainerInterface $container
* @param LoggerInterface $logger
* @param TranslatorInterface $translator
*/ */
public function __construct(ContainerInterface $container, public function __construct(ContainerInterface $container,
LoggerInterface $logger, LoggerInterface $logger,
@ -69,6 +72,7 @@ class GNUsocial implements EventSubscriberInterface
/** /**
* Store these services to be accessed statically and load modules * Store these services to be accessed statically and load modules
* @param EventDispatcherInterface $event_dispatcher
*/ */
public function register(EventDispatcherInterface $event_dispatcher): void public function register(EventDispatcherInterface $event_dispatcher): void
{ {
@ -81,6 +85,10 @@ class GNUsocial implements EventSubscriberInterface
/** /**
* Event very early on in the Symfony HTTP lifecycle, but after everyting is registered * Event very early on in the Symfony HTTP lifecycle, but after everyting is registered
* where we get access to the event dispatcher * where we get access to the event dispatcher
* @param RequestEvent $event
* @param string $event_name
* @param EventDispatcherInterface $event_dispatcher
* @return RequestEvent
*/ */
public function onKernelRequest(RequestEvent $event, public function onKernelRequest(RequestEvent $event,
string $event_name, string $event_name,
@ -92,6 +100,10 @@ class GNUsocial implements EventSubscriberInterface
/** /**
* Event after everything is initialized when using the `bin/console` command * Event after everything is initialized when using the `bin/console` command
* @param ConsoleCommandEvent $event
* @param string $event_name
* @param EventDispatcherInterface $event_dispatcher
* @return ConsoleCommandEvent
*/ */
public function onCommand(ConsoleCommandEvent $event, public function onCommand(ConsoleCommandEvent $event,
string $event_name, string $event_name,

View File

@ -73,6 +73,7 @@ abstract class GSEvent
* @param callable $handler Code to run * @param callable $handler Code to run
* @param int $priority Higher runs first * @param int $priority Higher runs first
* *
* @param string $ns
* @return void * @return void
*/ */
public static function addHandler(string $name, public static function addHandler(string $name,
@ -139,7 +140,7 @@ abstract class GSEvent
$listeners = self::$dispatcher->getListeners($name); $listeners = self::$dispatcher->getListeners($name);
if (isset($plugin)) { if (isset($plugin)) {
foreach ($listeners as $handler) { foreach ($listeners as $handler) {
if (\get_class($handler[0]) == $plugin) { if (get_class($handler[0]) == $plugin) {
return true; return true;
} }
} }

View File

@ -3,7 +3,7 @@
// This file is part of GNU social - https://www.gnu.org/software/soci // This file is part of GNU social - https://www.gnu.org/software/soci
// //
// GNU social is free software: you can redistribute it and/or modify // GNU social is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as publ // it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
@ -12,7 +12,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details. // GNU Affero General Public License for more details.
// //
// You should have received a copy of the GNU Affero General Public Li // You should have received a copy of the GNU Affero General Public License
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
@ -32,7 +32,10 @@ abstract class HTML
/** /**
* Creates an HTML tag without attributes * Creates an HTML tag without attributes
* *
* @param string $tag
* @param array|string $content * @param array|string $content
* @param bool $empty_tag
* @return array
*/ */
private static function tag(string $tag, $content = '', bool $empty_tag = false): array private static function tag(string $tag, $content = '', bool $empty_tag = false): array
{ {
@ -42,8 +45,11 @@ abstract class HTML
/** /**
* Create tag, possibly with attributes and indentation * Create tag, possibly with attributes and indentation
* *
* @param string $tag
* @param array|string $attrs - element attributes * @param array|string $attrs - element attributes
* @param array|string $content - what goes inside the tag * @param array|string $content - what goes inside the tag
* @param bool $empty_tag
* @return array
*/ */
private static function attr_tag(string $tag, $attrs, $content = '', bool $empty_tag = false): array private static function attr_tag(string $tag, $attrs, $content = '', bool $empty_tag = false): array
{ {
@ -59,13 +65,18 @@ abstract class HTML
/** /**
* Attribute with given optional value * Attribute with given optional value
* *
* @param array $attr * @param array $attrs
* @return string
*/ */
private static function attr(array $attrs): string private static function attr(array $attrs): string
{ {
return ' ' . implode(' ', F\map($attrs, function ($val, $key, $_) { return "{$key} = '{$val}'"; })); return ' ' . implode(' ', F\map($attrs, function ($val, $key, $_) { return "{$key} = '{$val}'"; }));
} }
/**
* @param $html
* @return string
*/
public static function html($html): string public static function html($html): string
{ {
if (is_string($html)) { if (is_string($html)) {

View File

@ -46,11 +46,12 @@ $LC_CATEGORIES = [
'LC_ALL', 'LC_ALL',
]; ];
foreach ($LC_CATEGORIES as $key => $name) { foreach ($LC_CATEGORIES as $key => $name) {
if (!\defined($name)) { if (!defined($name)) {
define($name, $key); define($name, $key);
} }
} }
use InvalidArgumentException;
use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Contracts\Translation\TranslatorInterface;
abstract class I18n abstract class I18n
@ -105,21 +106,21 @@ abstract class I18n
* *
* _m($msg) -- simple message * _m($msg) -- simple message
* _m($ctx, $msg) -- message with context * _m($ctx, $msg) -- message with context
* _m($msg1, $msg2, $n) -- message that cann be singular or plural * _m($msg1, $msg2, $n) -- message that can be singular or plural
* _m($ctx, $msg1, $msg2, $n) -- combination of the previous two * _m($ctx, $msg1, $msg2, $n) -- combination of the previous two
* *
* @param string $msg * @param string $msg
* @param extra params as described above * @param extra params as described above
* *
* @throws Exception * @throws InvalidArgumentException
* *
* @return string * @return string
*/ */
function _m(string $msg /*, ...*/): string function _m(string $msg /*, ...*/): string
{ {
$domain = I18n::_mdomain(\debug_backtrace()); $domain = I18n::_mdomain(debug_backtrace());
$args = func_get_args(); $args = func_get_args();
switch (\count($args)) { switch (count($args)) {
case 1: case 1:
// Empty parameters // Empty parameters
return I18n::$translator->trans($msg, [], $domain); return I18n::$translator->trans($msg, [], $domain);
@ -143,7 +144,7 @@ function _m(string $msg /*, ...*/): string
return I18n::$translator->trans($context . '\004' . $msg_single . '|' . $msg_plural, return I18n::$translator->trans($context . '\004' . $msg_single . '|' . $msg_plural,
['%d' => $n], $domain); ['%d' => $n], $domain);
default: default:
throw new Exception('Bad parameter count to _m()'); throw new InvalidArgumentException('Bad parameter count to _m()');
} }
} }
@ -191,7 +192,7 @@ function client_preferred_language(string $http_accept_lang_header): string
function get_nice_language_list(): array function get_nice_language_list(): array
{ {
$nice_lang = []; $nice_lang = [];
$all_languages = common_config('site', 'languages'); $all_languages = Common::config('site', 'languages');
foreach ($all_languages as $lang) { foreach ($all_languages as $lang) {
$nice_lang[$lang['lang']] = $lang['name']; $nice_lang[$lang['lang']] = $lang['name'];
@ -202,17 +203,18 @@ function get_nice_language_list(): array
/** /**
* Check whether a language is right-to-left * Check whether a language is right-to-left
* *
* @param string $lang language code of the language to check * @param string $lang_value language code of the language to check
* *
* @return bool true if language is rtl * @return bool true if language is rtl
*/ */
function is_rtl(string $lang_value): bool function is_rtl(string $lang_value): bool
{ {
foreach (common_config('site', 'languages') as $code => $info) { foreach (Common::config('site', 'languages') as $code => $info) {
if ($lang_value == $info['lang']) { if ($lang_value == $info['lang']) {
return $info['direction'] == 'rtl'; return $info['direction'] == 'rtl';
} }
} }
throw new InvalidArgumentException('is_rtl function received an invalid lang to test. Lang was: '.$lang_value);
} }
/** /**

View File

@ -44,44 +44,66 @@ class Log
/** /**
* Simple static wrappers around Monolog's functions * Simple static wrappers around Monolog's functions
* @param string $msg
*/ */
public static function emergency(string $msg): void public static function emergency(string $msg): void
{ {
self::$logger->emergency($msg); self::$logger->emergency($msg);
} }
/**
* @param string $msg
*/
public static function alert(string $msg): void public static function alert(string $msg): void
{ {
self::$logger->alert($msg); self::$logger->alert($msg);
} }
/**
* @param string $msg
*/
public static function critical(string $msg): void public static function critical(string $msg): void
{ {
self::$logger->critical($msg); self::$logger->critical($msg);
} }
/**
* @param string $msg
*/
public static function error(string $msg): void public static function error(string $msg): void
{ {
self::$logger->error($msg); self::$logger->error($msg);
} }
/**
* @param string $msg
*/
public static function warning(string $msg): void public static function warning(string $msg): void
{ {
self::$logger->warning($msg); self::$logger->warning($msg);
} }
/**
* @param string $msg
*/
public static function notice(string $msg): void public static function notice(string $msg): void
{ {
self::$logger->notice($msg); self::$logger->notice($msg);
} }
/**
* @param string $msg
*/
public static function info(string $msg): void public static function info(string $msg): void
{ {
self::$logger->info($msg); self::$logger->info($msg);
} }
/**
* @param string $msg
*/
public static function debug(string $msg): void public static function debug(string $msg): void
{ {
$logger->debug($msg); self::$logger->debug($msg);
} }
} }

View File

@ -43,10 +43,12 @@ class RouteLoader extends Loader
/** /**
* Route loading entry point, called from `config/routes.php` * Route loading entry point, called from `config/routes.php`
* *
* Must comform to symfony's interface, but the $resource is unused * Must conform to symfony's interface, but the $resource is unused
* and $type must not be null * and $type must not be null
* *
* @param mixed $resource * @param mixed $resource
* @param string|null $type
* @return RouteCollection
*/ */
public function load($resource, string $type = null): RouteCollection public function load($resource, string $type = null): RouteCollection
{ {
@ -65,8 +67,11 @@ class RouteLoader extends Loader
/** /**
* Connect a route to a controller * Connect a route to a controller
* *
* @param string $id
* @param string $uri_path
* @param mixed $target Some kind of callable, typically [object, method] * @param mixed $target Some kind of callable, typically [object, method]
* @param ?array $options Possible keys are ['condition', 'defaults', 'format', * @param array|null $param_reqs
* @param array|null $options Possible keys are ['condition', 'defaults', 'format',
* 'fragment', 'http-methods', 'locale', 'methods', 'schemes'] * 'fragment', 'http-methods', 'locale', 'methods', 'schemes']
* 'http-methods' and 'methods' are aliases * 'http-methods' and 'methods' are aliases
*/ */
@ -112,6 +117,8 @@ class RouteLoader extends Loader
* `config/routes.php` * `config/routes.php`
* *
* @param mixed $resource Unused * @param mixed $resource Unused
* @param string|null $type
* @return bool
*/ */
public function supports($resource, string $type = null) public function supports($resource, string $type = null)
{ {

View File

@ -146,6 +146,7 @@ class SchemaDefDriver extends StaticPHPDriver
* instead of `loadMetadata`. * instead of `loadMetadata`.
* *
* @param string $class_name * @param string $class_name
* @return bool
*/ */
public function isTransient($class_name) public function isTransient($class_name)
{ {
@ -154,6 +155,8 @@ class SchemaDefDriver extends StaticPHPDriver
/** /**
* Convert [$key => $val] to ['name' => $key, 'columns' => $val] * Convert [$key => $val] to ['name' => $key, 'columns' => $val]
* @param array $arr
* @return array
*/ */
private static function kv_to_name_col(array $arr): array private static function kv_to_name_col(array $arr): array
{ {

View File

@ -4,8 +4,8 @@ use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__) . '/vendor/autoload.php'; require dirname(__DIR__) . '/vendor/autoload.php';
if (\file_exists(\dirname(__DIR__) . '/config/bootstrap.php')) { if (file_exists(dirname(__DIR__) . '/config/bootstrap.php')) {
require dirname(__DIR__) . '/config/bootstrap.php'; require dirname(__DIR__) . '/config/bootstrap.php';
} elseif (\method_exists(Dotenv::class, 'bootEnv')) { } elseif (method_exists(Dotenv::class, 'bootEnv')) {
(new Dotenv())->bootEnv(\dirname(__DIR__) . '/.env'); (new Dotenv())->bootEnv(dirname(__DIR__) . '/.env');
} }