new php-cs-fixer

This commit is contained in:
Shish 2021-12-14 18:32:47 +00:00
parent b2ceb36499
commit 3d9e32e919
466 changed files with 2138 additions and 1253 deletions

View file

@ -1,19 +0,0 @@
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('ext/amazon_s3/lib')
->exclude('vendor')
->exclude('data')
->in(__DIR__)
;
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
//'strict_param' => true,
'array_syntax' => ['syntax' => 'short'],
])
->setFinder($finder)
;
?>

View file

@ -53,7 +53,7 @@
"require-dev" : { "require-dev" : {
"phpunit/phpunit" : "^9.0", "phpunit/phpunit" : "^9.0",
"friendsofphp/php-cs-fixer" : "^2.18" "friendsofphp/php-cs-fixer" : "^3.4"
}, },
"suggest": { "suggest": {
"ext-memcache": "memcache caching", "ext-memcache": "memcache caching",

1136
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,15 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
require_once "core/event.php"; require_once "core/event.php";
abstract class PageMode abstract class PageMode
{ {
const REDIRECT = 'redirect'; public const REDIRECT = 'redirect';
const DATA = 'data'; public const DATA = 'data';
const PAGE = 'page'; public const PAGE = 'page';
const FILE = 'file'; public const FILE = 'file';
const MANUAL = 'manual'; public const MANUAL = 'manual';
} }
/** /**

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/** /**
* Class BaseThemelet * Class BaseThemelet
@ -7,7 +9,6 @@
*/ */
class BaseThemelet class BaseThemelet
{ {
/** /**
* Generic error message display * Generic error message display
*/ */
@ -124,7 +125,7 @@ class BaseThemelet
$at_end = ($current_page >= $total_pages); $at_end = ($current_page >= $total_pages);
$first_html = $at_start ? "First" : $this->gen_page_link($base_url, $query, 1, "First"); $first_html = $at_start ? "First" : $this->gen_page_link($base_url, $query, 1, "First");
$prev_html = $at_start ? "Prev" : $this->gen_page_link($base_url, $query, $prev, "Prev"); $prev_html = $at_start ? "Prev" : $this->gen_page_link($base_url, $query, $prev, "Prev");
$random_html = "-"; $random_html = "-";
if ($show_random) { if ($show_random) {
@ -132,8 +133,8 @@ class BaseThemelet
$random_html = $this->gen_page_link($base_url, $query, $rand, "Random"); $random_html = $this->gen_page_link($base_url, $query, $rand, "Random");
} }
$next_html = $at_end ? "Next" : $this->gen_page_link($base_url, $query, $next, "Next"); $next_html = $at_end ? "Next" : $this->gen_page_link($base_url, $query, $next, "Next");
$last_html = $at_end ? "Last" : $this->gen_page_link($base_url, $query, $total_pages, "Last"); $last_html = $at_end ? "Last" : $this->gen_page_link($base_url, $query, $total_pages, "Last");
$start = $current_page-5 > 1 ? $current_page-5 : 1; $start = $current_page-5 > 1 ? $current_page-5 : 1;
$end = $start+10 < $total_pages ? $start+10 : $total_pages; $end = $start+10 < $total_pages ? $start+10 : $total_pages;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/** /**
* Class Block * Class Block

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
interface CacheEngine interface CacheEngine
{ {
public function get(string $key); public function get(string $key);
@ -27,7 +29,7 @@ class MemcachedCache implements CacheEngine
public function __construct(string $args) public function __construct(string $args)
{ {
$hp = explode(":", $args); $hp = explode(":", $args);
$this->memcache = new Memcached; $this->memcache = new Memcached();
#$this->memcache->setOption(Memcached::OPT_COMPRESSION, False); #$this->memcache->setOption(Memcached::OPT_COMPRESSION, False);
#$this->memcache->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_PHP); #$this->memcache->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_PHP);
#$this->memcache->setOption(Memcached::OPT_PREFIX_KEY, phpversion()); #$this->memcache->setOption(Memcached::OPT_PREFIX_KEY, phpversion());

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* CAPTCHA abstraction * * CAPTCHA abstraction *
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
// Provides mechanisms for cleanly executing command-line applications // Provides mechanisms for cleanly executing command-line applications
// Was created to try to centralize a solution for whatever caused this: // Was created to try to centralize a solution for whatever caused this:

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/** /**
* Interface Config * Interface Config

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
use FFSPHP\PDO; use FFSPHP\PDO;
abstract class DatabaseDriver abstract class DatabaseDriver

View file

@ -1,8 +1,10 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
abstract class SCORE abstract class SCORE
{ {
const AIPK = "SCORE_AIPK"; public const AIPK = "SCORE_AIPK";
const INET = "SCORE_INET"; public const INET = "SCORE_INET";
} }
abstract class DBEngine abstract class DBEngine

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/** /**
* Generic parent class for all events. * Generic parent class for all events.
* *

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/** /**
* A base exception to be caught by the upper levels. * A base exception to be caught by the upper levels.

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/** /**
* Class Extension * Class Extension
* *

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/** /**
* An image is being added to the database. * An image is being added to the database.

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/** /**
* Class Image * Class Image
* *

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* Misc functions * * Misc functions *
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@ -110,7 +112,7 @@ function get_thumbnail_size(int $orig_width, int $orig_height, bool $use_dpi_sca
} }
} }
function get_scaled_by_aspect_ratio(int $original_width, int $original_height, int $max_width, int $max_height) : array function get_scaled_by_aspect_ratio(int $original_width, int $original_height, int $max_width, int $max_height): array
{ {
$xscale = ($max_width/ $original_width); $xscale = ($max_width/ $original_width);
$yscale = ($max_height/ $original_height); $yscale = ($max_height/ $original_height);

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class Querylet class Querylet
{ {
public string $sql; public string $sql;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/** /**
* Class Tag * Class Tag
* *

View file

@ -109,8 +109,8 @@ function ask_questions()
"; ";
} }
$db_m = in_array(DatabaseDriver::MYSQL, $drivers) ? '<option value="'. DatabaseDriver::MYSQL .'">MySQL</option>' : ""; $db_m = in_array(DatabaseDriver::MYSQL, $drivers) ? '<option value="'. DatabaseDriver::MYSQL .'">MySQL</option>' : "";
$db_p = in_array(DatabaseDriver::PGSQL, $drivers) ? '<option value="'. DatabaseDriver::PGSQL .'">PostgreSQL</option>' : ""; $db_p = in_array(DatabaseDriver::PGSQL, $drivers) ? '<option value="'. DatabaseDriver::PGSQL .'">PostgreSQL</option>' : "";
$db_s = in_array(DatabaseDriver::SQLITE, $drivers) ? '<option value="'. DatabaseDriver::SQLITE .'">SQLite</option>' : ""; $db_s = in_array(DatabaseDriver::SQLITE, $drivers) ? '<option value="'. DatabaseDriver::SQLITE .'">SQLite</option>' : "";
$warn_msg = $warnings ? "<h3>Warnings</h3>".implode("\n<p>", $warnings) : ""; $warn_msg = $warnings ? "<h3>Warnings</h3>".implode("\n<p>", $warnings) : "";

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* Logging convenience * * Logging convenience *
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
// action_object_attribute // action_object_attribute
// action = create / view / edit / delete // action = create / view / edit / delete

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* Things which should be in the core API * * Things which should be in the core API *
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@ -334,7 +336,7 @@ function unparse_url(array $parsed_url): string
$host = isset($parsed_url['host']) ? $parsed_url['host'] : ''; $host = isset($parsed_url['host']) ? $parsed_url['host'] : '';
$port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : ''; $port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : '';
$user = isset($parsed_url['user']) ? $parsed_url['user'] : ''; $user = isset($parsed_url['user']) ? $parsed_url['user'] : '';
$pass = isset($parsed_url['pass']) ? ':' . $parsed_url['pass'] : ''; $pass = isset($parsed_url['pass']) ? ':' . $parsed_url['pass'] : '';
$pass = ($user || $pass) ? "$pass@" : ''; $pass = ($user || $pass) ? "$pass@" : '';
$path = isset($parsed_url['path']) ? $parsed_url['path'] : ''; $path = isset($parsed_url['path']) ? $parsed_url['path'] : '';
$query = !empty($parsed_url['query']) ? '?' . $parsed_url['query'] : ''; $query = !empty($parsed_url['query']) ? '?' . $parsed_url['query'] : '';

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/* /*
* A small number of PHP-sanity things (eg don't silently ignore errors) to * A small number of PHP-sanity things (eg don't silently ignore errors) to
* be included right at the very start of index.php and tests/bootstrap.php * be included right at the very start of index.php and tests/bootstrap.php

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* Event API * * Event API *
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/** /**
* For any values that aren't defined in data/config/*.php, * For any values that aren't defined in data/config/*.php,
* Shimmie will set the values to their defaults * Shimmie will set the values to their defaults

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class Link class Link
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
function _new_user(array $row): User function _new_user(array $row): User
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/** /**
* @global UserClass[] $_shm_user_classes * @global UserClass[] $_shm_user_classes
*/ */

View file

@ -1,4 +1,7 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
use MicroHTML\HTMLElement;
use function MicroHTML\emptyHTML; use function MicroHTML\emptyHTML;
use function MicroHTML\rawHTML; use function MicroHTML\rawHTML;
use function MicroHTML\FORM; use function MicroHTML\FORM;
@ -12,7 +15,6 @@ use function MicroHTML\TFOOT;
use function MicroHTML\TR; use function MicroHTML\TR;
use function MicroHTML\TH; use function MicroHTML\TH;
use function MicroHTML\TD; use function MicroHTML\TD;
use MicroHTML\HTMLElement;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* Misc * * Misc *
@ -659,7 +661,7 @@ function _get_user(): User
function _get_query(): string function _get_query(): string
{ {
return (@$_POST["q"]?:@$_GET["q"])?:"/"; return (@$_POST["q"] ?: @$_GET["q"]) ?: "/";
} }

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class AdminPageInfo extends ExtensionInfo class AdminPageInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
/** /**
* Sent when the admin page is ready to be added to * Sent when the admin page is ready to be added to

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class AdminPageTest extends ShimmiePHPUnitTestCase class AdminPageTest extends ShimmiePHPUnitTestCase
{ {
public function testAuth() public function testAuth()

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class AdminPageTheme extends Themelet class AdminPageTheme extends Themelet
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class AliasEditorInfo extends ExtensionInfo class AliasEditorInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
use MicroCRUD\ActionColumn; use MicroCRUD\ActionColumn;
use MicroCRUD\TextColumn; use MicroCRUD\TextColumn;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class AliasEditorTest extends ShimmiePHPUnitTestCase class AliasEditorTest extends ShimmiePHPUnitTestCase
{ {
public function testAliasList() public function testAliasList()

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class AliasEditorTheme extends Themelet class AliasEditorTheme extends Themelet
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class ApprovalInfo extends ExtensionInfo class ApprovalInfo extends ExtensionInfo
{ {

View file

@ -1,10 +1,12 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
abstract class ApprovalConfig abstract class ApprovalConfig
{ {
const VERSION = "ext_approval_version"; public const VERSION = "ext_approval_version";
const IMAGES = "approve_images"; public const IMAGES = "approve_images";
const COMMENTS = "approve_comments"; public const COMMENTS = "approve_comments";
} }
class Approval extends Extension class Approval extends Extension
@ -118,7 +120,7 @@ class Approval extends Extension
} }
const SEARCH_REGEXP = "/^approved:(yes|no)/"; public const SEARCH_REGEXP = "/^approved:(yes|no)/";
public function onSearchTermParse(SearchTermParseEvent $event) public function onSearchTermParse(SearchTermParseEvent $event)
{ {
global $user, $config; global $user, $config;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
use function MicroHTML\BR; use function MicroHTML\BR;
use function MicroHTML\BUTTON; use function MicroHTML\BUTTON;
use function MicroHTML\INPUT; use function MicroHTML\INPUT;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class ArtistsInfo extends ExtensionInfo class ArtistsInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class AuthorSetEvent extends Event class AuthorSetEvent extends Event
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class ArtistsTest extends ShimmiePHPUnitTestCase class ArtistsTest extends ShimmiePHPUnitTestCase
{ {
public function testSearch() public function testSearch()

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class ArtistsTheme extends Themelet class ArtistsTheme extends Themelet
{ {
public function get_author_editor_html(string $author): string public function get_author_editor_html(string $author): string

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
abstract class AutoTaggerConfig abstract class AutoTaggerConfig
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class AutoTaggerInfo extends ExtensionInfo class AutoTaggerInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
require_once 'config.php'; require_once 'config.php';

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class AutoTaggerTest extends ShimmiePHPUnitTestCase class AutoTaggerTest extends ShimmiePHPUnitTestCase
{ {
public function testAutoTaggerList() public function testAutoTaggerList()

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class AutoTaggerTheme extends Themelet class AutoTaggerTheme extends Themelet
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class AutoCompleteInfo extends ExtensionInfo class AutoCompleteInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class AutoComplete extends Extension class AutoComplete extends Extension
{ {

View file

@ -1,4 +1,5 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
class AutoCompleteTest extends ShimmiePHPUnitTestCase class AutoCompleteTest extends ShimmiePHPUnitTestCase

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class AutoCompleteTheme extends Themelet class AutoCompleteTheme extends Themelet
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BanWordsInfo extends ExtensionInfo class BanWordsInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BanWords extends Extension class BanWords extends Extension
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BanWordsTest extends ShimmiePHPUnitTestCase class BanWordsTest extends ShimmiePHPUnitTestCase
{ {
public function check_blocked($image_id, $words) public function check_blocked($image_id, $words)

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BBCodeInfo extends ExtensionInfo class BBCodeInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BBCode extends FormatterExtension class BBCode extends FormatterExtension

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BBCodeTest extends ShimmiePHPUnitTestCase class BBCodeTest extends ShimmiePHPUnitTestCase
{ {
public function testBasics() public function testBasics()

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BiographyInfo extends ExtensionInfo class BiographyInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class Biography extends Extension class Biography extends Extension
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BiographyTest extends ShimmiePHPUnitTestCase class BiographyTest extends ShimmiePHPUnitTestCase
{ {
public function testBio() public function testBio()

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
use function MicroHTML\TEXTAREA; use function MicroHTML\TEXTAREA;
class BiographyTheme extends Themelet class BiographyTheme extends Themelet

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BlocksInfo extends ExtensionInfo class BlocksInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class Blocks extends Extension class Blocks extends Extension
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BlocksTest extends ShimmiePHPUnitTestCase class BlocksTest extends ShimmiePHPUnitTestCase
{ {
public function testBlocks() public function testBlocks()

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
use function MicroHTML\TABLE; use function MicroHTML\TABLE;
use function MicroHTML\TR; use function MicroHTML\TR;
use function MicroHTML\TH; use function MicroHTML\TH;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BlotterInfo extends ExtensionInfo class BlotterInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class Blotter extends Extension class Blotter extends Extension
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BlotterTest extends ShimmiePHPUnitTestCase class BlotterTest extends ShimmiePHPUnitTestCase
{ {
public function testDenial() public function testDenial()

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BlotterTheme extends Themelet class BlotterTheme extends Themelet
{ {
public function display_editor($entries) public function display_editor($entries)

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BrowserSearchInfo extends ExtensionInfo class BrowserSearchInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BrowserSearch extends Extension class BrowserSearch extends Extension
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BrowserSearchTest extends ShimmiePHPUnitTestCase class BrowserSearchTest extends ShimmiePHPUnitTestCase
{ {
public function testBasic() public function testBasic()

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkActionsInfo extends ExtensionInfo class BulkActionsInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkActionException extends SCoreException class BulkActionException extends SCoreException
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkActionsTheme extends Themelet class BulkActionsTheme extends Themelet
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkAddInfo extends ExtensionInfo class BulkAddInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkAddEvent extends Event class BulkAddEvent extends Event
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkAddTest extends ShimmiePHPUnitTestCase class BulkAddTest extends ShimmiePHPUnitTestCase
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkAddTheme extends Themelet class BulkAddTheme extends Themelet
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkAddCSVInfo extends ExtensionInfo class BulkAddCSVInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkAddCSV extends Extension class BulkAddCSV extends Extension
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkAddCSVTheme extends Themelet class BulkAddCSVTheme extends Themelet
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkDownloadInfo extends ExtensionInfo class BulkDownloadInfo extends ExtensionInfo

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkDownloadConfig class BulkDownloadConfig
{ {
@ -45,7 +47,7 @@ class BulkDownload extends Extension
($event->action == BulkDownload::DOWNLOAD_ACTION_NAME)) { ($event->action == BulkDownload::DOWNLOAD_ACTION_NAME)) {
$download_filename = $user->name . '-' . date('YmdHis') . '.zip'; $download_filename = $user->name . '-' . date('YmdHis') . '.zip';
$zip_filename = tempnam(sys_get_temp_dir(), "shimmie_bulk_download"); $zip_filename = tempnam(sys_get_temp_dir(), "shimmie_bulk_download");
$zip = new ZipArchive; $zip = new ZipArchive();
$size_total = 0; $size_total = 0;
$max_size = $config->get_int(BulkDownloadConfig::SIZE_LIMIT); $max_size = $config->get_int(BulkDownloadConfig::SIZE_LIMIT);

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkExportEvent extends Event class BulkExportEvent extends Event
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
include_once "events.php"; include_once "events.php";

View file

@ -1,10 +1,12 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class BulkImportExport extends DataHandlerExtension class BulkImportExport extends DataHandlerExtension
{ {
const EXPORT_ACTION_NAME = "bulk_export"; public const EXPORT_ACTION_NAME = "bulk_export";
const EXPORT_INFO_FILE_NAME = "export.json"; public const EXPORT_INFO_FILE_NAME = "export.json";
protected array $SUPPORTED_MIME = [MimeType::ZIP]; protected array $SUPPORTED_MIME = [MimeType::ZIP];
@ -14,7 +16,7 @@ class BulkImportExport extends DataHandlerExtension
if ($this->supported_mime($event->mime) && if ($this->supported_mime($event->mime) &&
$user->can(Permissions::BULK_IMPORT)) { $user->can(Permissions::BULK_IMPORT)) {
$zip = new ZipArchive; $zip = new ZipArchive();
if ($zip->open($event->tmpname) === true) { if ($zip->open($event->tmpname) === true) {
$json_data = $this->get_export_data($zip); $json_data = $this->get_export_data($zip);
@ -115,7 +117,7 @@ class BulkImportExport extends DataHandlerExtension
($event->action == self::EXPORT_ACTION_NAME)) { ($event->action == self::EXPORT_ACTION_NAME)) {
$download_filename = $user->name . '-' . date('YmdHis') . '.zip'; $download_filename = $user->name . '-' . date('YmdHis') . '.zip';
$zip_filename = tempnam(sys_get_temp_dir(), "shimmie_bulk_export"); $zip_filename = tempnam(sys_get_temp_dir(), "shimmie_bulk_export");
$zip = new ZipArchive; $zip = new ZipArchive();
$json_data = []; $json_data = [];

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
class CommentListInfo extends ExtensionInfo class CommentListInfo extends ExtensionInfo
{ {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1); <?php
declare(strict_types=1);
require_once "vendor/ifixit/php-akismet/akismet.class.php"; require_once "vendor/ifixit/php-akismet/akismet.class.php";

Some files were not shown because too many files have changed in this diff Show more