switch to PSR12 base for formatting

This commit is contained in:
Robin Appelman 2026-07-15 14:43:04 +02:00
commit cbff3d0764
29 changed files with 107 additions and 49 deletions

View file

@ -5,7 +5,7 @@ $finder = PhpCsFixer\Finder::create()
;
return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'braces_position' => [
'functions_opening_brace' => 'same_line',

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*
@ -22,14 +24,14 @@
namespace SearchDAV\Backend;
class SearchPropertyDefinition {
const XS = '{http://www.w3.org/2001/XMLSchema}';
const DATATYPE_STRING = self::XS . 'string';
const DATATYPE_INTEGER = self::XS . 'integer';
const DATATYPE_NONNEGATIVE_INTEGER = self::XS . 'nonNegativeInteger';
const DATATYPE_NON_NEGATIVE_INTEGER = self::XS . 'nonNegativeInteger';
const DATATYPE_DECIMAL = self::XS . 'decimal';
const DATATYPE_DATETIME = self::XS . 'dateTime';
const DATATYPE_BOOLEAN = self::XS . 'boolean';
public const XS = '{http://www.w3.org/2001/XMLSchema}';
public const DATATYPE_STRING = self::XS . 'string';
public const DATATYPE_INTEGER = self::XS . 'integer';
public const DATATYPE_NONNEGATIVE_INTEGER = self::XS . 'nonNegativeInteger';
public const DATATYPE_NON_NEGATIVE_INTEGER = self::XS . 'nonNegativeInteger';
public const DATATYPE_DECIMAL = self::XS . 'decimal';
public const DATATYPE_DATETIME = self::XS . 'dateTime';
public const DATATYPE_BOOLEAN = self::XS . 'boolean';
/** @var boolean */

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*
@ -30,6 +32,7 @@ use SearchDAV\XML\Literal;
use SearchDAV\XML\Operator;
use SearchDAV\XML\Order;
use SearchDAV\XML\Scope;
use function Sabre\Xml\Deserializer\keyValue;
use function Sabre\Xml\Deserializer\repeatingElements;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*
@ -32,7 +34,7 @@ use SearchDAV\Backend\ISearchBackend;
use SearchDAV\XML\SupportedQueryGrammar;
class SearchPlugin extends ServerPlugin {
const SEARCHDAV_NS = 'https://github.com/icewind1991/SearchDAV/ns';
public const SEARCHDAV_NS = 'https://github.com/icewind1991/SearchDAV/ns';
/** @var ISearchBackend */
private $searchBackend;

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
*
@ -22,18 +24,18 @@
namespace SearchDAV\Query;
class Operator {
const OPERATION_AND = '{DAV:}and';
const OPERATION_OR = '{DAV:}or';
const OPERATION_NOT = '{DAV:}not';
const OPERATION_EQUAL = '{DAV:}eq';
const OPERATION_LESS_THAN = '{DAV:}lt';
const OPERATION_LESS_OR_EQUAL_THAN = '{DAV:}lte';
const OPERATION_GREATER_THAN = '{DAV:}gt';
const OPERATION_GREATER_OR_EQUAL_THAN = '{DAV:}gte';
const OPERATION_IS_COLLECTION = '{DAV:}is-collection';
const OPERATION_IS_DEFINED = '{DAV:}is-defined';
const OPERATION_IS_LIKE = '{DAV:}like';
const OPERATION_CONTAINS = '{DAV:}contains';
public const OPERATION_AND = '{DAV:}and';
public const OPERATION_OR = '{DAV:}or';
public const OPERATION_NOT = '{DAV:}not';
public const OPERATION_EQUAL = '{DAV:}eq';
public const OPERATION_LESS_THAN = '{DAV:}lt';
public const OPERATION_LESS_OR_EQUAL_THAN = '{DAV:}lte';
public const OPERATION_GREATER_THAN = '{DAV:}gt';
public const OPERATION_GREATER_OR_EQUAL_THAN = '{DAV:}gte';
public const OPERATION_IS_COLLECTION = '{DAV:}is-collection';
public const OPERATION_IS_DEFINED = '{DAV:}is-defined';
public const OPERATION_IS_LIKE = '{DAV:}like';
public const OPERATION_CONTAINS = '{DAV:}contains';
/**
* @var string

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
*
@ -24,8 +26,8 @@ namespace SearchDAV\Query;
use SearchDAV\Backend\SearchPropertyDefinition;
class Order {
const ASC = 'ascending';
const DESC = 'descending';
public const ASC = 'ascending';
public const DESC = 'descending';
/**
* @var SearchPropertyDefinition

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*
@ -24,6 +26,7 @@ namespace SearchDAV\XML;
use Sabre\Xml\ParseException;
use Sabre\Xml\Reader;
use Sabre\Xml\XmlDeserializable;
use function Sabre\Xml\Deserializer\keyValue;
/**

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*
@ -24,6 +26,7 @@ namespace SearchDAV\XML;
use Sabre\Xml\Reader;
use Sabre\Xml\XmlDeserializable;
use SearchDAV\DAV\SearchPlugin;
use function Sabre\Xml\Deserializer\keyValue;
/**

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*
@ -23,6 +25,7 @@ namespace SearchDAV\XML;
use Sabre\Xml\Reader;
use Sabre\Xml\XmlDeserializable;
use function Sabre\Xml\Deserializer\keyValue;
class Order implements XmlDeserializable {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*
@ -23,6 +25,7 @@ namespace SearchDAV\XML;
use Sabre\DAV\Xml\Element\Response;
use Sabre\Xml\Writer;
use function Sabre\HTTP\encodePath;
class QueryDiscoverResponse extends Response {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*
@ -23,6 +25,7 @@ namespace SearchDAV\XML;
use Sabre\Xml\Reader;
use Sabre\Xml\XmlDeserializable;
use function Sabre\Xml\Deserializer\keyValue;
class Scope extends \SearchDAV\Query\Scope implements XmlDeserializable {

View file

@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*
@ -25,7 +27,7 @@ use Sabre\Xml\Writer;
use Sabre\Xml\XmlSerializable;
class SupportedQueryGrammar implements XmlSerializable {
const GRAMMAR_BASIC_SEARCH = '{DAV:}basicsearch';
public const GRAMMAR_BASIC_SEARCH = '{DAV:}basicsearch';
public function xmlSerialize(Writer $writer): void {
$writer->startElement('{DAV:}supported-query-grammar');

View file

@ -1,4 +1,5 @@
<?php
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,5 @@
<?php
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,5 @@
<?php
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*

View file

@ -1,4 +1,5 @@
<?php
/**
* @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
*