1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Style fixes

This commit is contained in:
J. King 2019-09-05 10:21:36 -04:00
parent d9c769d40e
commit 53aa7a4d0d
4 changed files with 10 additions and 12 deletions

View file

@ -2,7 +2,6 @@
use Robo\Result;
const BASE = __DIR__.\DIRECTORY_SEPARATOR;
const BASE_TEST = BASE."tests".\DIRECTORY_SEPARATOR;
define("IS_WIN", defined("PHP_WINDOWS_VERSION_MAJOR"));
@ -190,7 +189,7 @@ class RoboFile extends \Robo\Tasks {
}
/** Generates static manual pages in the "manual" directory
*
*
* The resultant files are suitable for offline viewing and inclusion into release builds
*/
public function manual(array $args): Result {
@ -209,7 +208,7 @@ class RoboFile extends \Robo\Tasks {
}
/** Rebuilds the entire manual theme
*
*
* This requires Node and Yarn to be installed, and only needs to be done when
* Daux's theme changes
*/
@ -223,7 +222,7 @@ class RoboFile extends \Robo\Tasks {
// rebuild the stylesheet
$t->addCode([$this, "manualCss"]);
// copy JavaScript files from the Daux theme
foreach(glob($dauxjs."daux*") as $file) {
foreach (glob($dauxjs."daux*") as $file) {
$t->taskFilesystemStack()->copy($file, $themeout.basename($file), true);
}
// download highlight.js
@ -231,7 +230,7 @@ class RoboFile extends \Robo\Tasks {
// compile the list of desired language (enumerated above) into an application/x-www-form-urlencoded body
$post = http_build_query((function($langs) {
$out = [];
foreach($langs as $l) {
foreach ($langs as $l) {
$out[$l.".js"] = "on";
}
return $out;
@ -274,7 +273,7 @@ class RoboFile extends \Robo\Tasks {
}
/** Rebuilds the manual theme's stylesheet only
*
*
* This requires Node and Yarn to be installed.
*/
public function manualCss(): Result {

View file

@ -84,7 +84,7 @@ interface Driver {
public function literalString(string $str): string;
/** Performs implementation-specific database maintenance to ensure good performance
*
*
* This should be restricted to quick maintenance; in SQLite terms it might include ANALYZE, but not VACUUM
*/
public function maintenance(): bool;

View file

@ -203,7 +203,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler {
} elseif (isset($v[0])) {
// this is a very simplistic check for an indexed array
// it would not pass muster in the face of generic data,
// but we'll assume our code produces only well-ordered
// but we'll assume our code produces only well-ordered
// indexed arrays
$p->appendChild($this->makeXMLIndexed($v, $d->createElement($k), substr($k, 0, strlen($k) - 1)));
} else {
@ -227,7 +227,6 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler {
}
}
return $p;
}
protected function logIn(string $hash): bool {
@ -317,7 +316,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler {
$lastUnread = Date::normalize($lastUnread, "sql");
$since = Date::sub("PT15S", $lastUnread);
$c->unread(false)->markedSince($since);
Arsse::$db->articleMark(Arsse::$user->id, ['read' => false], $c);
Arsse::$db->articleMark(Arsse::$user->id, ['read' => false], $c);
}
protected function getRefreshTime() {

View file

@ -318,7 +318,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest {
]);
$act = $this->h->dispatch($this->req("api&feeds"));
$this->assertMessage($exp, $act);
}
}
/** @dataProvider provideItemListContexts */
public function testListItems(string $url, Context $c, bool $desc) {
@ -518,7 +518,7 @@ class TestAPI extends \JKingWeb\Arsse\Test\AbstractTest {
public function testListFeedIcons() {
$act = $this->h->dispatch($this->req("api&favicons"));
$exp = new JsonResponse(['favicons' => [['id' => 0, 'data' => API::GENERIC_ICON_TYPE.",".API::GENERIC_ICON_DATA]]]);
$this->assertMessage($exp, $act);
$this->assertMessage($exp, $act);
}
public function testAnswerOptionsRequest() {