diff --git a/DataStorage/Database/DataMapperAbstract.php b/DataStorage/Database/DataMapperAbstract.php index 31305b80d..98813fc0e 100644 --- a/DataStorage/Database/DataMapperAbstract.php +++ b/DataStorage/Database/DataMapperAbstract.php @@ -280,8 +280,11 @@ class DataMapperAbstract implements DataMapperInterface */ public static function with(...$objects) : void { - // todo: how to handle with of parent objects/extends/relations - + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:optimization] [d:expert] + * Implement with() + * Only load fields or models which are specified in with + */ self::$fields = $objects; } @@ -1272,8 +1275,6 @@ class DataMapperAbstract implements DataMapperInterface /** @var self $mapper */ $mapper = static::$ownsOne[$propertyName]['mapper']; - // todo: delete owned one object is not recommended since it can be owned by by something else? or does owns one mean that nothing else can have a relation to this one? - return $mapper::updateArray($obj, $relations, $depth); } @@ -1644,7 +1645,12 @@ class DataMapperAbstract implements DataMapperInterface /** @var self $mapper */ $mapper = static::$ownsOne[$propertyName]['mapper']; - // todo: delete owned one object is not recommended since it can be owned by by something else? or does owns one mean that nothing else can have a relation to this one? + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:question] [d:expert] + * Deleting a owned one object is not recommended since it can be owned by something else? + * Or does owns one mean that nothing else can have a relation to this model? + */ + return $mapper::delete($obj); } @@ -2415,6 +2421,10 @@ class DataMapperAbstract implements DataMapperInterface * @return mixed * * @since 1.0.0 + * + * @todo Orange-Management/phpOMS#? [p:medium] [d:medium] [t:bug] + * If the pivot element doesn't exist the result set is empty. + * It should just return the closes elements "before" the pivot element. */ public static function getBeforePivot( $pivot, diff --git a/DataStorage/Database/Query/Builder.php b/DataStorage/Database/Query/Builder.php index 1764e1ad9..57dafceaf 100644 --- a/DataStorage/Database/Query/Builder.php +++ b/DataStorage/Database/Query/Builder.php @@ -850,7 +850,11 @@ class Builder extends BuilderAbstract */ public function count(string $table = '*') : self { - // todo: don't do this as string, create new object new \count(); this can get handled by the grammar parser WAY better + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:optimization] [d:medium] + * Don't do this as a string, create a new object $this->select(new Count($table)). + * The parser should be able to handle this much better + */ return $this->select('COUNT(' . $table . ')'); } diff --git a/System/File/Ftp/Directory.php b/System/File/Ftp/Directory.php index 3b5609e3b..3df8ede75 100644 --- a/System/File/Ftp/Directory.php +++ b/System/File/Ftp/Directory.php @@ -33,6 +33,14 @@ use phpOMS\Uri\HttpUri; */ class Directory extends FileAbstract implements FtpContainerInterface, DirectoryInterface { + /** + * Ftp connection + * + * @var resource + * @since 1.0.0 + */ + private $con; + /** * Directory nodes (files and directories). * @@ -528,9 +536,12 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory */ public function createNode() : bool { - return self::create($this->path, $this->permission, true); + return self::create($this->con, $this->path, $this->permission, true); - // todo: add node + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Add node to node list + */ } /** @@ -550,7 +561,12 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory */ public function getParent() : ContainerInterface { - // todo: Implement getParent() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement getParent() + */ + + return $this; } /** @@ -558,7 +574,12 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory */ public function copyNode(string $to, bool $overwrite = false) : bool { - // todo: Implement copyNode() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement copyNode() + */ + + return true; } /** @@ -566,7 +587,12 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory */ public function moveNode(string $to, bool $overwrite = false) : bool { - // todo: Implement moveNode() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement moveNode() + */ + + return true; } /** @@ -574,7 +600,12 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory */ public function deleteNode() : bool { - // todo: Implement deleteNode() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement deleteNode() + */ + + return true; } /** @@ -650,16 +681,13 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory } /** - * Offset to retrieve - * @link http://php.net/manual/en/arrayaccess.offsetget.php - * @param mixed $offset

- * The offset to retrieve. - *

- * @return mixed can return all value types - * @since 5.0.0 + * {@inheritdoc} */ public function offsetGet($offset) { - // todo: Implement offsetGet() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement offsetGet() + */ } } diff --git a/System/File/Ftp/File.php b/System/File/Ftp/File.php index 7de858db5..3017e41e2 100644 --- a/System/File/Ftp/File.php +++ b/System/File/Ftp/File.php @@ -407,7 +407,12 @@ class File extends FileAbstract implements FileInterface */ public function getParent() : ContainerInterface { - // todo adjust http link and self(); + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement getParent() + */ + + return $this; } /** @@ -419,7 +424,7 @@ class File extends FileAbstract implements FileInterface */ public function createNode() : bool { - return self::ftpCreate($this->con, $this->uri->getPath(), 0755, true); + return self::create($this->con, $this->uri->getPath(), 0755, true); } /** @@ -434,7 +439,12 @@ class File extends FileAbstract implements FileInterface */ public function copyNode(string $to, bool $overwrite = false) : bool { - // todo: Implement copyNode() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement copyNode() + */ + + return true; } /** @@ -449,7 +459,12 @@ class File extends FileAbstract implements FileInterface */ public function moveNode(string $to, bool $overwrite = false) : bool { - // todo: Implement moveNode() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement moveNode() + */ + + return true; } /** @@ -461,7 +476,12 @@ class File extends FileAbstract implements FileInterface */ public function deleteNode() : bool { - // todo: Implement deleteNode() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement deleteNode() + */ + + return true; } /** @@ -476,7 +496,12 @@ class File extends FileAbstract implements FileInterface */ public function putContent(string $content, int $mode = ContentPutMode::APPEND | ContentPutMode::CREATE) : bool { - // todo: Implement putContent() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement putContent() + */ + + return true; } /** @@ -492,7 +517,12 @@ class File extends FileAbstract implements FileInterface */ public function setContent(string $content) : bool { - // todo: Implement setContent() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement setContent() + */ + + return true; } /** @@ -508,7 +538,12 @@ class File extends FileAbstract implements FileInterface */ public function appendContent(string $content) : bool { - // todo: Implement appendContent() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement appendContent() + */ + + return true; } /** @@ -524,7 +559,12 @@ class File extends FileAbstract implements FileInterface */ public function prependContent(string $content) : bool { - // todo: Implement prependContent() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement prependContent() + */ + + return true; } /** @@ -536,7 +576,12 @@ class File extends FileAbstract implements FileInterface */ public function getContent() : string { - // todo: Implement getContent() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement getContent() + */ + + return ''; } /** @@ -548,6 +593,11 @@ class File extends FileAbstract implements FileInterface */ public function getExtension() : string { - // todo: Implement getExtension() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement getExtension() + */ + + return ''; } } diff --git a/System/File/Local/Directory.php b/System/File/Local/Directory.php index 8b087a04e..651e88223 100644 --- a/System/File/Local/Directory.php +++ b/System/File/Local/Directory.php @@ -282,7 +282,9 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D /** * {@inheritdoc} - * todo: move to fileAbastract since it should be the same for file and directory? + * + * @todo Orange-Management/phpOMS#??? [p:low] [t:optimization] [d:beginner] [t:question] + * Consider to move this to fileAbastract since it should be the same for file and directory? */ public static function created(string $path) : \DateTime { @@ -425,7 +427,10 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D { return self::create($this->path, $this->permission, true); - // todo: add node + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Add node to current node list + */ } /** @@ -469,7 +474,10 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D unset($this->nodes[$name]); - // todo: unlink??? + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:question] [d:medium] + * Should this also remove the resource? \unlink(); + */ return true; } @@ -612,7 +620,10 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D { return self::delete($this->path); - // todo: remove from node list + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Remove node from node list + */ } /** @@ -620,6 +631,9 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D */ public function offsetGet($offset) : void { - // todo: Implement offsetGet() method. + /** + * @todo Orange-Management/phpOMS#??? [p:low] [t:todo] [d:medium] + * Implement offsetGet() + */ } }