diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 73% rename from .php_cs.dist rename to .php-cs-fixer.dist.php index c276167..070f4f8 100644 --- a/.php_cs.dist +++ b/.php-cs-fixer.dist.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; const BASE = __DIR__.DIRECTORY_SEPARATOR; @@ -13,7 +14,10 @@ $paths = [ BASE."arsse.php", BASE."RoboFile.php", BASE."lib", - BASE."tests", + BASE."tests/cases", + BASE."tests/lib", + BASE."tests/bootstrap.php", + BASE."tests/server.php", ]; $rules = [ // house rules where PSR series is silent @@ -35,6 +39,7 @@ $rules = [ 'no_blank_lines_after_phpdoc' => true, 'no_empty_comment' => true, 'no_empty_phpdoc' => true, + 'no_empty_statement' => true, 'no_extra_blank_lines' => true, // this could probably use more configuration 'no_mixed_echo_print' => ['use' => "echo"], 'no_short_bool_cast' => true, @@ -48,26 +53,11 @@ $rules = [ 'pow_to_exponentiation' => true, 'set_type_to_cast' => true, 'standardize_not_equals' => true, - 'trailing_comma_in_multiline_array' => true, + 'trailing_comma_in_multiline' => ['elements' => ["arrays"]], 'unary_operator_spaces' => true, 'yoda_style' => false, // PSR standard to apply - '@PSR2' => true, - // PSR-12 rules; php-cs-fixer does not yet support PSR-12 natively - 'compact_nullable_typehint' => true, - 'declare_equal_normalize' => ['space' => "none"], - 'function_typehint_space' => true, - 'lowercase_cast' => true, - 'lowercase_static_reference' => true, - 'no_alternative_syntax' => true, - 'no_empty_statement' => true, - 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, - 'no_whitespace_in_blank_line' => true, - 'return_type_declaration' => ['space_before' => "none"], - 'single_trait_insert_per_statement' => true, - 'short_scalar_cast' => true, - 'visibility_required' => ['elements' => ["const", "property", "method"]], + '@PSR12' => true, // house exceptions to PSR rules 'braces' => ['position_after_functions_and_oop_constructs' => "same"], 'function_declaration' => ['closure_function_spacing' => "none"], @@ -82,4 +72,4 @@ foreach ($paths as $path) { $finder = $finder->in($path); } } -return \PhpCsFixer\Config::create()->setRiskyAllowed(true)->setRules($rules)->setFinder($finder); +return (new \PhpCsFixer\Config)->setRiskyAllowed(true)->setRules($rules)->setFinder($finder); diff --git a/RoboFile.php b/RoboFile.php index 42a67de..7a85261 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -164,7 +164,7 @@ class RoboFile extends \Robo\Tasks { if ( (IS_WIN && (!exec(escapeshellarg($bin)." --help $blackhole", $junk, $status) || $status)) || (!IS_WIN && (!exec("which ".escapeshellarg($bin)." $blackhole", $junk, $status) || $status)) - ) { + ) { return false; } } diff --git a/arsse.php b/arsse.php index dff59c0..40ca613 100644 --- a/arsse.php +++ b/arsse.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; const BASE = __DIR__.DIRECTORY_SEPARATOR; diff --git a/lib/AbstractException.php b/lib/AbstractException.php index cde92dc..20c6c1d 100644 --- a/lib/AbstractException.php +++ b/lib/AbstractException.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; abstract class AbstractException extends \Exception { diff --git a/lib/Arsse.php b/lib/Arsse.php index d29f686..7b34888 100644 --- a/lib/Arsse.php +++ b/lib/Arsse.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; class Arsse { diff --git a/lib/CLI.php b/lib/CLI.php index 9e9993e..ec24362 100644 --- a/lib/CLI.php +++ b/lib/CLI.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; use JKingWeb\Arsse\REST\Fever\User as Fever; diff --git a/lib/Conf.php b/lib/Conf.php index 07a8e5d..81c10bf 100644 --- a/lib/Conf.php +++ b/lib/Conf.php @@ -5,6 +5,7 @@ /** Conf class */ declare(strict_types=1); + namespace JKingWeb\Arsse; use AllowDynamicProperties; @@ -15,7 +16,7 @@ use JKingWeb\Arsse\Misc\ValueInfo as Value; * The Conf class serves both as a means of importing and querying configuration information, as well as a source for default parameters when a configuration file does not specify a value. * All public properties are configuration parameters that may be set by the server administrator. */ #[AllowDynamicProperties] - class Conf { +class Conf { /** @var string Default language to use for logging and errors */ public $lang = "en"; diff --git a/lib/Conf/Exception.php b/lib/Conf/Exception.php index 3b3247e..cdc3a81 100644 --- a/lib/Conf/Exception.php +++ b/lib/Conf/Exception.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Conf; class Exception extends \JKingWeb\Arsse\AbstractException { diff --git a/lib/Context/AbstractContext.php b/lib/Context/AbstractContext.php index d86ef39..be18a58 100644 --- a/lib/Context/AbstractContext.php +++ b/lib/Context/AbstractContext.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Context; abstract class AbstractContext { diff --git a/lib/Context/BooleanMembers.php b/lib/Context/BooleanMembers.php index e13be6f..6cf6b38 100644 --- a/lib/Context/BooleanMembers.php +++ b/lib/Context/BooleanMembers.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Context; trait BooleanMembers { diff --git a/lib/Context/Context.php b/lib/Context/Context.php index 4ab9595..c95cbaf 100644 --- a/lib/Context/Context.php +++ b/lib/Context/Context.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Context; class Context extends RootContext { diff --git a/lib/Context/ExclusionContext.php b/lib/Context/ExclusionContext.php index cf67625..9e484f1 100644 --- a/lib/Context/ExclusionContext.php +++ b/lib/Context/ExclusionContext.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Context; class ExclusionContext extends AbstractContext { diff --git a/lib/Context/ExclusionMembers.php b/lib/Context/ExclusionMembers.php index b326f6d..45fbf1a 100644 --- a/lib/Context/ExclusionMembers.php +++ b/lib/Context/ExclusionMembers.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Context; use JKingWeb\Arsse\Misc\ValueInfo; @@ -243,7 +244,6 @@ trait ExclusionMembers { return $this->act(__FUNCTION__, func_num_args(), $spec); } - public function markedRange($start = null, $end = null) { if ($start === null && $end === null) { $spec = null; diff --git a/lib/Context/RootContext.php b/lib/Context/RootContext.php index 3b938e8..d189d91 100644 --- a/lib/Context/RootContext.php +++ b/lib/Context/RootContext.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Context; abstract class RootContext extends AbstractContext { diff --git a/lib/Context/UnionContext.php b/lib/Context/UnionContext.php index a8c1749..50c1174 100644 --- a/lib/Context/UnionContext.php +++ b/lib/Context/UnionContext.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Context; class UnionContext extends RootContext implements \ArrayAccess, \Countable, \IteratorAggregate { diff --git a/lib/Database.php b/lib/Database.php index 7910a4a..5c53d86 100644 --- a/lib/Database.php +++ b/lib/Database.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; use JKingWeb\DrUUID\UUID; @@ -280,7 +281,7 @@ class Database { } /** Renames a user - * + * * This does not have an effect on their numeric ID, but has a cascading effect on many tables */ public function userRename(string $user, string $name): bool { @@ -337,7 +338,7 @@ class Database { } /** Retrieves any metadata associated with a user - * + * * @param string $user The user whose metadata is to be retrieved * @param bool $includeLarge Whether to include values which can be arbitrarily large text */ @@ -855,8 +856,8 @@ class Database { sum(case when \"read\" = 1 and hidden = 0 then 1 else 0 end) as marked from arsse_marks group by subscription ) as mark_stats on mark_stats.subscription = s.id", - ["str", "int"], - [$user, $folder] + ["str", "int"], + [$user, $folder] ); $q->setWhere("s.owner = ?", ["str"], [$user]); $nocase = $this->db->sqlToken("nocase"); @@ -1613,26 +1614,26 @@ class Database { } // ensure any used array-type context options contain at least one member foreach ([ - "articles", + "articles", "editions", "subscriptions", - "folders", - "foldersShallow", - "labels", - "labelNames", - "tags", - "tagNames", - "searchTerms", - "titleTerms", - "authorTerms", + "folders", + "foldersShallow", + "labels", + "labelNames", + "tags", + "tagNames", + "searchTerms", + "titleTerms", + "authorTerms", "annotationTerms", "modifiedRanges", "markedRanges", ] as $m) { - if ($context->$m() && !$context->$m) { - throw new Db\ExceptionInput("tooShort", ['field' => $m, 'action' => $this->caller(), 'min' => 1]); - } + if ($context->$m() && !$context->$m) { + throw new Db\ExceptionInput("tooShort", ['field' => $m, 'action' => $this->caller(), 'min' => 1]); } + } // next compute the context, supplying the query to manipulate directly $this->articleFilter($context, $q); } @@ -1921,8 +1922,8 @@ class Database { touched = 1 where article in (select article from target_articles) - and subscription in (select distinct subscription from target_articles)", - [$subq->getTypes(), "bool"], + and subscription in (select distinct subscription from target_articles)", + [$subq->getTypes(), "bool"], [$subq->getValues(), $data['read']] ); $this->db->prepare($q->getQuery(), $q->getTypes())->run($q->getValues()); @@ -1952,7 +1953,7 @@ class Database { where article in (select article from target_articles) and subscription in (select distinct subscription from target_articles)", - [$subq->getTypes(), $setTypes], + [$subq->getTypes(), $setTypes], [$subq->getValues(), $setValues] ); $this->db->prepare($q->getQuery(), $q->getTypes())->run($q->getValues()); diff --git a/lib/Db/AbstractDriver.php b/lib/Db/AbstractDriver.php index 2a6a973..055fe94 100644 --- a/lib/Db/AbstractDriver.php +++ b/lib/Db/AbstractDriver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; use JKingWeb\Arsse\Arsse; diff --git a/lib/Db/AbstractResult.php b/lib/Db/AbstractResult.php index 4ae62bb..dfdd5d3 100644 --- a/lib/Db/AbstractResult.php +++ b/lib/Db/AbstractResult.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; abstract class AbstractResult implements Result { diff --git a/lib/Db/AbstractStatement.php b/lib/Db/AbstractStatement.php index dab1e03..8bcb329 100644 --- a/lib/Db/AbstractStatement.php +++ b/lib/Db/AbstractStatement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; use JKingWeb\Arsse\Misc\Date; diff --git a/lib/Db/Driver.php b/lib/Db/Driver.php index 09f16e7..9ca1b7f 100644 --- a/lib/Db/Driver.php +++ b/lib/Db/Driver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; interface Driver { diff --git a/lib/Db/Exception.php b/lib/Db/Exception.php index d72b83f..89b4ab0 100644 --- a/lib/Db/Exception.php +++ b/lib/Db/Exception.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; class Exception extends \JKingWeb\Arsse\AbstractException { diff --git a/lib/Db/ExceptionInput.php b/lib/Db/ExceptionInput.php index 9cafb56..0a6cdb1 100644 --- a/lib/Db/ExceptionInput.php +++ b/lib/Db/ExceptionInput.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; class ExceptionInput extends \JKingWeb\Arsse\AbstractException { diff --git a/lib/Db/ExceptionRetry.php b/lib/Db/ExceptionRetry.php index be4769a..86b4f7c 100644 --- a/lib/Db/ExceptionRetry.php +++ b/lib/Db/ExceptionRetry.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; class ExceptionRetry extends \JKingWeb\Arsse\AbstractException { diff --git a/lib/Db/ExceptionTimeout.php b/lib/Db/ExceptionTimeout.php index 205f162..9edc5d1 100644 --- a/lib/Db/ExceptionTimeout.php +++ b/lib/Db/ExceptionTimeout.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; class ExceptionTimeout extends \JKingWeb\Arsse\AbstractException { diff --git a/lib/Db/MySQL/Driver.php b/lib/Db/MySQL/Driver.php index de3bc3d..6f39b2e 100644 --- a/lib/Db/MySQL/Driver.php +++ b/lib/Db/MySQL/Driver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\MySQL; use JKingWeb\Arsse\Arsse; diff --git a/lib/Db/MySQL/ExceptionBuilder.php b/lib/Db/MySQL/ExceptionBuilder.php index 8f5be9c..32d2dca 100644 --- a/lib/Db/MySQL/ExceptionBuilder.php +++ b/lib/Db/MySQL/ExceptionBuilder.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\MySQL; use JKingWeb\Arsse\Db\Exception; @@ -27,7 +28,7 @@ trait ExceptionBuilder { public static function buildConnectionException($code, string $msg): array { switch ($code) { case 1045: - // @codeCoverageIgnoreStart + // @codeCoverageIgnoreStart case 1043: case 1044: case 1046: @@ -48,7 +49,7 @@ trait ExceptionBuilder { case 2018: case 2026: case 2028: - // @codeCoverageIgnoreEnd + // @codeCoverageIgnoreEnd return [Exception::class, 'connectionFailure', ['engine' => "MySQL", 'message' => $msg]]; default: return [Exception::class, 'engineErrorGeneral', $msg]; // @codeCoverageIgnore diff --git a/lib/Db/MySQL/PDODriver.php b/lib/Db/MySQL/PDODriver.php index 18cda0b..6089a26 100644 --- a/lib/Db/MySQL/PDODriver.php +++ b/lib/Db/MySQL/PDODriver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\MySQL; use JKingWeb\Arsse\Arsse; diff --git a/lib/Db/MySQL/PDOStatement.php b/lib/Db/MySQL/PDOStatement.php index dd405a2..a4e5d2b 100644 --- a/lib/Db/MySQL/PDOStatement.php +++ b/lib/Db/MySQL/PDOStatement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\MySQL; class PDOStatement extends \JKingWeb\Arsse\Db\PDOStatement { diff --git a/lib/Db/MySQL/Result.php b/lib/Db/MySQL/Result.php index 45e8225..b51a802 100644 --- a/lib/Db/MySQL/Result.php +++ b/lib/Db/MySQL/Result.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\MySQL; class Result extends \JKingWeb\Arsse\Db\AbstractResult { diff --git a/lib/Db/MySQL/Statement.php b/lib/Db/MySQL/Statement.php index c6ec0fb..886ca91 100644 --- a/lib/Db/MySQL/Statement.php +++ b/lib/Db/MySQL/Statement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\MySQL; class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { diff --git a/lib/Db/PDODriver.php b/lib/Db/PDODriver.php index df01bac..bb93741 100644 --- a/lib/Db/PDODriver.php +++ b/lib/Db/PDODriver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; trait PDODriver { diff --git a/lib/Db/PDOError.php b/lib/Db/PDOError.php index 0303551..2b37aab 100644 --- a/lib/Db/PDOError.php +++ b/lib/Db/PDOError.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; trait PDOError { diff --git a/lib/Db/PDOResult.php b/lib/Db/PDOResult.php index 6702301..e5759fa 100644 --- a/lib/Db/PDOResult.php +++ b/lib/Db/PDOResult.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; class PDOResult extends AbstractResult { diff --git a/lib/Db/PDOStatement.php b/lib/Db/PDOStatement.php index ba3ca83..500ef8b 100644 --- a/lib/Db/PDOStatement.php +++ b/lib/Db/PDOStatement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; abstract class PDOStatement extends AbstractStatement { diff --git a/lib/Db/PostgreSQL/Dispatch.php b/lib/Db/PostgreSQL/Dispatch.php index 220dda2..9d43400 100644 --- a/lib/Db/PostgreSQL/Dispatch.php +++ b/lib/Db/PostgreSQL/Dispatch.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\PostgreSQL; trait Dispatch { diff --git a/lib/Db/PostgreSQL/Driver.php b/lib/Db/PostgreSQL/Driver.php index f78855c..70fb21c 100644 --- a/lib/Db/PostgreSQL/Driver.php +++ b/lib/Db/PostgreSQL/Driver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\PostgreSQL; use JKingWeb\Arsse\Arsse; diff --git a/lib/Db/PostgreSQL/PDODriver.php b/lib/Db/PostgreSQL/PDODriver.php index 93daf66..29490e3 100644 --- a/lib/Db/PostgreSQL/PDODriver.php +++ b/lib/Db/PostgreSQL/PDODriver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\PostgreSQL; use JKingWeb\Arsse\Arsse; diff --git a/lib/Db/PostgreSQL/PDOResult.php b/lib/Db/PostgreSQL/PDOResult.php index 4920776..20a2a57 100644 --- a/lib/Db/PostgreSQL/PDOResult.php +++ b/lib/Db/PostgreSQL/PDOResult.php @@ -4,11 +4,11 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\PostgreSQL; class PDOResult extends \JKingWeb\Arsse\Db\PDOResult { - - // This method exists to transparent handle byte-array results + // This method exists to transparently handle byte-array results public function valid() { $this->cur = $this->set->fetch(\PDO::FETCH_ASSOC); diff --git a/lib/Db/PostgreSQL/PDOStatement.php b/lib/Db/PostgreSQL/PDOStatement.php index 9929579..a3a9f12 100644 --- a/lib/Db/PostgreSQL/PDOStatement.php +++ b/lib/Db/PostgreSQL/PDOStatement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\PostgreSQL; use JKingWeb\Arsse\Db\Result; diff --git a/lib/Db/PostgreSQL/Result.php b/lib/Db/PostgreSQL/Result.php index 7200ac3..7682902 100644 --- a/lib/Db/PostgreSQL/Result.php +++ b/lib/Db/PostgreSQL/Result.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\PostgreSQL; class Result extends \JKingWeb\Arsse\Db\AbstractResult { diff --git a/lib/Db/PostgreSQL/Statement.php b/lib/Db/PostgreSQL/Statement.php index 278bee9..795aea5 100644 --- a/lib/Db/PostgreSQL/Statement.php +++ b/lib/Db/PostgreSQL/Statement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\PostgreSQL; class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { diff --git a/lib/Db/Result.php b/lib/Db/Result.php index 8240afd..3792446 100644 --- a/lib/Db/Result.php +++ b/lib/Db/Result.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; interface Result extends \Iterator { diff --git a/lib/Db/ResultAggregate.php b/lib/Db/ResultAggregate.php index 06dd764..f728239 100644 --- a/lib/Db/ResultAggregate.php +++ b/lib/Db/ResultAggregate.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; class ResultAggregate extends AbstractResult { diff --git a/lib/Db/ResultEmpty.php b/lib/Db/ResultEmpty.php index f0f23de..a10d228 100644 --- a/lib/Db/ResultEmpty.php +++ b/lib/Db/ResultEmpty.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; class ResultEmpty extends AbstractResult { diff --git a/lib/Db/SQLState.php b/lib/Db/SQLState.php index 30d9f2c..c82696b 100644 --- a/lib/Db/SQLState.php +++ b/lib/Db/SQLState.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; trait SQLState { diff --git a/lib/Db/SQLite3/AbstractPDODriver.php b/lib/Db/SQLite3/AbstractPDODriver.php index bc7ea61..e8fa5e8 100644 --- a/lib/Db/SQLite3/AbstractPDODriver.php +++ b/lib/Db/SQLite3/AbstractPDODriver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\SQLite3; abstract class AbstractPDODriver extends Driver { diff --git a/lib/Db/SQLite3/Driver.php b/lib/Db/SQLite3/Driver.php index b23d42b..e50ca52 100644 --- a/lib/Db/SQLite3/Driver.php +++ b/lib/Db/SQLite3/Driver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\SQLite3; use JKingWeb\Arsse\Arsse; diff --git a/lib/Db/SQLite3/ExceptionBuilder.php b/lib/Db/SQLite3/ExceptionBuilder.php index 22d1723..3f14375 100644 --- a/lib/Db/SQLite3/ExceptionBuilder.php +++ b/lib/Db/SQLite3/ExceptionBuilder.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\SQLite3; use JKingWeb\Arsse\Db\Exception; diff --git a/lib/Db/SQLite3/PDODriver.php b/lib/Db/SQLite3/PDODriver.php index 86ab1cd..a77dd36 100644 --- a/lib/Db/SQLite3/PDODriver.php +++ b/lib/Db/SQLite3/PDODriver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\SQLite3; use JKingWeb\Arsse\Arsse; diff --git a/lib/Db/SQLite3/PDOStatement.php b/lib/Db/SQLite3/PDOStatement.php index eb4fdfe..169980c 100644 --- a/lib/Db/SQLite3/PDOStatement.php +++ b/lib/Db/SQLite3/PDOStatement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\SQLite3; class PDOStatement extends \JKingWeb\Arsse\Db\PDOStatement { diff --git a/lib/Db/SQLite3/Result.php b/lib/Db/SQLite3/Result.php index ad8aa05..73716f8 100644 --- a/lib/Db/SQLite3/Result.php +++ b/lib/Db/SQLite3/Result.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\SQLite3; class Result extends \JKingWeb\Arsse\Db\AbstractResult { diff --git a/lib/Db/SQLite3/Statement.php b/lib/Db/SQLite3/Statement.php index b38e452..21c753c 100644 --- a/lib/Db/SQLite3/Statement.php +++ b/lib/Db/SQLite3/Statement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db\SQLite3; class Statement extends \JKingWeb\Arsse\Db\AbstractStatement { diff --git a/lib/Db/Statement.php b/lib/Db/Statement.php index 44e9cd2..e4a27bb 100644 --- a/lib/Db/Statement.php +++ b/lib/Db/Statement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; interface Statement { diff --git a/lib/Db/Transaction.php b/lib/Db/Transaction.php index 39cc7a9..7ab8cd3 100644 --- a/lib/Db/Transaction.php +++ b/lib/Db/Transaction.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Db; class Transaction { diff --git a/lib/Exception.php b/lib/Exception.php index afd0b97..90610e4 100644 --- a/lib/Exception.php +++ b/lib/Exception.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; class Exception extends AbstractException { diff --git a/lib/ExceptionFatal.php b/lib/ExceptionFatal.php index 78895cd..04516b4 100644 --- a/lib/ExceptionFatal.php +++ b/lib/ExceptionFatal.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; class ExceptionFatal extends AbstractException { diff --git a/lib/ExceptionType.php b/lib/ExceptionType.php index a9a97cf..633380e 100644 --- a/lib/ExceptionType.php +++ b/lib/ExceptionType.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; class ExceptionType extends AbstractException { diff --git a/lib/Factory.php b/lib/Factory.php index 0dfcea8..2e6ffeb 100644 --- a/lib/Factory.php +++ b/lib/Factory.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; class Factory { diff --git a/lib/Feed.php b/lib/Feed.php index 69f9464..2a5cb44 100644 --- a/lib/Feed.php +++ b/lib/Feed.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; use JKingWeb\Arsse\Feed\Item; @@ -16,7 +17,7 @@ use PicoFeed\Reader\Reader; use PicoFeed\Reader\Favicon; use PicoFeed\Scraper\Scraper; -class Feed { +class Feed { public $title; public $siteUrl; public $iconUrl; diff --git a/lib/Feed/Exception.php b/lib/Feed/Exception.php index 113d405..069bed9 100644 --- a/lib/Feed/Exception.php +++ b/lib/Feed/Exception.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Feed; use GuzzleHttp\Exception\BadResponseException; diff --git a/lib/Feed/Item.php b/lib/Feed/Item.php index fd53046..37e1aa7 100644 --- a/lib/Feed/Item.php +++ b/lib/Feed/Item.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Feed; class Item { @@ -21,4 +22,4 @@ class Item { public $enclosureUrl; public $enclosureType; public $categories = []; -} \ No newline at end of file +} diff --git a/lib/ImportExport/AbstractImportExport.php b/lib/ImportExport/AbstractImportExport.php index 6f0496f..098d449 100644 --- a/lib/ImportExport/AbstractImportExport.php +++ b/lib/ImportExport/AbstractImportExport.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\ImportExport; use JKingWeb\Arsse\Arsse; diff --git a/lib/ImportExport/Exception.php b/lib/ImportExport/Exception.php index 888cfca..050b1b5 100644 --- a/lib/ImportExport/Exception.php +++ b/lib/ImportExport/Exception.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\ImportExport; class Exception extends \JKingWeb\Arsse\AbstractException { diff --git a/lib/ImportExport/OPML.php b/lib/ImportExport/OPML.php index 85d136c..fe9dfa7 100644 --- a/lib/ImportExport/OPML.php +++ b/lib/ImportExport/OPML.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\ImportExport; use JKingWeb\Arsse\Arsse; diff --git a/lib/Lang.php b/lib/Lang.php index fa8232b..37ffb6f 100644 --- a/lib/Lang.php +++ b/lib/Lang.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; class Lang { diff --git a/lib/Lang/Exception.php b/lib/Lang/Exception.php index 4b6d775..3210a4c 100644 --- a/lib/Lang/Exception.php +++ b/lib/Lang/Exception.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Lang; class Exception extends \JKingWeb\Arsse\AbstractException { diff --git a/lib/Misc/Date.php b/lib/Misc/Date.php index 6384f4f..f6232c4 100644 --- a/lib/Misc/Date.php +++ b/lib/Misc/Date.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Misc; abstract class Date { diff --git a/lib/Misc/HTTP.php b/lib/Misc/HTTP.php index b772ad2..f58d4cf 100644 --- a/lib/Misc/HTTP.php +++ b/lib/Misc/HTTP.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Misc; use Psr\Http\Message\MessageInterface; diff --git a/lib/Misc/Query.php b/lib/Misc/Query.php index b190288..736fdbb 100644 --- a/lib/Misc/Query.php +++ b/lib/Misc/Query.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Misc; class Query extends QueryFilter { diff --git a/lib/Misc/QueryFilter.php b/lib/Misc/QueryFilter.php index a15a63a..0b5d148 100644 --- a/lib/Misc/QueryFilter.php +++ b/lib/Misc/QueryFilter.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Misc; class QueryFilter { diff --git a/lib/Misc/URL.php b/lib/Misc/URL.php index a1cad01..e0328ce 100644 --- a/lib/Misc/URL.php +++ b/lib/Misc/URL.php @@ -4,14 +4,14 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Misc; /** * A collection of functions for manipulating URLs */ class URL { - - /** Returns whether a URL is absolute i.e. has a scheme */ + /** Returns whether a URL is absolute i.e. whether it has a scheme */ public static function absolute(string $url): bool { return (bool) strlen((string) parse_url($url, \PHP_URL_SCHEME)); } diff --git a/lib/Misc/ValueInfo.php b/lib/Misc/ValueInfo.php index d03949c..942b689 100644 --- a/lib/Misc/ValueInfo.php +++ b/lib/Misc/ValueInfo.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Misc; use JKingWeb\Arsse\ExceptionType; @@ -107,7 +108,7 @@ class ValueInfo { if ($strict && !$drop) { throw new ExceptionType("strictFailure", $type); } - return (!$drop) ? (int) $value->getTimestamp(): null; + return (!$drop) ? (int) $value->getTimestamp() : null; } elseif ($value instanceof \DateInterval) { if ($strict && !$drop) { throw new ExceptionType("strictFailure", $type); @@ -159,7 +160,7 @@ class ValueInfo { if ($strict && !$drop) { throw new ExceptionType("strictFailure", $type); } - return (!$drop) ? (float) $value->getTimestamp(): null; + return (!$drop) ? (float) $value->getTimestamp() : null; } elseif ($value instanceof \DateInterval) { if ($drop) { return null; @@ -203,13 +204,13 @@ class ValueInfo { if ($value->days) { $dateSpec = $value->days."D"; } else { - $dateSpec .= $value->y ? $value->y."Y": ""; - $dateSpec .= $value->m ? $value->m."M": ""; - $dateSpec .= $value->d ? $value->d."D": ""; + $dateSpec .= $value->y ? $value->y."Y" : ""; + $dateSpec .= $value->m ? $value->m."M" : ""; + $dateSpec .= $value->d ? $value->d."D" : ""; } - $timeSpec .= $value->h ? $value->h."H": ""; - $timeSpec .= $value->i ? $value->i."M": ""; - $timeSpec .= $value->s ? $value->s."S": ""; + $timeSpec .= $value->h ? $value->h."H" : ""; + $timeSpec .= $value->i ? $value->i."M" : ""; + $timeSpec .= $value->s ? $value->s."S" : ""; $timeSpec = $timeSpec ? "T".$timeSpec : ""; if (!$dateSpec && !$timeSpec) { return "PT0S"; diff --git a/lib/REST.php b/lib/REST.php index ded5ef7..bff419e 100644 --- a/lib/REST.php +++ b/lib/REST.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; use JKingWeb\Arsse\Misc\URL; diff --git a/lib/REST/AbstractHandler.php b/lib/REST/AbstractHandler.php index 2dadfa9..107a886 100644 --- a/lib/REST/AbstractHandler.php +++ b/lib/REST/AbstractHandler.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST; use JKingWeb\Arsse\Arsse; diff --git a/lib/REST/Exception.php b/lib/REST/Exception.php index 245dc25..feb46c7 100644 --- a/lib/REST/Exception.php +++ b/lib/REST/Exception.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST; class Exception extends \JKingWeb\Arsse\AbstractException { diff --git a/lib/REST/Exception501.php b/lib/REST/Exception501.php index 77d1e30..b19e6b4 100644 --- a/lib/REST/Exception501.php +++ b/lib/REST/Exception501.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST; class Exception501 extends \Exception { diff --git a/lib/REST/Fever/API.php b/lib/REST/Fever/API.php index 9b24312..f3fa918 100644 --- a/lib/REST/Fever/API.php +++ b/lib/REST/Fever/API.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST\Fever; use JKingWeb\Arsse\Arsse; diff --git a/lib/REST/Fever/User.php b/lib/REST/Fever/User.php index b702ae4..a8354ea 100644 --- a/lib/REST/Fever/User.php +++ b/lib/REST/Fever/User.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST\Fever; use JKingWeb\Arsse\Arsse; diff --git a/lib/REST/Handler.php b/lib/REST/Handler.php index 3b2c88e..664c0d7 100644 --- a/lib/REST/Handler.php +++ b/lib/REST/Handler.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST; use Psr\Http\Message\ServerRequestInterface; diff --git a/lib/REST/Miniflux/Status.php b/lib/REST/Miniflux/Status.php index b84f4a1..07a1ff5 100644 --- a/lib/REST/Miniflux/Status.php +++ b/lib/REST/Miniflux/Status.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST\Miniflux; use JKingWeb\Arsse\Misc\HTTP; diff --git a/lib/REST/Miniflux/Token.php b/lib/REST/Miniflux/Token.php index e249182..5bb491e 100644 --- a/lib/REST/Miniflux/Token.php +++ b/lib/REST/Miniflux/Token.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST\Miniflux; use JKingWeb\Arsse\Arsse; diff --git a/lib/REST/Miniflux/V1.php b/lib/REST/Miniflux/V1.php index b1fb512..dfcdeef 100644 --- a/lib/REST/Miniflux/V1.php +++ b/lib/REST/Miniflux/V1.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST\Miniflux; use JKingWeb\Arsse\Arsse; @@ -212,7 +213,7 @@ class V1 extends \JKingWeb\Arsse\REST\AbstractHandler { public function __construct() { } - + public static function respError($data, int $status = 400, array $headers = []): ResponseInterface { assert(isset(Arsse::$lang) && Arsse::$lang instanceof \JKingWeb\Arsse\Lang, new \Exception("Language database must be initialized before use")); $data = (array) $data; diff --git a/lib/REST/NextcloudNews/V1_2.php b/lib/REST/NextcloudNews/V1_2.php index f11eee9..a13c2ed 100644 --- a/lib/REST/NextcloudNews/V1_2.php +++ b/lib/REST/NextcloudNews/V1_2.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST\NextcloudNews; use JKingWeb\Arsse\Arsse; @@ -293,7 +294,7 @@ class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler { switch ($e->getCode()) { // folder already exists case 10236: return HTTP::respEmpty(409); - // folder name not acceptable + // folder name not acceptable case 10231: case 10232: return HTTP::respEmpty(422); // other errors related to input @@ -324,9 +325,9 @@ class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler { switch ($e->getCode()) { // folder does not exist case 10239: return HTTP::respEmpty(404); - // folder already exists + // folder already exists case 10236: return HTTP::respEmpty(409); - // folder name not acceptable + // folder name not acceptable case 10231: case 10232: return HTTP::respEmpty(422); // other errors related to input @@ -458,7 +459,7 @@ class V1_2 extends \JKingWeb\Arsse\REST\AbstractHandler { switch ($e->getCode()) { // subscription does not exist case 10239: return HTTP::respEmpty(404); - // name is invalid + // name is invalid case 10231: case 10232: return HTTP::respEmpty(422); // other errors related to input diff --git a/lib/REST/NextcloudNews/Versions.php b/lib/REST/NextcloudNews/Versions.php index 0a3a6f6..e6fd6db 100644 --- a/lib/REST/NextcloudNews/Versions.php +++ b/lib/REST/NextcloudNews/Versions.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST\NextcloudNews; use JKingWeb\Arsse\Misc\HTTP; diff --git a/lib/REST/TinyTinyRSS/API.php b/lib/REST/TinyTinyRSS/API.php index 0ec6aaf..ac03321 100644 --- a/lib/REST/TinyTinyRSS/API.php +++ b/lib/REST/TinyTinyRSS/API.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST\TinyTinyRSS; use JKingWeb\Arsse\Feed; @@ -999,7 +1000,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler { switch ($e->getCode()) { case 10236: // label already exists // retrieve the ID of the existing label; duplicating a label silently returns the existing one - return $this->labelOut(Arsse::$db->labelPropertiesGet(Arsse::$user->id, $in['name'], true)['id']); + return $this->labelOut(Arsse::$db->labelPropertiesGet(Arsse::$user->id, $in['name'], true)['id']); default: // other errors related to input throw new Exception("INCORRECT_USAGE"); } diff --git a/lib/REST/TinyTinyRSS/Exception.php b/lib/REST/TinyTinyRSS/Exception.php index da5a3c8..9af6c7e 100644 --- a/lib/REST/TinyTinyRSS/Exception.php +++ b/lib/REST/TinyTinyRSS/Exception.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST\TinyTinyRSS; class Exception extends \Exception { diff --git a/lib/REST/TinyTinyRSS/Icon.php b/lib/REST/TinyTinyRSS/Icon.php index 37f2ce8..7aafbb3 100644 --- a/lib/REST/TinyTinyRSS/Icon.php +++ b/lib/REST/TinyTinyRSS/Icon.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST\TinyTinyRSS; use JKingWeb\Arsse\Arsse; diff --git a/lib/REST/TinyTinyRSS/Search.php b/lib/REST/TinyTinyRSS/Search.php index 3ddd24e..c13251d 100644 --- a/lib/REST/TinyTinyRSS/Search.php +++ b/lib/REST/TinyTinyRSS/Search.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\REST\TinyTinyRSS; use JKingWeb\Arsse\Context\Context; @@ -319,7 +320,7 @@ class Search { $start = $day."T00:00:00 $tz"; $end = $day."T23:59:59 $tz"; $cc = $neg ? $c->not : $c; - // NOTE: TTRSS treats multiple positive dates as contradictory; we instead treat them as complimentary instead, because it makes more sense + // NOTE: TTRSS treats multiple positive dates as contradictory; we instead treat them as complimentary because this makes more sense return $cc->modifiedRanges(array_merge($cc->modifiedRanges, [[$start, $end]])); } diff --git a/lib/Rule/Exception.php b/lib/Rule/Exception.php index 1239e37..825a29d 100644 --- a/lib/Rule/Exception.php +++ b/lib/Rule/Exception.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Rule; class Exception extends \JKingWeb\Arsse\AbstractException { diff --git a/lib/Rule/Rule.php b/lib/Rule/Rule.php index c8d4189..409c371 100644 --- a/lib/Rule/Rule.php +++ b/lib/Rule/Rule.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Rule; abstract class Rule { diff --git a/lib/Service.php b/lib/Service.php index 7eb3177..6ad68f6 100644 --- a/lib/Service.php +++ b/lib/Service.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; use JKingWeb\Arsse\Misc\Date; diff --git a/lib/Service/Daemon.php b/lib/Service/Daemon.php index c77eecf..9cfe868 100644 --- a/lib/Service/Daemon.php +++ b/lib/Service/Daemon.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Service; use JKingWeb\Arsse\AbstractException; diff --git a/lib/Service/Driver.php b/lib/Service/Driver.php index e2dcf92..578ba7b 100644 --- a/lib/Service/Driver.php +++ b/lib/Service/Driver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Service; interface Driver { diff --git a/lib/Service/Exception.php b/lib/Service/Exception.php index 65e8c65..0f93034 100644 --- a/lib/Service/Exception.php +++ b/lib/Service/Exception.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Service; class Exception extends \JKingWeb\Arsse\AbstractException { diff --git a/lib/Service/Serial/Driver.php b/lib/Service/Serial/Driver.php index dc2c74f..fd7adce 100644 --- a/lib/Service/Serial/Driver.php +++ b/lib/Service/Serial/Driver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Service\Serial; use JKingWeb\Arsse\Arsse; diff --git a/lib/Service/Subprocess/Driver.php b/lib/Service/Subprocess/Driver.php index 0986f2c..b92280b 100644 --- a/lib/Service/Subprocess/Driver.php +++ b/lib/Service/Subprocess/Driver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Service\Subprocess; use JKingWeb\Arsse\Arsse; diff --git a/lib/User.php b/lib/User.php index 4bf8e36..da8718c 100644 --- a/lib/User.php +++ b/lib/User.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; use JKingWeb\Arsse\Misc\ValueInfo as V; diff --git a/lib/User/Driver.php b/lib/User/Driver.php index fcf2010..eb5e8e5 100644 --- a/lib/User/Driver.php +++ b/lib/User/Driver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\User; interface Driver { diff --git a/lib/User/Exception.php b/lib/User/Exception.php index 33e3757..0123a8e 100644 --- a/lib/User/Exception.php +++ b/lib/User/Exception.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\User; class Exception extends \JKingWeb\Arsse\AbstractException { diff --git a/lib/User/ExceptionConflict.php b/lib/User/ExceptionConflict.php index 4fa1bbf..2d899cf 100644 --- a/lib/User/ExceptionConflict.php +++ b/lib/User/ExceptionConflict.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\User; class ExceptionConflict extends Exception { diff --git a/lib/User/ExceptionInput.php b/lib/User/ExceptionInput.php index aea8c13..5662b4d 100644 --- a/lib/User/ExceptionInput.php +++ b/lib/User/ExceptionInput.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\User; class ExceptionInput extends Exception { diff --git a/lib/User/ExceptionSession.php b/lib/User/ExceptionSession.php index a7fdbee..8996c18 100644 --- a/lib/User/ExceptionSession.php +++ b/lib/User/ExceptionSession.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\User; class ExceptionSession extends Exception { diff --git a/lib/User/Internal/Driver.php b/lib/User/Internal/Driver.php index 80f16bb..5674d00 100644 --- a/lib/User/Internal/Driver.php +++ b/lib/User/Internal/Driver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\User\Internal; use JKingWeb\Arsse\Arsse; diff --git a/tests/bootstrap.php b/tests/bootstrap.php index c8f3650..0b00f60 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; const NS_BASE = __NAMESPACE__."\\"; diff --git a/tests/cases/CLI/TestCLI.php b/tests/cases/CLI/TestCLI.php index 67fc4e4..43f550a 100644 --- a/tests/cases/CLI/TestCLI.php +++ b/tests/cases/CLI/TestCLI.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\CLI; use Eloquent\Phony\Phpunit\Phony; diff --git a/tests/cases/Conf/TestConf.php b/tests/cases/Conf/TestConf.php index 0e827d4..143cacc 100644 --- a/tests/cases/Conf/TestConf.php +++ b/tests/cases/Conf/TestConf.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Conf; use JKingWeb\Arsse\Conf; diff --git a/tests/cases/Database/AbstractTest.php b/tests/cases/Database/AbstractTest.php index 479ad9c..53303f4 100644 --- a/tests/cases/Database/AbstractTest.php +++ b/tests/cases/Database/AbstractTest.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Test\Database; diff --git a/tests/cases/Database/SeriesArticle.php b/tests/cases/Database/SeriesArticle.php index 197ec55..30efe91 100644 --- a/tests/cases/Database/SeriesArticle.php +++ b/tests/cases/Database/SeriesArticle.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Database; diff --git a/tests/cases/Database/SeriesCleanup.php b/tests/cases/Database/SeriesCleanup.php index d863a64..3ec32ac 100644 --- a/tests/cases/Database/SeriesCleanup.php +++ b/tests/cases/Database/SeriesCleanup.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Database/SeriesFeed.php b/tests/cases/Database/SeriesFeed.php index bc7224e..f80e4b0 100644 --- a/tests/cases/Database/SeriesFeed.php +++ b/tests/cases/Database/SeriesFeed.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Database/SeriesFolder.php b/tests/cases/Database/SeriesFolder.php index 4c488ce..6b0a0f5 100644 --- a/tests/cases/Database/SeriesFolder.php +++ b/tests/cases/Database/SeriesFolder.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Database/SeriesIcon.php b/tests/cases/Database/SeriesIcon.php index 667651f..31faf17 100644 --- a/tests/cases/Database/SeriesIcon.php +++ b/tests/cases/Database/SeriesIcon.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Database/SeriesLabel.php b/tests/cases/Database/SeriesLabel.php index 41e3944..2c6f915 100644 --- a/tests/cases/Database/SeriesLabel.php +++ b/tests/cases/Database/SeriesLabel.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Database/SeriesMeta.php b/tests/cases/Database/SeriesMeta.php index b1d1974..8037dcb 100644 --- a/tests/cases/Database/SeriesMeta.php +++ b/tests/cases/Database/SeriesMeta.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Test\Database; diff --git a/tests/cases/Database/SeriesMiscellany.php b/tests/cases/Database/SeriesMiscellany.php index 5bc1092..102f56a 100644 --- a/tests/cases/Database/SeriesMiscellany.php +++ b/tests/cases/Database/SeriesMiscellany.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Database/SeriesSession.php b/tests/cases/Database/SeriesSession.php index 1db319f..a22c1d3 100644 --- a/tests/cases/Database/SeriesSession.php +++ b/tests/cases/Database/SeriesSession.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Database/SeriesSubscription.php b/tests/cases/Database/SeriesSubscription.php index 0b5f651..f32102d 100644 --- a/tests/cases/Database/SeriesSubscription.php +++ b/tests/cases/Database/SeriesSubscription.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use GuzzleHttp\Exception\ClientException; diff --git a/tests/cases/Database/SeriesTag.php b/tests/cases/Database/SeriesTag.php index 5be1217..0cbde3b 100644 --- a/tests/cases/Database/SeriesTag.php +++ b/tests/cases/Database/SeriesTag.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Database/SeriesToken.php b/tests/cases/Database/SeriesToken.php index 7a14ed0..249d245 100644 --- a/tests/cases/Database/SeriesToken.php +++ b/tests/cases/Database/SeriesToken.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Database/SeriesUser.php b/tests/cases/Database/SeriesUser.php index 031e516..7c6d14a 100644 --- a/tests/cases/Database/SeriesUser.php +++ b/tests/cases/Database/SeriesUser.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Database/TestDatabase.php b/tests/cases/Database/TestDatabase.php index 00838b3..5c915ef 100644 --- a/tests/cases/Database/TestDatabase.php +++ b/tests/cases/Database/TestDatabase.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Database; use JKingWeb\Arsse\Database; diff --git a/tests/cases/Db/BaseDriver.php b/tests/cases/Db/BaseDriver.php index 0999d3a..3377420 100644 --- a/tests/cases/Db/BaseDriver.php +++ b/tests/cases/Db/BaseDriver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db; use JKingWeb\Arsse\Db\Statement; diff --git a/tests/cases/Db/BaseResult.php b/tests/cases/Db/BaseResult.php index 3cfc5bb..027743d 100644 --- a/tests/cases/Db/BaseResult.php +++ b/tests/cases/Db/BaseResult.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db; use JKingWeb\Arsse\Db\Result; diff --git a/tests/cases/Db/BaseStatement.php b/tests/cases/Db/BaseStatement.php index bb8630e..278870b 100644 --- a/tests/cases/Db/BaseStatement.php +++ b/tests/cases/Db/BaseStatement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db; use JKingWeb\Arsse\Db\Statement; diff --git a/tests/cases/Db/BaseUpdate.php b/tests/cases/Db/BaseUpdate.php index c2a7cc1..8649153 100644 --- a/tests/cases/Db/BaseUpdate.php +++ b/tests/cases/Db/BaseUpdate.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Db/MySQL/TestCreation.php b/tests/cases/Db/MySQL/TestCreation.php index 2f82104..2118fa1 100644 --- a/tests/cases/Db/MySQL/TestCreation.php +++ b/tests/cases/Db/MySQL/TestCreation.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\MySQL; use JKingWeb\Arsse\Db\MySQL\Driver as Driver; diff --git a/tests/cases/Db/MySQL/TestDatabase.php b/tests/cases/Db/MySQL/TestDatabase.php index 9ad47ed..b7e8d8b 100644 --- a/tests/cases/Db/MySQL/TestDatabase.php +++ b/tests/cases/Db/MySQL/TestDatabase.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\MySQL; /** diff --git a/tests/cases/Db/MySQL/TestDriver.php b/tests/cases/Db/MySQL/TestDriver.php index 1f8240e..a737cd0 100644 --- a/tests/cases/Db/MySQL/TestDriver.php +++ b/tests/cases/Db/MySQL/TestDriver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\MySQL; /** diff --git a/tests/cases/Db/MySQL/TestResult.php b/tests/cases/Db/MySQL/TestResult.php index 030f797..d077416 100644 --- a/tests/cases/Db/MySQL/TestResult.php +++ b/tests/cases/Db/MySQL/TestResult.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\MySQL; /** diff --git a/tests/cases/Db/MySQL/TestStatement.php b/tests/cases/Db/MySQL/TestStatement.php index 59b0177..926d977 100644 --- a/tests/cases/Db/MySQL/TestStatement.php +++ b/tests/cases/Db/MySQL/TestStatement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\MySQL; /** diff --git a/tests/cases/Db/MySQL/TestUpdate.php b/tests/cases/Db/MySQL/TestUpdate.php index df7808e..8a9375e 100644 --- a/tests/cases/Db/MySQL/TestUpdate.php +++ b/tests/cases/Db/MySQL/TestUpdate.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\MySQL; /** diff --git a/tests/cases/Db/MySQLPDO/TestCreation.php b/tests/cases/Db/MySQLPDO/TestCreation.php index b12bc8e..07800d1 100644 --- a/tests/cases/Db/MySQLPDO/TestCreation.php +++ b/tests/cases/Db/MySQLPDO/TestCreation.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\MySQLPDO; use JKingWeb\Arsse\Db\MySQL\PDODriver as Driver; diff --git a/tests/cases/Db/MySQLPDO/TestDatabase.php b/tests/cases/Db/MySQLPDO/TestDatabase.php index e734555..41cd3ff 100644 --- a/tests/cases/Db/MySQLPDO/TestDatabase.php +++ b/tests/cases/Db/MySQLPDO/TestDatabase.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\MySQLPDO; /** diff --git a/tests/cases/Db/MySQLPDO/TestDriver.php b/tests/cases/Db/MySQLPDO/TestDriver.php index ee46ba9..24fd873 100644 --- a/tests/cases/Db/MySQLPDO/TestDriver.php +++ b/tests/cases/Db/MySQLPDO/TestDriver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\MySQLPDO; /** diff --git a/tests/cases/Db/MySQLPDO/TestResult.php b/tests/cases/Db/MySQLPDO/TestResult.php index 5686f43..2c2efe0 100644 --- a/tests/cases/Db/MySQLPDO/TestResult.php +++ b/tests/cases/Db/MySQLPDO/TestResult.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\MySQLPDO; /** diff --git a/tests/cases/Db/MySQLPDO/TestStatement.php b/tests/cases/Db/MySQLPDO/TestStatement.php index 678300c..4b233f0 100644 --- a/tests/cases/Db/MySQLPDO/TestStatement.php +++ b/tests/cases/Db/MySQLPDO/TestStatement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\MySQLPDO; /** diff --git a/tests/cases/Db/MySQLPDO/TestUpdate.php b/tests/cases/Db/MySQLPDO/TestUpdate.php index 8b0594e..38a80f2 100644 --- a/tests/cases/Db/MySQLPDO/TestUpdate.php +++ b/tests/cases/Db/MySQLPDO/TestUpdate.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\MySQLPDO; /** diff --git a/tests/cases/Db/PostgreSQL/TestCreation.php b/tests/cases/Db/PostgreSQL/TestCreation.php index 606dc8d..7764f8a 100644 --- a/tests/cases/Db/PostgreSQL/TestCreation.php +++ b/tests/cases/Db/PostgreSQL/TestCreation.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\PostgreSQL; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Db/PostgreSQL/TestDatabase.php b/tests/cases/Db/PostgreSQL/TestDatabase.php index 468a016..8342c08 100644 --- a/tests/cases/Db/PostgreSQL/TestDatabase.php +++ b/tests/cases/Db/PostgreSQL/TestDatabase.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\PostgreSQL; /** diff --git a/tests/cases/Db/PostgreSQL/TestDriver.php b/tests/cases/Db/PostgreSQL/TestDriver.php index df81bc4..5ab09a1 100644 --- a/tests/cases/Db/PostgreSQL/TestDriver.php +++ b/tests/cases/Db/PostgreSQL/TestDriver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\PostgreSQL; /** diff --git a/tests/cases/Db/PostgreSQL/TestResult.php b/tests/cases/Db/PostgreSQL/TestResult.php index 9a4413d..af82624 100644 --- a/tests/cases/Db/PostgreSQL/TestResult.php +++ b/tests/cases/Db/PostgreSQL/TestResult.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\PostgreSQL; /** diff --git a/tests/cases/Db/PostgreSQL/TestStatement.php b/tests/cases/Db/PostgreSQL/TestStatement.php index c4ecefa..c54f232 100644 --- a/tests/cases/Db/PostgreSQL/TestStatement.php +++ b/tests/cases/Db/PostgreSQL/TestStatement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\PostgreSQL; /** diff --git a/tests/cases/Db/PostgreSQL/TestUpdate.php b/tests/cases/Db/PostgreSQL/TestUpdate.php index 0117a34..5f7f06c 100644 --- a/tests/cases/Db/PostgreSQL/TestUpdate.php +++ b/tests/cases/Db/PostgreSQL/TestUpdate.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\PostgreSQL; /** diff --git a/tests/cases/Db/PostgreSQLPDO/TestCreation.php b/tests/cases/Db/PostgreSQLPDO/TestCreation.php index a391640..225f75f 100644 --- a/tests/cases/Db/PostgreSQLPDO/TestCreation.php +++ b/tests/cases/Db/PostgreSQLPDO/TestCreation.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Db/PostgreSQLPDO/TestDatabase.php b/tests/cases/Db/PostgreSQLPDO/TestDatabase.php index 3c478b8..7b7a723 100644 --- a/tests/cases/Db/PostgreSQLPDO/TestDatabase.php +++ b/tests/cases/Db/PostgreSQLPDO/TestDatabase.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO; /** diff --git a/tests/cases/Db/PostgreSQLPDO/TestDriver.php b/tests/cases/Db/PostgreSQLPDO/TestDriver.php index dcde7cf..83c26c6 100644 --- a/tests/cases/Db/PostgreSQLPDO/TestDriver.php +++ b/tests/cases/Db/PostgreSQLPDO/TestDriver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO; /** diff --git a/tests/cases/Db/PostgreSQLPDO/TestResult.php b/tests/cases/Db/PostgreSQLPDO/TestResult.php index b3d0cb3..efdadd3 100644 --- a/tests/cases/Db/PostgreSQLPDO/TestResult.php +++ b/tests/cases/Db/PostgreSQLPDO/TestResult.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO; /** diff --git a/tests/cases/Db/PostgreSQLPDO/TestStatement.php b/tests/cases/Db/PostgreSQLPDO/TestStatement.php index 89bae7d..4b56f6f 100644 --- a/tests/cases/Db/PostgreSQLPDO/TestStatement.php +++ b/tests/cases/Db/PostgreSQLPDO/TestStatement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO; /** diff --git a/tests/cases/Db/PostgreSQLPDO/TestUpdate.php b/tests/cases/Db/PostgreSQLPDO/TestUpdate.php index e327809..a9f88ec 100644 --- a/tests/cases/Db/PostgreSQLPDO/TestUpdate.php +++ b/tests/cases/Db/PostgreSQLPDO/TestUpdate.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO; /** diff --git a/tests/cases/Db/SQLite3/TestCreation.php b/tests/cases/Db/SQLite3/TestCreation.php index a96dc28..4622734 100644 --- a/tests/cases/Db/SQLite3/TestCreation.php +++ b/tests/cases/Db/SQLite3/TestCreation.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\SQLite3; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Db/SQLite3/TestDatabase.php b/tests/cases/Db/SQLite3/TestDatabase.php index ea30221..ee3070b 100644 --- a/tests/cases/Db/SQLite3/TestDatabase.php +++ b/tests/cases/Db/SQLite3/TestDatabase.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\SQLite3; /** diff --git a/tests/cases/Db/SQLite3/TestDriver.php b/tests/cases/Db/SQLite3/TestDriver.php index b3eb359..4ac4425 100644 --- a/tests/cases/Db/SQLite3/TestDriver.php +++ b/tests/cases/Db/SQLite3/TestDriver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\SQLite3; /** diff --git a/tests/cases/Db/SQLite3/TestResult.php b/tests/cases/Db/SQLite3/TestResult.php index 5a8d0cd..f5d1e01 100644 --- a/tests/cases/Db/SQLite3/TestResult.php +++ b/tests/cases/Db/SQLite3/TestResult.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\SQLite3; /** diff --git a/tests/cases/Db/SQLite3/TestStatement.php b/tests/cases/Db/SQLite3/TestStatement.php index f7b970f..99ff762 100644 --- a/tests/cases/Db/SQLite3/TestStatement.php +++ b/tests/cases/Db/SQLite3/TestStatement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\SQLite3; /** diff --git a/tests/cases/Db/SQLite3/TestUpdate.php b/tests/cases/Db/SQLite3/TestUpdate.php index 409f109..840778d 100644 --- a/tests/cases/Db/SQLite3/TestUpdate.php +++ b/tests/cases/Db/SQLite3/TestUpdate.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\SQLite3; /** diff --git a/tests/cases/Db/SQLite3PDO/TestCreation.php b/tests/cases/Db/SQLite3PDO/TestCreation.php index b59f6f6..ff93797 100644 --- a/tests/cases/Db/SQLite3PDO/TestCreation.php +++ b/tests/cases/Db/SQLite3PDO/TestCreation.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\SQLite3PDO; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Db/SQLite3PDO/TestDatabase.php b/tests/cases/Db/SQLite3PDO/TestDatabase.php index 751647a..e5341f3 100644 --- a/tests/cases/Db/SQLite3PDO/TestDatabase.php +++ b/tests/cases/Db/SQLite3PDO/TestDatabase.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\SQLite3PDO; /** diff --git a/tests/cases/Db/SQLite3PDO/TestDriver.php b/tests/cases/Db/SQLite3PDO/TestDriver.php index 3d6087c..73cf3c7 100644 --- a/tests/cases/Db/SQLite3PDO/TestDriver.php +++ b/tests/cases/Db/SQLite3PDO/TestDriver.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\SQLite3PDO; /** diff --git a/tests/cases/Db/SQLite3PDO/TestResult.php b/tests/cases/Db/SQLite3PDO/TestResult.php index 339921d..13a030a 100644 --- a/tests/cases/Db/SQLite3PDO/TestResult.php +++ b/tests/cases/Db/SQLite3PDO/TestResult.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\SQLite3PDO; /** diff --git a/tests/cases/Db/SQLite3PDO/TestStatement.php b/tests/cases/Db/SQLite3PDO/TestStatement.php index 2229a5d..930dc73 100644 --- a/tests/cases/Db/SQLite3PDO/TestStatement.php +++ b/tests/cases/Db/SQLite3PDO/TestStatement.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\SQLite3PDO; /** diff --git a/tests/cases/Db/SQLite3PDO/TestUpdate.php b/tests/cases/Db/SQLite3PDO/TestUpdate.php index 964dc2d..2eb8ef4 100644 --- a/tests/cases/Db/SQLite3PDO/TestUpdate.php +++ b/tests/cases/Db/SQLite3PDO/TestUpdate.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Db\SQLite3PDO; /** diff --git a/tests/cases/Db/TestResultAggregate.php b/tests/cases/Db/TestResultAggregate.php index 2ce69cd..75ff003 100644 --- a/tests/cases/Db/TestResultAggregate.php +++ b/tests/cases/Db/TestResultAggregate.php @@ -1,5 +1,10 @@ [[1, 100], [1, 100]], 'editionRange' => [[1, 100], [1, 100]], ]; - foreach($tests as $k => $t) { + foreach ($tests as $k => $t) { yield $k => array_merge([$k], $t, [false]); if (method_exists(ExclusionContext::class, $k)) { yield "$k (not)" => array_merge([$k], $t, [true]); @@ -169,7 +170,7 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertTrue(isset($c1[2])); $c1[] = $c2; $act = []; - foreach($c1 as $k => $v) { + foreach ($c1 as $k => $v) { $act[$k] = $v; } $exp = [2 => $c3, $c2]; diff --git a/tests/cases/Misc/TestDate.php b/tests/cases/Misc/TestDate.php index e0cbbad..955c0ca 100644 --- a/tests/cases/Misc/TestDate.php +++ b/tests/cases/Misc/TestDate.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Misc; use JKingWeb\Arsse\Misc\Date; diff --git a/tests/cases/Misc/TestFactory.php b/tests/cases/Misc/TestFactory.php index c694019..254b455 100644 --- a/tests/cases/Misc/TestFactory.php +++ b/tests/cases/Misc/TestFactory.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Misc; use JKingWeb\Arsse\Factory; diff --git a/tests/cases/Misc/TestHTTP.php b/tests/cases/Misc/TestHTTP.php index fee9a67..1929294 100644 --- a/tests/cases/Misc/TestHTTP.php +++ b/tests/cases/Misc/TestHTTP.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Misc; use JKingWeb\Arsse\Misc\HTTP; diff --git a/tests/cases/Misc/TestQuery.php b/tests/cases/Misc/TestQuery.php index e638d76..9539098 100644 --- a/tests/cases/Misc/TestQuery.php +++ b/tests/cases/Misc/TestQuery.php @@ -4,14 +4,15 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Misc; use JKingWeb\Arsse\Misc\Query; use JKingWeb\Arsse\Misc\QueryFilter; -/** +/** * @covers \JKingWeb\Arsse\Misc\Query - * @covers \JKingWeb\Arsse\Misc\QueryFilter + * @covers \JKingWeb\Arsse\Misc\QueryFilter */ class TestQuery extends \JKingWeb\Arsse\Test\AbstractTest { public function testBasicQuery(): void { @@ -112,4 +113,4 @@ class TestQuery extends \JKingWeb\Arsse\Test\AbstractTest { $this->assertSame(["datetime", "str", "int", "str", "int"], $q->getTypes()); $this->assertSame([1, "ook", 42, "ook", 42], $q->getValues()); } -} \ No newline at end of file +} diff --git a/tests/cases/Misc/TestRule.php b/tests/cases/Misc/TestRule.php index 8850329..461ee26 100644 --- a/tests/cases/Misc/TestRule.php +++ b/tests/cases/Misc/TestRule.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Misc; use JKingWeb\Arsse\Rule\Rule; diff --git a/tests/cases/Misc/TestURL.php b/tests/cases/Misc/TestURL.php index eddc67e..f207b71 100644 --- a/tests/cases/Misc/TestURL.php +++ b/tests/cases/Misc/TestURL.php @@ -4,13 +4,13 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Misc; use JKingWeb\Arsse\Misc\URL; /** @covers \JKingWeb\Arsse\Misc\URL */ class TestURL extends \JKingWeb\Arsse\Test\AbstractTest { - /** @dataProvider provideNormalizations */ public function testNormalizeAUrl(string $url, string $exp, string $user = null, string $pass = null): void { $this->assertSame($exp, URL::normalize($url, $user, $pass)); diff --git a/tests/cases/Misc/TestValueInfo.php b/tests/cases/Misc/TestValueInfo.php index b8f624e..9f0e822 100644 --- a/tests/cases/Misc/TestValueInfo.php +++ b/tests/cases/Misc/TestValueInfo.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Misc; use JKingWeb\Arsse\Misc\ValueInfo as I; diff --git a/tests/cases/REST/Fever/PDO/TestAPI.php b/tests/cases/REST/Fever/PDO/TestAPI.php index 02caa3d..8042f35 100644 --- a/tests/cases/REST/Fever/PDO/TestAPI.php +++ b/tests/cases/REST/Fever/PDO/TestAPI.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\Fever\PDO; /** @covers \JKingWeb\Arsse\REST\Fever\API diff --git a/tests/cases/REST/Fever/TestAPI.php b/tests/cases/REST/Fever/TestAPI.php index ff80964..f631c7c 100644 --- a/tests/cases/REST/Fever/TestAPI.php +++ b/tests/cases/REST/Fever/TestAPI.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\Fever; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/REST/Fever/TestUser.php b/tests/cases/REST/Fever/TestUser.php index 3700e19..4b976ef 100644 --- a/tests/cases/REST/Fever/TestUser.php +++ b/tests/cases/REST/Fever/TestUser.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\Fever; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/REST/Miniflux/PDO/TestToken.php b/tests/cases/REST/Miniflux/PDO/TestToken.php index 1a561d0..4f3ce3c 100644 --- a/tests/cases/REST/Miniflux/PDO/TestToken.php +++ b/tests/cases/REST/Miniflux/PDO/TestToken.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\Miniflux\PDO; /** @covers \JKingWeb\Arsse\REST\Miniflux\Token diff --git a/tests/cases/REST/Miniflux/PDO/TestV1.php b/tests/cases/REST/Miniflux/PDO/TestV1.php index 977ffa4..0f1e0e2 100644 --- a/tests/cases/REST/Miniflux/PDO/TestV1.php +++ b/tests/cases/REST/Miniflux/PDO/TestV1.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\Miniflux\PDO; /** @covers \JKingWeb\Arsse\REST\Miniflux\V1 diff --git a/tests/cases/REST/Miniflux/TestStatus.php b/tests/cases/REST/Miniflux/TestStatus.php index 4975d4a..60aa91a 100644 --- a/tests/cases/REST/Miniflux/TestStatus.php +++ b/tests/cases/REST/Miniflux/TestStatus.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\Miniflux; use JKingWeb\Arsse\Misc\HTTP; diff --git a/tests/cases/REST/Miniflux/TestToken.php b/tests/cases/REST/Miniflux/TestToken.php index 484d9b2..222e258 100644 --- a/tests/cases/REST/Miniflux/TestToken.php +++ b/tests/cases/REST/Miniflux/TestToken.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\Miniflux; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/REST/Miniflux/TestV1.php b/tests/cases/REST/Miniflux/TestV1.php index 9e3aa3c..3c31009 100644 --- a/tests/cases/REST/Miniflux/TestV1.php +++ b/tests/cases/REST/Miniflux/TestV1.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\Miniflux; use Eloquent\Phony\Mock\Handle\InstanceHandle; @@ -18,7 +19,6 @@ use JKingWeb\Arsse\Misc\HTTP; use JKingWeb\Arsse\Db\Transaction; use JKingWeb\Arsse\Db\ExceptionInput; use JKingWeb\Arsse\REST\Miniflux\V1; -use JKingWeb\Arsse\REST\Miniflux\ErrorResponse; use JKingWeb\Arsse\Feed\Exception as FeedException; use JKingWeb\Arsse\ImportExport\Exception as ImportException; use JKingWeb\Arsse\ImportExport\OPML; diff --git a/tests/cases/REST/NextcloudNews/PDO/TestV1_2.php b/tests/cases/REST/NextcloudNews/PDO/TestV1_2.php index a781a2b..6b8d834 100644 --- a/tests/cases/REST/NextcloudNews/PDO/TestV1_2.php +++ b/tests/cases/REST/NextcloudNews/PDO/TestV1_2.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\NextcloudNews\PDO; /** @covers \JKingWeb\Arsse\REST\NextcloudNews\V1_2 diff --git a/tests/cases/REST/NextcloudNews/TestV1_2.php b/tests/cases/REST/NextcloudNews/TestV1_2.php index ea8b824..162a884 100644 --- a/tests/cases/REST/NextcloudNews/TestV1_2.php +++ b/tests/cases/REST/NextcloudNews/TestV1_2.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\NextcloudNews; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/REST/NextcloudNews/TestVersions.php b/tests/cases/REST/NextcloudNews/TestVersions.php index 472b808..908627e 100644 --- a/tests/cases/REST/NextcloudNews/TestVersions.php +++ b/tests/cases/REST/NextcloudNews/TestVersions.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\NextcloudNews; use JKingWeb\Arsse\Misc\HTTP; diff --git a/tests/cases/REST/TestREST.php b/tests/cases/REST/TestREST.php index 9dd9861..f0fd000 100644 --- a/tests/cases/REST/TestREST.php +++ b/tests/cases/REST/TestREST.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST; use JKingWeb\Arsse\Arsse; @@ -21,7 +22,6 @@ use GuzzleHttp\Psr7\ServerRequest; /** @covers \JKingWeb\Arsse\REST */ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { - /** @dataProvider provideApiMatchData */ public function testMatchAUrlToAnApi($apiList, string $input, array $exp): void { $r = new REST($apiList); @@ -317,13 +317,13 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest { public function provideMockRequests(): iterable { return [ - [new ServerRequest("GET", "/index.php/apps/news/api/v1-2/feeds"), "GET", true, NCN::class, "/feeds"], - [new ServerRequest("GET", "/index.php/apps/news/api/v1-2/feeds"), "GET", true, NCN::class, "/feeds"], - [new ServerRequest("get", "/index.php/apps/news/api/v1-2/feeds"), "GET", true, NCN::class, "/feeds"], - [new ServerRequest("head", "/index.php/apps/news/api/v1-2/feeds"), "GET", true, NCN::class, "/feeds"], + [new ServerRequest("GET", "/index.php/apps/news/api/v1-2/feeds"), "GET", true, NCN::class, "/feeds"], + [new ServerRequest("GET", "/index.php/apps/news/api/v1-2/feeds"), "GET", true, NCN::class, "/feeds"], + [new ServerRequest("get", "/index.php/apps/news/api/v1-2/feeds"), "GET", true, NCN::class, "/feeds"], + [new ServerRequest("head", "/index.php/apps/news/api/v1-2/feeds"), "GET", true, NCN::class, "/feeds"], [new ServerRequest("POST", "/tt-rss/api/"), "POST", true, TTRSS::class, "/"], [new ServerRequest("HEAD", "/no/such/api/"), "GET", false], - [new ServerRequest("GET", "/no/such/api/"), "GET", false], + [new ServerRequest("GET", "/no/such/api/"), "GET", false], ]; } } diff --git a/tests/cases/REST/TinyTinyRSS/PDO/TestAPI.php b/tests/cases/REST/TinyTinyRSS/PDO/TestAPI.php index 62a9cef..1ec5a32 100644 --- a/tests/cases/REST/TinyTinyRSS/PDO/TestAPI.php +++ b/tests/cases/REST/TinyTinyRSS/PDO/TestAPI.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\TinyTinyRSS\PDO; /** @covers \JKingWeb\Arsse\REST\TinyTinyRSS\API diff --git a/tests/cases/REST/TinyTinyRSS/TestAPI.php b/tests/cases/REST/TinyTinyRSS/TestAPI.php index c31a665..3a0eac4 100644 --- a/tests/cases/REST/TinyTinyRSS/TestAPI.php +++ b/tests/cases/REST/TinyTinyRSS/TestAPI.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\TinyTinyRSS; use JKingWeb\Arsse\Arsse; @@ -1523,11 +1524,11 @@ LONG_STRING; 'content' => '

Article content 1

', ], [ - 'id' => "102", - 'guid' => "SHA256:5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7", - 'title' => 'Article title 2', - 'link' => 'http://example.com/2', - 'labels' => [], + 'id' => "102", + 'guid' => "SHA256:5be8a5a46ecd52ed132191c8d27fb1af6b3d4edc00234c5d9f8f0e10562ed3b7", + 'title' => 'Article title 2', + 'link' => 'http://example.com/2', + 'labels' => [], 'unread' => false, 'marked' => false, 'published' => false, diff --git a/tests/cases/REST/TinyTinyRSS/TestIcon.php b/tests/cases/REST/TinyTinyRSS/TestIcon.php index ecfb992..e8c5218 100644 --- a/tests/cases/REST/TinyTinyRSS/TestIcon.php +++ b/tests/cases/REST/TinyTinyRSS/TestIcon.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\TinyTinyRSS; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/REST/TinyTinyRSS/TestSearch.php b/tests/cases/REST/TinyTinyRSS/TestSearch.php index 47683f5..23a5169 100644 --- a/tests/cases/REST/TinyTinyRSS/TestSearch.php +++ b/tests/cases/REST/TinyTinyRSS/TestSearch.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\REST\TinyTinyRSS; use JKingWeb\Arsse\Context\Context; diff --git a/tests/cases/Service/TestDaemon.php b/tests/cases/Service/TestDaemon.php index c747803..a485f14 100644 --- a/tests/cases/Service/TestDaemon.php +++ b/tests/cases/Service/TestDaemon.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Service; use JKingWeb\Arsse\Service\Daemon; diff --git a/tests/cases/Service/TestSerial.php b/tests/cases/Service/TestSerial.php index 321e150..a2702b0 100644 --- a/tests/cases/Service/TestSerial.php +++ b/tests/cases/Service/TestSerial.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Service; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Service/TestService.php b/tests/cases/Service/TestService.php index 277df8f..0b65349 100644 --- a/tests/cases/Service/TestService.php +++ b/tests/cases/Service/TestService.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Service; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/Service/TestSubprocess.php b/tests/cases/Service/TestSubprocess.php index 61eefa6..f4a26fe 100644 --- a/tests/cases/Service/TestSubprocess.php +++ b/tests/cases/Service/TestSubprocess.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\Service; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/TestArsse.php b/tests/cases/TestArsse.php index 95ca946..141d51b 100644 --- a/tests/cases/TestArsse.php +++ b/tests/cases/TestArsse.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase; use JKingWeb\Arsse\Exception; diff --git a/tests/cases/User/TestInternal.php b/tests/cases/User/TestInternal.php index 12f4386..916d837 100644 --- a/tests/cases/User/TestInternal.php +++ b/tests/cases/User/TestInternal.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\User; use JKingWeb\Arsse\Arsse; diff --git a/tests/cases/User/TestUser.php b/tests/cases/User/TestUser.php index 19370c0..888699e 100644 --- a/tests/cases/User/TestUser.php +++ b/tests/cases/User/TestUser.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\TestCase\User; use Eloquent\Phony\Phpunit\Phony; diff --git a/tests/lib/AbstractTest.php b/tests/lib/AbstractTest.php index 53467aa..67d4da0 100644 --- a/tests/lib/AbstractTest.php +++ b/tests/lib/AbstractTest.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test; use Eloquent\Phony\Mock\Handle\InstanceHandle; @@ -61,17 +62,17 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase { $defaults = [ 'dbSQLite3File' => ":memory:", 'dbSQLite3Timeout' => 0, - 'dbPostgreSQLHost' => $_ENV['ARSSE_TEST_PGSQL_HOST'] ?: "", - 'dbPostgreSQLPort' => $_ENV['ARSSE_TEST_PGSQL_PORT'] ?: 5432, - 'dbPostgreSQLUser' => $_ENV['ARSSE_TEST_PGSQL_USER'] ?: "arsse_test", - 'dbPostgreSQLPass' => $_ENV['ARSSE_TEST_PGSQL_PASS'] ?: "arsse_test", - 'dbPostgreSQLDb' => $_ENV['ARSSE_TEST_PGSQL_DB'] ?: "arsse_test", + 'dbPostgreSQLHost' => $_ENV['ARSSE_TEST_PGSQL_HOST'] ?: "", + 'dbPostgreSQLPort' => $_ENV['ARSSE_TEST_PGSQL_PORT'] ?: 5432, + 'dbPostgreSQLUser' => $_ENV['ARSSE_TEST_PGSQL_USER'] ?: "arsse_test", + 'dbPostgreSQLPass' => $_ENV['ARSSE_TEST_PGSQL_PASS'] ?: "arsse_test", + 'dbPostgreSQLDb' => $_ENV['ARSSE_TEST_PGSQL_DB'] ?: "arsse_test", 'dbPostgreSQLSchema' => $_ENV['ARSSE_TEST_PGSQL_SCHEMA'] ?: "arsse_test", - 'dbMySQLHost' => $_ENV['ARSSE_TEST_MYSQL_HOST'] ?: "localhost", - 'dbMySQLPort' => $_ENV['ARSSE_TEST_MYSQL_PORT'] ?: 3306, - 'dbMySQLUser' => $_ENV['ARSSE_TEST_MYSQL_USER'] ?: "arsse_test", - 'dbMySQLPass' => $_ENV['ARSSE_TEST_MYSQL_PASS'] ?: "arsse_test", - 'dbMySQLDb' => $_ENV['ARSSE_TEST_MYSQL_DB'] ?: "arsse_test", + 'dbMySQLHost' => $_ENV['ARSSE_TEST_MYSQL_HOST'] ?: "localhost", + 'dbMySQLPort' => $_ENV['ARSSE_TEST_MYSQL_PORT'] ?: 3306, + 'dbMySQLUser' => $_ENV['ARSSE_TEST_MYSQL_USER'] ?: "arsse_test", + 'dbMySQLPass' => $_ENV['ARSSE_TEST_MYSQL_PASS'] ?: "arsse_test", + 'dbMySQLDb' => $_ENV['ARSSE_TEST_MYSQL_DB'] ?: "arsse_test", ]; Arsse::$conf = (($force ? null : Arsse::$conf) ?? (new Conf))->import($defaults)->import($conf); } diff --git a/tests/lib/Database.php b/tests/lib/Database.php index 2c8a9d7..4949a22 100644 --- a/tests/lib/Database.php +++ b/tests/lib/Database.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test; class Database extends \JKingWeb\Arsse\Database { diff --git a/tests/lib/DatabaseDrivers/MySQL.php b/tests/lib/DatabaseDrivers/MySQL.php index 2b6c016..b0fff83 100644 --- a/tests/lib/DatabaseDrivers/MySQL.php +++ b/tests/lib/DatabaseDrivers/MySQL.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Arsse; diff --git a/tests/lib/DatabaseDrivers/MySQLCommon.php b/tests/lib/DatabaseDrivers/MySQLCommon.php index d3f2956..e2a43cc 100644 --- a/tests/lib/DatabaseDrivers/MySQLCommon.php +++ b/tests/lib/DatabaseDrivers/MySQLCommon.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Db\Driver; diff --git a/tests/lib/DatabaseDrivers/MySQLPDO.php b/tests/lib/DatabaseDrivers/MySQLPDO.php index 4624868..5ef4145 100644 --- a/tests/lib/DatabaseDrivers/MySQLPDO.php +++ b/tests/lib/DatabaseDrivers/MySQLPDO.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Arsse; diff --git a/tests/lib/DatabaseDrivers/PostgreSQL.php b/tests/lib/DatabaseDrivers/PostgreSQL.php index 1af1b47..27a1846 100644 --- a/tests/lib/DatabaseDrivers/PostgreSQL.php +++ b/tests/lib/DatabaseDrivers/PostgreSQL.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Arsse; diff --git a/tests/lib/DatabaseDrivers/PostgreSQLCommon.php b/tests/lib/DatabaseDrivers/PostgreSQLCommon.php index ef65e03..6cd07c7 100644 --- a/tests/lib/DatabaseDrivers/PostgreSQLCommon.php +++ b/tests/lib/DatabaseDrivers/PostgreSQLCommon.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Db\Driver; diff --git a/tests/lib/DatabaseDrivers/PostgreSQLPDO.php b/tests/lib/DatabaseDrivers/PostgreSQLPDO.php index 6ef101b..7df9ee0 100644 --- a/tests/lib/DatabaseDrivers/PostgreSQLPDO.php +++ b/tests/lib/DatabaseDrivers/PostgreSQLPDO.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Arsse; diff --git a/tests/lib/DatabaseDrivers/SQLite3.php b/tests/lib/DatabaseDrivers/SQLite3.php index 01a6c05..6b4f10f 100644 --- a/tests/lib/DatabaseDrivers/SQLite3.php +++ b/tests/lib/DatabaseDrivers/SQLite3.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Arsse; diff --git a/tests/lib/DatabaseDrivers/SQLite3Common.php b/tests/lib/DatabaseDrivers/SQLite3Common.php index 9389d43..bd98e1e 100644 --- a/tests/lib/DatabaseDrivers/SQLite3Common.php +++ b/tests/lib/DatabaseDrivers/SQLite3Common.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Db\Driver; diff --git a/tests/lib/DatabaseDrivers/SQLite3PDO.php b/tests/lib/DatabaseDrivers/SQLite3PDO.php index b141cda..5738080 100644 --- a/tests/lib/DatabaseDrivers/SQLite3PDO.php +++ b/tests/lib/DatabaseDrivers/SQLite3PDO.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Arsse; diff --git a/tests/lib/Lang/Setup.php b/tests/lib/Lang/Setup.php index c6fa318..0969bf6 100644 --- a/tests/lib/Lang/Setup.php +++ b/tests/lib/Lang/Setup.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test\Lang; use JKingWeb\Arsse\Lang; diff --git a/tests/lib/Misc/StrClass.php b/tests/lib/Misc/StrClass.php index 0df4e8b..fb1f2b8 100644 --- a/tests/lib/Misc/StrClass.php +++ b/tests/lib/Misc/StrClass.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test\Misc; class StrClass { diff --git a/tests/lib/PDOTest.php b/tests/lib/PDOTest.php index 0147e28..f0d6621 100644 --- a/tests/lib/PDOTest.php +++ b/tests/lib/PDOTest.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test; trait PDOTest { diff --git a/tests/lib/Result.php b/tests/lib/Result.php index 554c50a..1c466d0 100644 --- a/tests/lib/Result.php +++ b/tests/lib/Result.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test; class Result implements \JKingWeb\Arsse\Db\Result { diff --git a/tests/lib/Service.php b/tests/lib/Service.php index cfd11f4..0dc9e33 100644 --- a/tests/lib/Service.php +++ b/tests/lib/Service.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse\Test; class Service extends \JKingWeb\Arsse\Service { diff --git a/tests/server.php b/tests/server.php index 2e7d8d4..f406999 100644 --- a/tests/server.php +++ b/tests/server.php @@ -4,6 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); + namespace JKingWeb\Arsse; require_once __DIR__."/bootstrap.php"; diff --git a/vendor-bin/csfixer/composer.lock b/vendor-bin/csfixer/composer.lock index beb1171..6ae4d71 100644 --- a/vendor-bin/csfixer/composer.lock +++ b/vendor-bin/csfixer/composer.lock @@ -2050,7 +2050,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "friendsofphp/php-cs-fixer": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": [],