Merge pull request #1070 from phil-davis/php-cs-fixer-2.19.3

Use latest php-cs-fixer major version 2.19.3
This commit is contained in:
Phil Davis 2021-11-25 16:26:21 +05:45 committed by GitHub
commit 29504a3164
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 48 additions and 48 deletions

View file

@ -142,7 +142,7 @@ class Server {
$principalBackend = new \Sabre\DAVACL\PrincipalBackend\PDO($this->pdo); $principalBackend = new \Sabre\DAVACL\PrincipalBackend\PDO($this->pdo);
$nodes = [ $nodes = [
new \Sabre\CalDAV\Principal\Collection($principalBackend) new \Sabre\CalDAV\Principal\Collection($principalBackend),
]; ];
if ($this->enableCalDAV) { if ($this->enableCalDAV) {
$calendarBackend = new \Sabre\CalDAV\Backend\PDO($this->pdo); $calendarBackend = new \Sabre\CalDAV\Backend\PDO($this->pdo);

View file

@ -75,7 +75,7 @@ class AddressBook extends \Flake\Core\Model\Db {
"popover" => [ "popover" => [
"title" => "Address Book token ID", "title" => "Address Book token ID",
"content" => "The unique identifier for this address book.", "content" => "The unique identifier for this address book.",
] ],
])); ]));
$oMorpho->add(new \Formal\Element\Text([ $oMorpho->add(new \Formal\Element\Text([
@ -85,12 +85,12 @@ class AddressBook extends \Flake\Core\Model\Db {
"popover" => [ "popover" => [
"title" => "Display name", "title" => "Display name",
"content" => "This is the name that will be displayed in your CardDAV client.", "content" => "This is the name that will be displayed in your CardDAV client.",
] ],
])); ]));
$oMorpho->add(new \Formal\Element\Text([ $oMorpho->add(new \Formal\Element\Text([
"prop" => "description", "prop" => "description",
"label" => "Description" "label" => "Description",
])); ]));
if ($this->floating()) { if ($this->floating()) {

View file

@ -42,7 +42,7 @@ class Calendar extends \Flake\Core\Model\Db {
"calendarorder" => 0, "calendarorder" => 0,
"calendarcolor" => "", "calendarcolor" => "",
"timezone" => null, "timezone" => null,
"calendarid" => 0 "calendarid" => 0,
]; ];
protected $oCalendar; # Baikal\Model\Calendar\Calendar protected $oCalendar; # Baikal\Model\Calendar\Calendar
@ -182,7 +182,7 @@ class Calendar extends \Flake\Core\Model\Db {
"popover" => [ "popover" => [
"title" => "Calendar token ID", "title" => "Calendar token ID",
"content" => "The unique identifier for this calendar.", "content" => "The unique identifier for this calendar.",
] ],
])); ]));
$oMorpho->add(new \Formal\Element\Text([ $oMorpho->add(new \Formal\Element\Text([
@ -192,7 +192,7 @@ class Calendar extends \Flake\Core\Model\Db {
"popover" => [ "popover" => [
"title" => "Display name", "title" => "Display name",
"content" => "This is the name that will be displayed in your CalDAV client.", "content" => "This is the name that will be displayed in your CalDAV client.",
] ],
])); ]));
$oMorpho->add(new \Formal\Element\Text([ $oMorpho->add(new \Formal\Element\Text([
@ -204,12 +204,12 @@ class Calendar extends \Flake\Core\Model\Db {
"content" => "This is the color that will be displayed in your CalDAV client.<br/>" . "content" => "This is the color that will be displayed in your CalDAV client.<br/>" .
"Must be supplied in format '#RRGGBBAA' (alpha channel optional) with hexadecimal values.<br/>" . "Must be supplied in format '#RRGGBBAA' (alpha channel optional) with hexadecimal values.<br/>" .
"This value is optional.", "This value is optional.",
] ],
])); ]));
$oMorpho->add(new \Formal\Element\Text([ $oMorpho->add(new \Formal\Element\Text([
"prop" => "description", "prop" => "description",
"label" => "Description" "label" => "Description",
])); ]));
$oMorpho->add(new \Formal\Element\Checkbox([ $oMorpho->add(new \Formal\Element\Checkbox([

View file

@ -33,7 +33,7 @@ class Calendar extends \Flake\Core\Model\Db {
const LABELFIELD = "components"; const LABELFIELD = "components";
protected $aData = [ protected $aData = [
"components" => "" "components" => "",
]; ];
function hasInstances() { function hasInstances() {

View file

@ -64,7 +64,7 @@ class Database extends \Baikal\Model\Config {
$oMorpho->add(new \Formal\Element\Text([ $oMorpho->add(new \Formal\Element\Text([
"prop" => "mysql_host", "prop" => "mysql_host",
"label" => "MySQL host", "label" => "MySQL host",
"help" => "Host ip or name, including ':portnumber' if port is not the default one (3306)" "help" => "Host ip or name, including ':portnumber' if port is not the default one (3306)",
])); ]));
$oMorpho->add(new \Formal\Element\Text([ $oMorpho->add(new \Formal\Element\Text([

View file

@ -42,7 +42,7 @@ class Standard extends \Baikal\Model\Config {
// While not editable as will change admin & any existing user passwords, // While not editable as will change admin & any existing user passwords,
// could be set to different value when migrating from legacy config // could be set to different value when migrating from legacy config
"auth_realm" => "BaikalDAV", "auth_realm" => "BaikalDAV",
"base_uri" => "" "base_uri" => "",
]; ];
function __construct() { function __construct() {
@ -62,24 +62,24 @@ class Standard extends \Baikal\Model\Config {
$oMorpho->add(new \Formal\Element\Checkbox([ $oMorpho->add(new \Formal\Element\Checkbox([
"prop" => "card_enabled", "prop" => "card_enabled",
"label" => "Enable CardDAV" "label" => "Enable CardDAV",
])); ]));
$oMorpho->add(new \Formal\Element\Checkbox([ $oMorpho->add(new \Formal\Element\Checkbox([
"prop" => "cal_enabled", "prop" => "cal_enabled",
"label" => "Enable CalDAV" "label" => "Enable CalDAV",
])); ]));
$oMorpho->add(new \Formal\Element\Text([ $oMorpho->add(new \Formal\Element\Text([
"prop" => "invite_from", "prop" => "invite_from",
"label" => "Email invite sender address", "label" => "Email invite sender address",
"help" => "Leave empty to disable sending invite emails" "help" => "Leave empty to disable sending invite emails",
])); ]));
$oMorpho->add(new \Formal\Element\Listbox([ $oMorpho->add(new \Formal\Element\Listbox([
"prop" => "dav_auth_type", "prop" => "dav_auth_type",
"label" => "WebDAV authentication type", "label" => "WebDAV authentication type",
"options" => ["Digest", "Basic", "Apache"] "options" => ["Digest", "Basic", "Apache"],
])); ]));
$oMorpho->add(new \Formal\Element\Password([ $oMorpho->add(new \Formal\Element\Password([

View file

@ -212,7 +212,7 @@ class User extends \Flake\Core\Model\Db {
"popover" => [ "popover" => [
"title" => "Username", "title" => "Username",
"content" => "The login for this user account. It has to be unique.", "content" => "The login for this user account. It has to be unique.",
] ],
])); ]));
$oMorpho->add(new \Formal\Element\Text([ $oMorpho->add(new \Formal\Element\Text([
@ -222,13 +222,13 @@ class User extends \Flake\Core\Model\Db {
"popover" => [ "popover" => [
"title" => "Display name", "title" => "Display name",
"content" => "This is the name that will be displayed in your CalDAV/CardDAV clients.", "content" => "This is the name that will be displayed in your CalDAV/CardDAV clients.",
] ],
])); ]));
$oMorpho->add(new \Formal\Element\Text([ $oMorpho->add(new \Formal\Element\Text([
"prop" => "email", "prop" => "email",
"label" => "Email", "label" => "Email",
"validation" => "required,email" "validation" => "required,email",
])); ]));
$oMorpho->add(new \Formal\Element\Password([ $oMorpho->add(new \Formal\Element\Password([
@ -251,12 +251,12 @@ class User extends \Flake\Core\Model\Db {
$oMorpho->element("password")->setOption("popover", [ $oMorpho->element("password")->setOption("popover", [
"title" => "Password", "title" => "Password",
"content" => "Write something here only if you want to change the user password." "content" => "Write something here only if you want to change the user password.",
]); ]);
$oMorpho->element("passwordconfirm")->setOption("popover", [ $oMorpho->element("passwordconfirm")->setOption("popover", [
"title" => "Confirm password", "title" => "Confirm password",
"content" => "Write something here only if you want to change the user password." "content" => "Write something here only if you want to change the user password.",
]); ]);
$oMorpho->element("password")->setOption("placeholder", $sNotice); $oMorpho->element("password")->setOption("placeholder", $sNotice);

View file

@ -61,7 +61,7 @@ class Initialize extends \Flake\Core\Controller {
} }
$this->oForm = $this->oModel->formForThisModelInstance([ $this->oForm = $this->oModel->formForThisModelInstance([
"close" => false "close" => false,
]); ]);
if ($this->oForm->submitted()) { if ($this->oForm->submitted()) {

View file

@ -268,7 +268,7 @@ HTML;
$stmt->execute([ $stmt->execute([
md5($row['carddata']), md5($row['carddata']),
strlen($row['carddata']), strlen($row['carddata']),
$row['id'] $row['id'],
]); ]);
} }
$this->aSuccess[] = 'etag and size was recalculated for cards'; $this->aSuccess[] = 'etag and size was recalculated for cards';
@ -304,7 +304,7 @@ HTML;
$stmt1->execute([ $stmt1->execute([
'addressbooks/' . basename($row['uri']), 'addressbooks/' . basename($row['uri']),
'{http://calendarserver.org/ns/}me-card', '{http://calendarserver.org/ns/}me-card',
serialize(new \Sabre\DAV\Xml\Property\Href($row['vcardurl'])) serialize(new \Sabre\DAV\Xml\Property\Href($row['vcardurl'])),
]); ]);
} }
$this->aSuccess[] = 'vcardurl was migrated to the propertystorage system'; $this->aSuccess[] = 'vcardurl was migrated to the propertystorage system';

View file

@ -47,7 +47,7 @@ class Standard extends \Flake\Core\Controller {
} }
$this->oForm = $this->oModel->formForThisModelInstance([ $this->oForm = $this->oModel->formForThisModelInstance([
"close" => false "close" => false,
]); ]);
if ($this->oForm->submitted()) { if ($this->oForm->submitted()) {

View file

@ -102,7 +102,7 @@ class AddressBooks extends \Flake\Core\Controller {
protected function initForm() { protected function initForm() {
if ($this->actionEditRequested() || $this->actionNewRequested()) { if ($this->actionEditRequested() || $this->actionNewRequested()) {
$aOptions = [ $aOptions = [
"closeurl" => $this->linkHome() "closeurl" => $this->linkHome(),
]; ];
$this->oForm = $this->oModel->formForThisModelInstance($aOptions); $this->oForm = $this->oModel->formForThisModelInstance($aOptions);
@ -123,7 +123,7 @@ class AddressBooks extends \Flake\Core\Controller {
function linkNew() { function linkNew() {
return self::buildRoute([ return self::buildRoute([
"user" => $this->currentUserId(), "user" => $this->currentUserId(),
"new" => 1 "new" => 1,
]) . "#form"; ]) . "#form";
} }
@ -165,7 +165,7 @@ class AddressBooks extends \Flake\Core\Controller {
function linkEdit(\Baikal\Model\AddressBook $oModel) { function linkEdit(\Baikal\Model\AddressBook $oModel) {
return self::buildRoute([ return self::buildRoute([
"user" => $this->currentUserId(), "user" => $this->currentUserId(),
"edit" => $oModel->get("id") "edit" => $oModel->get("id"),
]) . "#form"; ]) . "#form";
} }
@ -197,7 +197,7 @@ class AddressBooks extends \Flake\Core\Controller {
function linkDelete(\Baikal\Model\AddressBook $oModel) { function linkDelete(\Baikal\Model\AddressBook $oModel) {
return self::buildRoute([ return self::buildRoute([
"user" => $this->currentUserId(), "user" => $this->currentUserId(),
"delete" => $oModel->get("id") "delete" => $oModel->get("id"),
]) . "#message"; ]) . "#message";
} }
@ -205,7 +205,7 @@ class AddressBooks extends \Flake\Core\Controller {
return self::buildRoute([ return self::buildRoute([
"user" => $this->currentUserId(), "user" => $this->currentUserId(),
"delete" => $oModel->get("id"), "delete" => $oModel->get("id"),
"confirm" => 1 "confirm" => 1,
]) . "#message"; ]) . "#message";
} }

View file

@ -98,7 +98,7 @@ class Calendars extends \Flake\Core\Controller {
protected function initForm() { protected function initForm() {
if ($this->actionEditRequested() || $this->actionNewRequested()) { if ($this->actionEditRequested() || $this->actionNewRequested()) {
$aOptions = [ $aOptions = [
"closeurl" => $this->linkHome() "closeurl" => $this->linkHome(),
]; ];
$this->oForm = $this->oModel->formForThisModelInstance($aOptions); $this->oForm = $this->oModel->formForThisModelInstance($aOptions);
@ -119,7 +119,7 @@ class Calendars extends \Flake\Core\Controller {
function linkNew() { function linkNew() {
return self::buildRoute([ return self::buildRoute([
"user" => $this->currentUserId(), "user" => $this->currentUserId(),
"new" => 1 "new" => 1,
]) . "#form"; ]) . "#form";
} }
@ -168,7 +168,7 @@ class Calendars extends \Flake\Core\Controller {
function linkEdit(\Baikal\Model\Calendar $oModel) { function linkEdit(\Baikal\Model\Calendar $oModel) {
return self::buildRoute([ return self::buildRoute([
"user" => $this->currentUserId(), "user" => $this->currentUserId(),
"edit" => $oModel->get("id") "edit" => $oModel->get("id"),
]) . "#form"; ]) . "#form";
} }
@ -200,7 +200,7 @@ class Calendars extends \Flake\Core\Controller {
function linkDelete(\Baikal\Model\Calendar $oModel) { function linkDelete(\Baikal\Model\Calendar $oModel) {
return self::buildRoute([ return self::buildRoute([
"user" => $this->currentUserId(), "user" => $this->currentUserId(),
"delete" => $oModel->get("id") "delete" => $oModel->get("id"),
]) . "#message"; ]) . "#message";
} }
@ -208,7 +208,7 @@ class Calendars extends \Flake\Core\Controller {
return self::buildRoute([ return self::buildRoute([
"user" => $this->currentUserId(), "user" => $this->currentUserId(),
"delete" => $oModel->get("id"), "delete" => $oModel->get("id"),
"confirm" => 1 "confirm" => 1,
]) . "#message"; ]) . "#message";
} }

View file

@ -101,7 +101,7 @@ class Users extends \Flake\Core\Controller {
protected function initForm() { protected function initForm() {
if ($this->actionEditRequested() || $this->actionNewRequested()) { if ($this->actionEditRequested() || $this->actionNewRequested()) {
$aOptions = [ $aOptions = [
"closeurl" => self::link() "closeurl" => self::link(),
]; ];
$this->oForm = $this->oModel->formForThisModelInstance($aOptions); $this->oForm = $this->oModel->formForThisModelInstance($aOptions);
@ -213,26 +213,26 @@ class Users extends \Flake\Core\Controller {
function linkNew() { function linkNew() {
return self::buildRoute([ return self::buildRoute([
"new" => 1 "new" => 1,
]) . "#form"; ]) . "#form";
} }
static function linkEdit(\Baikal\Model\User $user) { static function linkEdit(\Baikal\Model\User $user) {
return self::buildRoute([ return self::buildRoute([
"edit" => $user->get("id") "edit" => $user->get("id"),
]) . "#form"; ]) . "#form";
} }
static function linkDelete(\Baikal\Model\User $user) { static function linkDelete(\Baikal\Model\User $user) {
return self::buildRoute([ return self::buildRoute([
"delete" => $user->get("id") "delete" => $user->get("id"),
]) . "#message"; ]) . "#message";
} }
static function linkDeleteConfirm(\Baikal\Model\User $user) { static function linkDeleteConfirm(\Baikal\Model\User $user) {
return self::buildRoute([ return self::buildRoute([
"delete" => $user->get("id"), "delete" => $user->get("id"),
"confirm" => 1 "confirm" => 1,
]) . "#message"; ]) . "#message";
} }

View file

@ -387,7 +387,7 @@ function generateSprite($aSymbols, $iCols, $iRows, $iPngWidth, $iPngHeight, $sCl
"x" => round($iX), "x" => round($iX),
"y" => round($iY), "y" => round($iY),
"width" => ceil($iSymbolWidth), "width" => ceil($iSymbolWidth),
"height" => ceil($iSymbolHeight) "height" => ceil($iSymbolHeight),
]; ];
++$iKey; ++$iKey;

View file

@ -34,5 +34,5 @@ $GLOBALS["ROUTES"] = [
"users/addressbooks" => "\BaikalAdmin\Route\User\AddressBooks", "users/addressbooks" => "\BaikalAdmin\Route\User\AddressBooks",
"settings/standard" => "\BaikalAdmin\Route\Settings\Standard", "settings/standard" => "\BaikalAdmin\Route\Settings\Standard",
"settings/database" => "\BaikalAdmin\Route\Settings\Database", "settings/database" => "\BaikalAdmin\Route\Settings\Database",
"logout" => "\BaikalAdmin\Route\Logout" "logout" => "\BaikalAdmin\Route\Logout",
]; ];

View file

@ -122,7 +122,7 @@ class Sql extends \Flake\Core\Requester {
], ],
[ [
$sField, $sField,
$sValue $sValue,
], ],
$sWrap $sWrap
); );

View file

@ -19,7 +19,7 @@
"symfony/yaml" : "^3.4" "symfony/yaml" : "^3.4"
}, },
"require-dev" : { "require-dev" : {
"friendsofphp/php-cs-fixer": "2.18.0", "friendsofphp/php-cs-fixer": "2.19.3",
"phpstan/phpstan": "^1.2" "phpstan/phpstan": "^1.2"
}, },
"replace" : { "replace" : {