Skip to content

Commit

Permalink
php-cs-fixer major version 3
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Dec 2, 2023
1 parent ddba5b1 commit a4aa257
Show file tree
Hide file tree
Showing 174 changed files with 497 additions and 754 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ bin/vobject
bin/generate_vcards
bin/phpdocmd

# Assuming every .php file in the root is for testing
/*.php

# Other testing stuff
/tmpdata
/data
Expand All @@ -37,4 +34,4 @@ build.properties
docs/api
docs/wikidocs

.php_cs.cache
.php-cs-fixer.cache
2 changes: 1 addition & 1 deletion .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

$config = PhpCsFixer\Config::create();
$config = new PhpCsFixer\Config();
$config->getFinder()
->exclude('vendor')
->in(__DIR__);
Expand Down
2 changes: 1 addition & 1 deletion bin/migrateto20.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
HELLO;

exit();
exit;
}

// There's a bunch of places where the autoloader could be, so we'll try all of
Expand Down
2 changes: 1 addition & 1 deletion bin/migrateto21.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
HELLO;

exit();
exit;
}

// There's a bunch of places where the autoloader could be, so we'll try all of
Expand Down
2 changes: 1 addition & 1 deletion bin/migrateto30.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
HELLO;

exit();
exit;
}

// There's a bunch of places where the autoloader could be, so we'll try all of
Expand Down
10 changes: 5 additions & 5 deletions bin/migrateto32.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
HELLO;

exit();
exit;
}

// There's a bunch of places where the autoloader could be, so we'll try all of
Expand Down Expand Up @@ -110,7 +110,7 @@
UNIQUE(calendarid, share_href)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
SQL
);
);
$pdo->exec('
INSERT INTO calendarinstances
(
Expand Down Expand Up @@ -159,7 +159,7 @@
UNIQUE (calendarid, share_href)
);
SQL
);
);
$pdo->exec('
INSERT INTO calendarinstances
(
Expand Down Expand Up @@ -233,7 +233,7 @@
components VARBINARY(21)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SQL
);
);
break;
case 'sqlite':
$pdo->exec(<<<SQL
Expand All @@ -243,7 +243,7 @@
components text NOT NULL
);
SQL
);
);
break;
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"require-dev" : {
"ext-sqlite3": "*",
"friendsofphp/php-cs-fixer": "^2.19 || ^3.0",
"friendsofphp/php-cs-fixer": "^3.40",
"monolog/monolog": "^1.27",
"phpstan/phpstan": "^0.12 || ^1.0",
"phpstan/phpstan-phpunit": "^1.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/addressbookserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
$authBackend = new Sabre\DAV\Auth\Backend\PDO($pdo);
$principalBackend = new Sabre\DAVACL\PrincipalBackend\PDO($pdo);
$carddavBackend = new Sabre\CardDAV\Backend\PDO($pdo);
//$caldavBackend = new Sabre\CalDAV\Backend\PDO($pdo);
// $caldavBackend = new Sabre\CalDAV\Backend\PDO($pdo);

// Setting up the directory tree //
$nodes = [
Expand All @@ -42,7 +42,7 @@
// Plugins
$server->addPlugin(new Sabre\DAV\Auth\Plugin($authBackend));
$server->addPlugin(new Sabre\DAV\Browser\Plugin());
//$server->addPlugin(new Sabre\CalDAV\Plugin());
// $server->addPlugin(new Sabre\CalDAV\Plugin());
$server->addPlugin(new Sabre\CardDAV\Plugin());
$server->addPlugin(new Sabre\DAVACL\Plugin());
$server->addPlugin(new Sabre\DAV\Sync\Plugin());
Expand Down
2 changes: 1 addition & 1 deletion examples/groupwareserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

// Logging
$server->setLogger($logger);
//$server->debugExceptions = true; //enable this to include the stacktrace in exception responses
// $server->debugExceptions = true; //enable this to include the stacktrace in exception responses

// Plugins
$server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend));
Expand Down
6 changes: 0 additions & 6 deletions lib/CalDAV/Backend/AbstractBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ abstract class AbstractBackend implements BackendInterface
* promise I can handle updating this property".
*
* Read the PropPatch documentation for more info and examples.
*
* @param mixed $calendarId
*/
public function updateCalendar($calendarId, \Sabre\DAV\PropPatch $propPatch)
{
Expand All @@ -44,8 +42,6 @@ public function updateCalendar($calendarId, \Sabre\DAV\PropPatch $propPatch)
*
* If the backend supports this, it may allow for some speed-ups.
*
* @param mixed $calendarId
*
* @return array
*/
public function getMultipleCalendarObjects($calendarId, array $uris)
Expand Down Expand Up @@ -100,8 +96,6 @@ public function getMultipleCalendarObjects($calendarId, array $uris)
* as possible, so it gives you a good idea on what type of stuff you need
* to think of.
*
* @param mixed $calendarId
*
* @return array
*/
public function calendarQuery($calendarId, array $filters)
Expand Down
16 changes: 0 additions & 16 deletions lib/CalDAV/Backend/BackendInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ public function getCalendarsForUser($principalUri);
*
* @param string $principalUri
* @param string $calendarUri
*
* @return mixed
*/
public function createCalendar($principalUri, $calendarUri, array $properties);

Expand All @@ -67,15 +65,11 @@ public function createCalendar($principalUri, $calendarUri, array $properties);
* promise I can handle updating this property".
*
* Read the PropPatch documentation for more info and examples.
*
* @param mixed $calendarId
*/
public function updateCalendar($calendarId, \Sabre\DAV\PropPatch $propPatch);

/**
* Delete a calendar and all its objects.
*
* @param mixed $calendarId
*/
public function deleteCalendar($calendarId);

Expand Down Expand Up @@ -107,8 +101,6 @@ public function deleteCalendar($calendarId);
* used/fetched to determine these numbers. If both are specified the
* amount of times this is needed is reduced by a great degree.
*
* @param mixed $calendarId
*
* @return array
*/
public function getCalendarObjects($calendarId);
Expand All @@ -125,7 +117,6 @@ public function getCalendarObjects($calendarId);
*
* This method must return null if the object did not exist.
*
* @param mixed $calendarId
* @param string $objectUri
*
* @return array|null
Expand All @@ -140,8 +131,6 @@ public function getCalendarObject($calendarId, $objectUri);
*
* If the backend supports this, it may allow for some speed-ups.
*
* @param mixed $calendarId
*
* @return array
*/
public function getMultipleCalendarObjects($calendarId, array $uris);
Expand All @@ -159,7 +148,6 @@ public function getMultipleCalendarObjects($calendarId, array $uris);
* calendar-data. If the result of a subsequent GET to this object is not
* the exact same as this request body, you should omit the ETag.
*
* @param mixed $calendarId
* @param string $objectUri
* @param string $calendarData
*
Expand All @@ -180,7 +168,6 @@ public function createCalendarObject($calendarId, $objectUri, $calendarData);
* calendar-data. If the result of a subsequent GET to this object is not
* the exact same as this request body, you should omit the ETag.
*
* @param mixed $calendarId
* @param string $objectUri
* @param string $calendarData
*
Expand All @@ -193,7 +180,6 @@ public function updateCalendarObject($calendarId, $objectUri, $calendarData);
*
* The object uri is only the basename, or filename and not a full path.
*
* @param mixed $calendarId
* @param string $objectUri
*/
public function deleteCalendarObject($calendarId, $objectUri);
Expand Down Expand Up @@ -243,8 +229,6 @@ public function deleteCalendarObject($calendarId, $objectUri);
* as possible, so it gives you a good idea on what type of stuff you need
* to think of.
*
* @param mixed $calendarId
*
* @return array
*/
public function calendarQuery($calendarId, array $filters);
Expand Down
Loading

0 comments on commit a4aa257

Please sign in to comment.