diff options
author | zotlabs <mike@macgirvin.com> | 2017-05-04 19:20:29 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-05-04 19:20:29 -0700 |
commit | e308c3d34afda1c467b049314324faa546294c9a (patch) | |
tree | 81352041e9dd94700e8be158ddda7ee66fea68f4 /vendor/sabre/dav/lib/DAVACL | |
parent | 977677d0051db24c6b7666a73c4dd6a48fe89377 (diff) | |
parent | 5c7acf4807aa427cf1391e0a5d044b453c38e619 (diff) | |
download | volse-hubzilla-e308c3d34afda1c467b049314324faa546294c9a.tar.gz volse-hubzilla-e308c3d34afda1c467b049314324faa546294c9a.tar.bz2 volse-hubzilla-e308c3d34afda1c467b049314324faa546294c9a.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'vendor/sabre/dav/lib/DAVACL')
19 files changed, 58 insertions, 59 deletions
diff --git a/vendor/sabre/dav/lib/DAVACL/Exception/NotRecognizedPrincipal.php b/vendor/sabre/dav/lib/DAVACL/Exception/NotRecognizedPrincipal.php index 4349bf101..d7ae188ae 100644 --- a/vendor/sabre/dav/lib/DAVACL/Exception/NotRecognizedPrincipal.php +++ b/vendor/sabre/dav/lib/DAVACL/Exception/NotRecognizedPrincipal.php @@ -5,7 +5,7 @@ namespace Sabre\DAVACL\Exception; use Sabre\DAV; /** - * If a client tried to set a privilege assigned to a non-existant principal, + * If a client tried to set a privilege assigned to a non-existent principal, * this exception will be thrown. * * @copyright Copyright (C) fruux GmbH (https://fruux.com/) diff --git a/vendor/sabre/dav/lib/DAVACL/FS/Collection.php b/vendor/sabre/dav/lib/DAVACL/FS/Collection.php index 1c08b43b1..b4fe7a1b0 100644 --- a/vendor/sabre/dav/lib/DAVACL/FS/Collection.php +++ b/vendor/sabre/dav/lib/DAVACL/FS/Collection.php @@ -2,11 +2,11 @@ namespace Sabre\DAVACL\FS; +use Sabre\DAV\Exception\Forbidden; +use Sabre\DAV\Exception\NotFound; use Sabre\DAV\FSExt\Directory as BaseCollection; use Sabre\DAVACL\ACLTrait; use Sabre\DAVACL\IACL; -use Sabre\DAV\Exception\Forbidden; -use Sabre\DAV\Exception\NotFound; /** * This is an ACL-enabled collection. diff --git a/vendor/sabre/dav/lib/DAVACL/FS/File.php b/vendor/sabre/dav/lib/DAVACL/FS/File.php index 387597bf7..aaf2ae148 100644 --- a/vendor/sabre/dav/lib/DAVACL/FS/File.php +++ b/vendor/sabre/dav/lib/DAVACL/FS/File.php @@ -3,8 +3,8 @@ namespace Sabre\DAVACL\FS; use Sabre\DAV\FSExt\File as BaseFile; -use Sabre\DAVACL\IACL; use Sabre\DAVACL\ACLTrait; +use Sabre\DAVACL\IACL; /** * This is an ACL-enabled file node. diff --git a/vendor/sabre/dav/lib/DAVACL/FS/HomeCollection.php b/vendor/sabre/dav/lib/DAVACL/FS/HomeCollection.php index 9e21353ea..201235e5a 100644 --- a/vendor/sabre/dav/lib/DAVACL/FS/HomeCollection.php +++ b/vendor/sabre/dav/lib/DAVACL/FS/HomeCollection.php @@ -72,7 +72,7 @@ class HomeCollection extends AbstractPrincipalCollection implements IACL { * supplied by the authentication backend. * * @param array $principalInfo - * @return \Sabre\DAVACL\INode + * @return \Sabre\DAV\INode */ function getChildForPrincipal(array $principalInfo) { diff --git a/vendor/sabre/dav/lib/DAVACL/Plugin.php b/vendor/sabre/dav/lib/DAVACL/Plugin.php index 8e912309e..a2aa118d7 100644 --- a/vendor/sabre/dav/lib/DAVACL/Plugin.php +++ b/vendor/sabre/dav/lib/DAVACL/Plugin.php @@ -3,11 +3,12 @@ namespace Sabre\DAVACL; use Sabre\DAV; -use Sabre\DAV\INode; -use Sabre\DAV\Xml\Property\Href; use Sabre\DAV\Exception\BadRequest; -use Sabre\DAV\Exception\NotFound; +use Sabre\DAV\Exception\Forbidden; use Sabre\DAV\Exception\NotAuthenticated; +use Sabre\DAV\Exception\NotFound; +use Sabre\DAV\INode; +use Sabre\DAV\Xml\Property\Href; use Sabre\DAVACL\Exception\NeedPrivileges; use Sabre\HTTP\RequestInterface; use Sabre\HTTP\ResponseInterface; @@ -53,7 +54,7 @@ class Plugin extends DAV\ServerPlugin { /** * Reference to server object. * - * @var Sabre\DAV\Server + * @var DAV\Server */ protected $server; @@ -228,14 +229,14 @@ class Plugin extends DAV\ServerPlugin { /** * Returns the standard users' principal. * - * This is one authorative principal url for the current user. + * This is one authoritative principal url for the current user. * This method will return null if the user wasn't logged in. * * @return string|null */ function getCurrentUserPrincipal() { - /** @var $authPlugin Sabre\DAV\Auth\Plugin */ + /** @var $authPlugin \Sabre\DAV\Auth\Plugin */ $authPlugin = $this->server->getPlugin('auth'); if (!$authPlugin) { return null; @@ -283,8 +284,7 @@ class Plugin extends DAV\ServerPlugin { * * These rules are used for all nodes that don't implement the IACL interface. * - * @param array $acl - * @return void + * @return array */ function getDefaultAcl() { @@ -299,7 +299,7 @@ class Plugin extends DAV\ServerPlugin { * set of rules allow anyone to do anything, as long as they are * authenticated. * - * var array + * @var array */ protected $defaultAcl = [ [ @@ -321,7 +321,7 @@ class Plugin extends DAV\ServerPlugin { /** * Returns all the principal groups the specified principal is a member of. * - * @param string $principal + * @param string $mainPrincipal * @return array */ function getPrincipalMembership($mainPrincipal) { @@ -365,7 +365,7 @@ class Plugin extends DAV\ServerPlugin { /** * Find out of a principal equals another principal. * - * This is a quick way to find out wether a principal URI is part of a + * This is a quick way to find out whether a principal URI is part of a * group, or any subgroups. * * The first argument is the principal URI you want to check against. For @@ -373,10 +373,10 @@ class Plugin extends DAV\ServerPlugin { * which you want to find out of it is the same as the first principal, or * in a member of the first principal's group or subgroups. * - * So the arguments are not interchangable. If principal A is in group B, + * So the arguments are not interchangeable. If principal A is in group B, * passing 'B', 'A' will yield true, but 'A', 'B' is false. * - * If the sceond argument is not passed, we will use the current user + * If the second argument is not passed, we will use the current user * principal. * * @param string $checkPrincipal @@ -412,8 +412,8 @@ class Plugin extends DAV\ServerPlugin { * ] * ] * - * Privileges can be nested using "aggregrates". Doing so means that - * if you assign someone the aggregrating privilege, all the + * Privileges can be nested using "aggregates". Doing so means that + * if you assign someone the aggregating privilege, all the * sub-privileges will automatically be granted. * * Marking a privilege as abstract means that the privilege cannot be @@ -484,7 +484,7 @@ class Plugin extends DAV\ServerPlugin { ], ], ]; - if ($node instanceof \Sabre\DAV\ICollection) { + if ($node instanceof DAV\ICollection) { $supportedPrivileges['{DAV:}write']['aggregates']['{DAV:}bind'] = [ 'abstract' => false, 'aggregates' => [], @@ -494,7 +494,7 @@ class Plugin extends DAV\ServerPlugin { 'aggregates' => [], ]; } - if ($node instanceof \Sabre\DAVACL\IACL) { + if ($node instanceof IACL) { $supportedPrivileges['{DAV:}write']['aggregates']['{DAV:}write-acl'] = [ 'abstract' => false, 'aggregates' => [], @@ -980,8 +980,6 @@ class Plugin extends DAV\ServerPlugin { * * @param DAV\PropFind $propFind * @param DAV\INode $node - * @param array $requestedProperties - * @param array $returnedProperties * @TODO really should be broken into multiple methods, or even a class. * @return bool */ @@ -1423,7 +1421,7 @@ class Plugin extends DAV\ServerPlugin { ]; } - // Replacing the property with its expannded form. + // Replacing the property with its expanded form. $node[200][$propertyName] = $childProps; } diff --git a/vendor/sabre/dav/lib/DAVACL/Principal.php b/vendor/sabre/dav/lib/DAVACL/Principal.php index 6ebb30907..d7db94999 100644 --- a/vendor/sabre/dav/lib/DAVACL/Principal.php +++ b/vendor/sabre/dav/lib/DAVACL/Principal.php @@ -41,7 +41,7 @@ class Principal extends DAV\Node implements IPrincipal, DAV\IProperties, IACL { /** * Creates the principal object * - * @param IPrincipalBackend $principalBackend + * @param PrincipalBackend\BackendInterface $principalBackend * @param array $principalProperties */ function __construct(PrincipalBackend\BackendInterface $principalBackend, array $principalProperties = []) { diff --git a/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/BackendInterface.php b/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/BackendInterface.php index 2cb83071a..40b6e33ea 100644 --- a/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/BackendInterface.php +++ b/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/BackendInterface.php @@ -53,7 +53,7 @@ interface BackendInterface { * Calling the handle method is like telling the PropPatch object "I * promise I can handle updating this property". * - * Read the PropPatch documenation for more info and examples. + * Read the PropPatch documentation for more info and examples. * * @param string $path * @param \Sabre\DAV\PropPatch $propPatch diff --git a/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php b/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php index a491dc88f..eb0df888b 100644 --- a/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php +++ b/vendor/sabre/dav/lib/DAVACL/PrincipalBackend/PDO.php @@ -11,7 +11,7 @@ use Sabre\HTTP\URLUtil; * * * This backend assumes all principals are in a single collection. The default collection - * is 'principals/', but this can be overriden. + * is 'principals/', but this can be overridden. * * @copyright Copyright (C) fruux GmbH (https://fruux.com/) * @author Evert Pot (http://evertpot.com/) @@ -65,7 +65,7 @@ class PDO extends AbstractBackend implements CreatePrincipalSupport { /** * Sets up the backend. * - * @param PDO $pdo + * @param \PDO $pdo */ function __construct(\PDO $pdo) { @@ -171,7 +171,7 @@ class PDO extends AbstractBackend implements CreatePrincipalSupport { * Calling the handle method is like telling the PropPatch object "I * promise I can handle updating this property". * - * Read the PropPatch documenation for more info and examples. + * Read the PropPatch documentation for more info and examples. * * @param string $path * @param DAV\PropPatch $propPatch @@ -307,7 +307,7 @@ class PDO extends AbstractBackend implements CreatePrincipalSupport { case "mailto": $query = 'SELECT uri FROM ' . $this->tableName . ' WHERE lower(email)=lower(?)'; $stmt = $this->pdo->prepare($query); - $stmt->execute([ $value ]); + $stmt->execute([$value]); while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { // Checking if the principal is in the prefix diff --git a/vendor/sabre/dav/lib/DAVACL/PrincipalCollection.php b/vendor/sabre/dav/lib/DAVACL/PrincipalCollection.php index d8a90153a..ee5b88a90 100644 --- a/vendor/sabre/dav/lib/DAVACL/PrincipalCollection.php +++ b/vendor/sabre/dav/lib/DAVACL/PrincipalCollection.php @@ -57,7 +57,7 @@ class PrincipalCollection extends AbstractPrincipalCollection implements IExtend * * @param string $name * @param MkCol $mkCol - * @throws Exception\InvalidResourceType + * @throws InvalidResourceType * @return void */ function createExtendedCollection($name, MkCol $mkCol) { diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Property/Acl.php b/vendor/sabre/dav/lib/DAVACL/Xml/Property/Acl.php index 9f5e40df1..0e1c30ccf 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Property/Acl.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Property/Acl.php @@ -78,12 +78,12 @@ class Acl implements Element, HtmlOutput { } /** - * The xmlSerialize metod is called during xml writing. + * The xmlSerialize method is called during xml writing. * * Use the $writer argument to write its own xml serialization. * * An important note: do _not_ create a parent element. Any element - * implementing XmlSerializble should only ever write what's considered + * implementing XmlSerializable should only ever write what's considered * its 'inner xml'. * * The parent of the current element is responsible for writing a @@ -149,7 +149,7 @@ class Acl implements Element, HtmlOutput { /** * The deserialize method is called during xml parsing. * - * This method is called statictly, this is because in theory this method + * This method is called statically, this is because in theory this method * may be used as a type of constructor, or factory method. * * Often you want to return an instance of the current class, but you are diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Property/AclRestrictions.php b/vendor/sabre/dav/lib/DAVACL/Xml/Property/AclRestrictions.php index f669cc5e1..8d5854c23 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Property/AclRestrictions.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Property/AclRestrictions.php @@ -2,8 +2,8 @@ namespace Sabre\DAVACL\Xml\Property; -use Sabre\Xml\XmlSerializable; use Sabre\Xml\Writer; +use Sabre\Xml\XmlSerializable; /** * AclRestrictions property @@ -17,12 +17,12 @@ use Sabre\Xml\Writer; class AclRestrictions implements XmlSerializable { /** - * The xmlSerialize metod is called during xml writing. + * The xmlSerialize method is called during xml writing. * * Use the $writer argument to write its own xml serialization. * * An important note: do _not_ create a parent element. Any element - * implementing XmlSerializble should only ever write what's considered + * implementing XmlSerializable should only ever write what's considered * its 'inner xml'. * * The parent of the current element is responsible for writing a diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Property/CurrentUserPrivilegeSet.php b/vendor/sabre/dav/lib/DAVACL/Xml/Property/CurrentUserPrivilegeSet.php index 0a95eb2b7..74c09cee1 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Property/CurrentUserPrivilegeSet.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Property/CurrentUserPrivilegeSet.php @@ -41,12 +41,12 @@ class CurrentUserPrivilegeSet implements Element, HtmlOutput { } /** - * The xmlSerialize metod is called during xml writing. + * The xmlSerialize method is called during xml writing. * * Use the $writer argument to write its own xml serialization. * * An important note: do _not_ create a parent element. Any element - * implementing XmlSerializble should only ever write what's considered + * implementing XmlSerializable should only ever write what's considered * its 'inner xml'. * * The parent of the current element is responsible for writing a @@ -99,7 +99,7 @@ class CurrentUserPrivilegeSet implements Element, HtmlOutput { /** * The deserialize method is called during xml parsing. * - * This method is called statictly, this is because in theory this method + * This method is called statically, this is because in theory this method * may be used as a type of constructor, or factory method. * * Often you want to return an instance of the current class, but you are diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Property/Principal.php b/vendor/sabre/dav/lib/DAVACL/Xml/Property/Principal.php index d32249d8b..04d22165d 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Property/Principal.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Property/Principal.php @@ -85,12 +85,12 @@ class Principal extends DAV\Xml\Property\Href { /** - * The xmlSerialize metod is called during xml writing. + * The xmlSerialize method is called during xml writing. * * Use the $writer argument to write its own xml serialization. * * An important note: do _not_ create a parent element. Any element - * implementing XmlSerializble should only ever write what's considered + * implementing XmlSerializable should only ever write what's considered * its 'inner xml'. * * The parent of the current element is responsible for writing a diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php b/vendor/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php index 55e7783ae..b963cc8c3 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Property/SupportedPrivilegeSet.php @@ -4,8 +4,8 @@ namespace Sabre\DAVACL\Xml\Property; use Sabre\DAV\Browser\HtmlOutput; use Sabre\DAV\Browser\HtmlOutputHelper; -use Sabre\Xml\XmlSerializable; use Sabre\Xml\Writer; +use Sabre\Xml\XmlSerializable; /** * SupportedPrivilegeSet property @@ -53,12 +53,12 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput { } /** - * The xmlSerialize metod is called during xml writing. + * The xmlSerialize method is called during xml writing. * * Use the $writer argument to write its own xml serialization. * * An important note: do _not_ create a parent element. Any element - * implementing XmlSerializble should only ever write what's considered + * implementing XmlSerializable should only ever write what's considered * its 'inner xml'. * * The parent of the current element is responsible for writing a @@ -73,7 +73,7 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput { */ function xmlSerialize(Writer $writer) { - $this->serializePriv($writer, '{DAV:}all', [ 'aggregates' => $this->privileges]); + $this->serializePriv($writer, '{DAV:}all', ['aggregates' => $this->privileges]); } @@ -114,7 +114,7 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput { ob_start(); echo "<ul class=\"tree\">"; - $traverse('{DAV:}all', [ 'aggregates' => $this->getValue() ]); + $traverse('{DAV:}all', ['aggregates' => $this->getValue()]); echo "</ul>\n"; return ob_get_clean(); @@ -129,6 +129,7 @@ class SupportedPrivilegeSet implements XmlSerializable, HtmlOutput { * This is a recursive function. * * @param Writer $writer + * @param string $privName * @param array $privilege * @return void */ diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Request/AclPrincipalPropSetReport.php b/vendor/sabre/dav/lib/DAVACL/Xml/Request/AclPrincipalPropSetReport.php index f01c1e6ab..0aa2f29a5 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Request/AclPrincipalPropSetReport.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Request/AclPrincipalPropSetReport.php @@ -2,9 +2,9 @@ namespace Sabre\DAVACL\Xml\Request; -use Sabre\Xml\XmlDeserializable; -use Sabre\Xml\Reader; use Sabre\Xml\Deserializer; +use Sabre\Xml\Reader; +use Sabre\Xml\XmlDeserializable; /** * AclPrincipalPropSet request parser. @@ -24,7 +24,7 @@ class AclPrincipalPropSetReport implements XmlDeserializable { /** * The deserialize method is called during xml parsing. * - * This method is called statictly, this is because in theory this method + * This method is called statically, this is because in theory this method * may be used as a type of constructor, or factory method. * * Often you want to return an instance of the current class, but you are diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Request/ExpandPropertyReport.php b/vendor/sabre/dav/lib/DAVACL/Xml/Request/ExpandPropertyReport.php index 3f535e301..a9938ba5b 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Request/ExpandPropertyReport.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Request/ExpandPropertyReport.php @@ -35,7 +35,7 @@ class ExpandPropertyReport implements XmlDeserializable { /** * The deserialize method is called during xml parsing. * - * This method is called statictly, this is because in theory this method + * This method is called statically, this is because in theory this method * may be used as a type of constructor, or factory method. * * Often you want to return an instance of the current class, but you are diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalMatchReport.php b/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalMatchReport.php index 5c4e88189..1be15ab2d 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalMatchReport.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalMatchReport.php @@ -2,9 +2,9 @@ namespace Sabre\DAVACL\Xml\Request; -use Sabre\Xml\XmlDeserializable; -use Sabre\Xml\Reader; use Sabre\Xml\Deserializer; +use Sabre\Xml\Reader; +use Sabre\Xml\XmlDeserializable; /** * PrincipalMatchReport request parser. @@ -55,7 +55,7 @@ class PrincipalMatchReport implements XmlDeserializable { /** * The deserialize method is called during xml parsing. * - * This method is called statictly, this is because in theory this method + * This method is called statically, this is because in theory this method * may be used as a type of constructor, or factory method. * * Often you want to return an instance of the current class, but you are diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php b/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php index 1e7aa4481..b0cf0e408 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalPropertySearchReport.php @@ -2,9 +2,9 @@ namespace Sabre\DAVACL\Xml\Request; +use Sabre\DAV\Exception\BadRequest; use Sabre\Xml\Reader; use Sabre\Xml\XmlDeserializable; -use Sabre\DAV\Exception\BadRequest; /** * PrincipalSearchPropertySetReport request parser. @@ -56,7 +56,7 @@ class PrincipalPropertySearchReport implements XmlDeserializable { /** * The deserialize method is called during xml parsing. * - * This method is called statictly, this is because in theory this method + * This method is called statically, this is because in theory this method * may be used as a type of constructor, or factory method. * * Often you want to return an instance of the current class, but you are diff --git a/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalSearchPropertySetReport.php b/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalSearchPropertySetReport.php index ade157b19..64d1f7f86 100644 --- a/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalSearchPropertySetReport.php +++ b/vendor/sabre/dav/lib/DAVACL/Xml/Request/PrincipalSearchPropertySetReport.php @@ -2,9 +2,9 @@ namespace Sabre\DAVACL\Xml\Request; +use Sabre\DAV\Exception\BadRequest; use Sabre\Xml\Reader; use Sabre\Xml\XmlDeserializable; -use Sabre\DAV\Exception\BadRequest; /** * PrincipalSearchPropertySetReport request parser. @@ -23,7 +23,7 @@ class PrincipalSearchPropertySetReport implements XmlDeserializable { /** * The deserialize method is called during xml parsing. * - * This method is called statictly, this is because in theory this method + * This method is called statically, this is because in theory this method * may be used as a type of constructor, or factory method. * * Often you want to return an instance of the current class, but you are |