diff --git a/bin/auth_ejabberd.php b/bin/auth_ejabberd.php index 13dc6eeba..930fa853c 100755 --- a/bin/auth_ejabberd.php +++ b/bin/auth_ejabberd.php @@ -1,6 +1,23 @@ #!/usr/bin/env php . + * * ejabberd extauth script for the integration with friendica * * Originally written for joomla by Dalibor Karlovic diff --git a/bin/console.php b/bin/console.php index a6513a2e8..27522d855 100755 --- a/bin/console.php +++ b/bin/console.php @@ -1,5 +1,24 @@ #!/usr/bin/env php . + * + */ use Dice\Dice; use Psr\Log\LoggerInterface; diff --git a/bin/testargs.php b/bin/testargs.php index a0ddea345..b7d7125f7 100644 --- a/bin/testargs.php +++ b/bin/testargs.php @@ -1,10 +1,22 @@ . * - * Purpose: * During installation we need to check if register_argc_argv is * enabled for the command line PHP processor, because otherwise * deliveries will fail. So we will do a shell exec of php and diff --git a/bin/wait-for-connection b/bin/wait-for-connection index e73a98b07..b6c03a670 100755 --- a/bin/wait-for-connection +++ b/bin/wait-for-connection @@ -1,8 +1,23 @@ #!/usr/bin/php - . + * * This script tries to connect to a database for a given interval * Useful in case of installation e.g. to wait for the database to not generate unnecessary errors * diff --git a/include/api.php b/include/api.php index dda4631ce..567e3cc43 100644 --- a/include/api.php +++ b/include/api.php @@ -1,5 +1,22 @@ . + * * Friendica implementation of statusnet/twitter API * * @file include/api.php diff --git a/include/dba.php b/include/dba.php index a90ec26fb..5f633afaa 100644 --- a/include/dba.php +++ b/include/dba.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\Database\DBA; diff --git a/mod/msearch.php b/mod/msearch.php index 958477600..48476da4f 100644 --- a/mod/msearch.php +++ b/mod/msearch.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Database\DBA; diff --git a/mod/poco.php b/mod/poco.php index d8941e51a..b306f2bf7 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -1,8 +1,24 @@ . + * + * @see https://web.archive.org/web/20160405005550/http://portablecontacts.net/draft-spec.html + */ use Friendica\App; use Friendica\Content\Text\BBCode; diff --git a/mod/pubsub.php b/mod/pubsub.php index 31c0634dc..cae346493 100644 --- a/mod/pubsub.php +++ b/mod/pubsub.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Core\Logger; diff --git a/mod/pubsubhubbub.php b/mod/pubsubhubbub.php index 2ffaaf729..3d6b48fd4 100644 --- a/mod/pubsubhubbub.php +++ b/mod/pubsubhubbub.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Core\Logger; diff --git a/mod/redir.php b/mod/redir.php index 1d36065e9..56cb13a06 100644 --- a/mod/redir.php +++ b/mod/redir.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Core\Logger; diff --git a/mod/share.php b/mod/share.php index 6f368b1d1..998ebe5fd 100644 --- a/mod/share.php +++ b/mod/share.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Database\DBA; diff --git a/mod/update_community.php b/mod/update_community.php index c861b750e..8a12142eb 100644 --- a/mod/update_community.php +++ b/mod/update_community.php @@ -1,6 +1,24 @@ . + * + * See update_profile.php for documentation + */ use Friendica\App; use Friendica\DI; diff --git a/mod/update_contact.php b/mod/update_contact.php index bd9ced0e9..768ff0c74 100644 --- a/mod/update_contact.php +++ b/mod/update_contact.php @@ -1,6 +1,25 @@ . + * + * See update_profile.php for documentation + * + */ use Friendica\App; use Friendica\DI; diff --git a/mod/update_notes.php b/mod/update_notes.php index 4065b5d1f..87822f513 100644 --- a/mod/update_notes.php +++ b/mod/update_notes.php @@ -1,8 +1,23 @@ . + * + * AJAX synchronisation of notes page */ use Friendica\App; diff --git a/mods/fpostit/fpostit.php b/mods/fpostit/fpostit.php index 3a2f0d15f..ad4a53c92 100644 --- a/mods/fpostit/fpostit.php +++ b/mods/fpostit/fpostit.php @@ -1,4 +1,23 @@ . + * + */ if (($_POST["friendica_acct_name"] != '') && ($_POST["friendica_password"] != '')) { setcookie("username", $_POST["friendica_acct_name"], time()+60*60*24*300); diff --git a/src/Content/Widget/CalendarExport.php b/src/Content/Widget/CalendarExport.php index 693be2d6f..dda3513fe 100644 --- a/src/Content/Widget/CalendarExport.php +++ b/src/Content/Widget/CalendarExport.php @@ -1,7 +1,22 @@ . + * */ namespace Friendica\Content\Widget; diff --git a/src/Content/Widget/ContactBlock.php b/src/Content/Widget/ContactBlock.php index bce4b617f..47fac09a8 100644 --- a/src/Content/Widget/ContactBlock.php +++ b/src/Content/Widget/ContactBlock.php @@ -1,7 +1,22 @@ . + * */ namespace Friendica\Content\Widget; diff --git a/src/Content/Widget/TagCloud.php b/src/Content/Widget/TagCloud.php index f57d5c3f2..006aef916 100644 --- a/src/Content/Widget/TagCloud.php +++ b/src/Content/Widget/TagCloud.php @@ -1,7 +1,22 @@ . + * */ namespace Friendica\Content\Widget; diff --git a/src/Network/HTTPException.php b/src/Network/HTTPException.php index 89c447b71..b6be886b3 100644 --- a/src/Network/HTTPException.php +++ b/src/Network/HTTPException.php @@ -1,4 +1,27 @@ . + * + */ + +namespace Friendica\Network; + +use Exception; /** * Throwable exceptions to return HTTP status code @@ -6,11 +29,6 @@ * This list of Exception has been extracted from * here http://racksburg.com/choosing-an-http-status-code/ */ - -namespace Friendica\Network; - -use Exception; - abstract class HTTPException extends Exception { public $httpdesc = ''; diff --git a/src/Util/ExAuth.php b/src/Util/ExAuth.php index e21020829..de13ee82f 100644 --- a/src/Util/ExAuth.php +++ b/src/Util/ExAuth.php @@ -1,6 +1,6 @@ diff --git a/src/Util/FileSystem.php b/src/Util/FileSystem.php index c082fb2d1..5791fed23 100644 --- a/src/Util/FileSystem.php +++ b/src/Util/FileSystem.php @@ -24,7 +24,7 @@ namespace Friendica\Util; /** * Util class for filesystem manipulation */ -final class FileSystem +class FileSystem { /** * @var string a error message diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 87cfdd11c..da92391dd 100755 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -1,6 +1,23 @@ . + * + * Main database structure configuration file. * * Here are described all the tables, fields and indexes Friendica needs to work. * diff --git a/static/defaults.config.php b/static/defaults.config.php index dfec158cf..f9eda841f 100644 --- a/static/defaults.config.php +++ b/static/defaults.config.php @@ -1,12 +1,28 @@ . + * + * This file declares the default values for the base config of Friendica. * * These configuration values aren't accessible from the admin settings page and custom values must be set in config/local.config.php * * Please don't edit this file directly as its content may change in the upcoming versions. + * */ return [ diff --git a/static/dependencies.config.php b/static/dependencies.config.php index 51fff6228..84344a60e 100644 --- a/static/dependencies.config.php +++ b/static/dependencies.config.php @@ -1,4 +1,37 @@ . + * + * The configuration defines "complex" dependencies inside Friendica + * So this classes shouldn't be simple or their dependencies are already defined here. + * + * This kind of dependencies are NOT required to be defined here: + * - $a = new ClassA(new ClassB()); + * - $a = new ClassA(); + * - $a = new ClassA(Configuration $configuration); + * + * This kind of dependencies SHOULD be defined here: + * - $a = new ClassA(); + * $b = $a->create(); + * + * - $a = new ClassA($creationPassedVariable); + * + */ use Dice\Dice; use Friendica\App; @@ -16,22 +49,6 @@ use Friendica\Model\User\Cookie; use Friendica\Util; use Psr\Log\LoggerInterface; -/** - * The configuration defines "complex" dependencies inside Friendica - * So this classes shouldn't be simple or their dependencies are already defined here. - * - * This kind of dependencies are NOT required to be defined here: - * - $a = new ClassA(new ClassB()); - * - $a = new ClassA(); - * - $a = new ClassA(Configuration $configuration); - * - * This kind of dependencies SHOULD be defined here: - * - $a = new ClassA(); - * $b = $a->create(); - * - * - $a = new ClassA($creationPassedVariable); - * - */ return [ '*' => [ // marks all class result as shared for other creations, so there's just diff --git a/static/routes.config.php b/static/routes.config.php index dd757b518..34f4b6d6f 100644 --- a/static/routes.config.php +++ b/static/routes.config.php @@ -1,17 +1,35 @@ . + * + * Configuration for the default routes in Friendica + * + * The syntax is either + * - 'route' => [ Module::class , [ HTTPMethod(s) ] ] + * - 'group' => [ 'route' => [ Module::class, [ HTTPMethod(s) ] ] + * + * It's possible to create recursive groups + * + */ use Friendica\App\Router as R; use Friendica\Module; -/** -* Configuration for the default routes in Friendica -* -* The syntax is either -* - 'route' => [ Module::class , [ HTTPMethod(s) ] ] -* - 'group' => [ 'route' => [ Module::class, [ HTTPMethod(s) ] ] -* -* It's possible to create recursive groups -*/ return [ '/' => [Module\Home::class, [R::GET]], diff --git a/static/settings.config.php b/static/settings.config.php index a5c6c3aea..abfb1024e 100644 --- a/static/settings.config.php +++ b/static/settings.config.php @@ -1,12 +1,28 @@ . + * + * This file declares the default values for the admin settings of Friendica. * * These values will be overridden by the admin settings page. * * Please don't edit this file directly as its content may change in the upcoming versions. + * */ return [ diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index 7421f16a0..1e581725d 100644 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -1,6 +1,22 @@ . + * */ namespace Friendica\Test; diff --git a/tests/DatabaseTestTrait.php b/tests/DatabaseTestTrait.php index 49dc999b6..5f753f315 100644 --- a/tests/DatabaseTestTrait.php +++ b/tests/DatabaseTestTrait.php @@ -1,6 +1,22 @@ . + * */ namespace Friendica\Test; diff --git a/tests/Util/SampleStorageBackendInstance.php b/tests/Util/SampleStorageBackendInstance.php index ceb329cb3..02afc7d75 100644 --- a/tests/Util/SampleStorageBackendInstance.php +++ b/tests/Util/SampleStorageBackendInstance.php @@ -1,6 +1,24 @@ . + * + * Contains a test-hook call for creating a storage instance + */ use Friendica\App; use Friendica\Core\L10n; diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 8b4b8ade1..bf95252f1 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,5 +1,22 @@ . + * * This file is loaded by PHPUnit before any test. */ diff --git a/tests/datasets/api.fixture.php b/tests/datasets/api.fixture.php index 44501d049..8bb701da1 100644 --- a/tests/datasets/api.fixture.php +++ b/tests/datasets/api.fixture.php @@ -1,4 +1,23 @@ . + * + */ return [ // Empty these tables diff --git a/tests/datasets/storage/database.fixture.php b/tests/datasets/storage/database.fixture.php index 780bfa140..442b40e73 100644 --- a/tests/datasets/storage/database.fixture.php +++ b/tests/datasets/storage/database.fixture.php @@ -1,4 +1,23 @@ . + * + */ return [ 'photo' => [ diff --git a/tests/src/Core/InstallerTest.php b/tests/src/Core/InstallerTest.php index 371932caf..f512bf17b 100644 --- a/tests/src/Core/InstallerTest.php +++ b/tests/src/Core/InstallerTest.php @@ -1,4 +1,23 @@ . + * + */ // this is in the same namespace as Install for mocking 'function_exists' namespace Friendica\Core; diff --git a/tests/src/Util/CryptoTest.php b/tests/src/Util/CryptoTest.php index 76e3076f0..9f232210c 100644 --- a/tests/src/Util/CryptoTest.php +++ b/tests/src/Util/CryptoTest.php @@ -1,6 +1,24 @@ . + * + * This is in the same namespace as Crypto for mocking 'rand' and 'random_init' + */ namespace Friendica\Util; use PHPUnit\Framework\TestCase; diff --git a/update.php b/update.php index f86fea8df..06287516f 100644 --- a/update.php +++ b/update.php @@ -1,21 +1,23 @@ . + * + * Automatic post-databse structure change updates * * These functions are responsible for doing critical post update changes to the data (not the structure) in the database. * @@ -38,6 +40,20 @@ use Friendica\Worker\Delivery; * If you need to run a script before the database update, name the function "pre_update_4712()" */ +use Friendica\Core\Addon; +use Friendica\Core\Logger; +use Friendica\Core\Update; +use Friendica\Core\Worker; +use Friendica\Database\DBA; +use Friendica\DI; +use Friendica\Model\Contact; +use Friendica\Model\GContact; +use Friendica\Model\Item; +use Friendica\Model\User; +use Friendica\Model\Storage; +use Friendica\Util\DateTimeFormat; +use Friendica\Worker\Delivery; + function update_1178() { require_once 'mod/profiles.php'; diff --git a/view/theme/duepuntozero/theme.php b/view/theme/duepuntozero/theme.php index 8548899a7..33ad00baf 100644 --- a/view/theme/duepuntozero/theme.php +++ b/view/theme/duepuntozero/theme.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Core\Renderer; diff --git a/view/theme/frio/config.php b/view/theme/frio/config.php index d0d1c8cb7..511008eaa 100644 --- a/view/theme/frio/config.php +++ b/view/theme/frio/config.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Core\Renderer; diff --git a/view/theme/frio/php/scheme.php b/view/theme/frio/php/scheme.php index d2c209d64..42fc21ab8 100644 --- a/view/theme/frio/php/scheme.php +++ b/view/theme/frio/php/scheme.php @@ -1,6 +1,22 @@ . + * * Get info header of the scheme * * This function parses the header of the schemename.php file for informations like