From 2fc3fbb41dbd81a92dfe27a22b31f36b10ea37ca Mon Sep 17 00:00:00 2001 From: Juuso Lapinlampi Date: Mon, 23 May 2016 21:02:39 +0000 Subject: Extend and improve PHP code comments (PHPDoc) Add file summaries, @copyright tags and other comments. Covers majority of the PHP code base now. I have avoided being too verbose and omitted some potential tags. Most visibly to the user, this comments every user configurable setting and clarifies what some of the options do. POMF_DB_USER and POMF_DB_PASS are not rendered perfectly in phpDocumentor version 2.8.5. This is a sacrifice I made in attempt for not being too verbose and obvious. Response class gets a @todo for being a god object. --- static/classes/UploadedFile.class.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'static/classes/UploadedFile.class.php') diff --git a/static/classes/UploadedFile.class.php b/static/classes/UploadedFile.class.php index 99020ce..1149581 100644 --- a/static/classes/UploadedFile.class.php +++ b/static/classes/UploadedFile.class.php @@ -1,7 +1,9 @@ + * Returns information about uploaded files. + * + * @copyright Copyright (c) 2013, 2014 Peter Lejeck * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -31,14 +33,18 @@ class UploadedFile public $tempfile; public $error; - /* Cached checksums */ + /** + * SHA-1 checksum + * + * @var string 40 digit hexadecimal hash (160 bits) + */ private $sha1; /** * Generates the SHA1 or returns the cached SHA1 hash for the file. * * @deprecated 2.1.0 To be replaced with SHA-256 hashing. - * @return string + * @return string|false $sha1 */ public function get_sha1() { -- cgit v1.2.3 From 118e7a7e53f32cc4ed76ec164de4835619d319d4 Mon Sep 17 00:00:00 2001 From: Juuso Lapinlampi Date: Mon, 23 May 2016 21:21:14 +0000 Subject: Add Pantsu.cat copyright year 2016 for recent change Claiming copyright for parts of UploadedFile.class.php and settings.inc.php as per previous change, which introduced PHPDoc comments. The other files where edits were made in previous commits are non-substantial and thus most likely not under copyright. --- static/classes/UploadedFile.class.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'static/classes/UploadedFile.class.php') diff --git a/static/classes/UploadedFile.class.php b/static/classes/UploadedFile.class.php index 1149581..8c80b4a 100644 --- a/static/classes/UploadedFile.class.php +++ b/static/classes/UploadedFile.class.php @@ -4,6 +4,8 @@ * Returns information about uploaded files. * * @copyright Copyright (c) 2013, 2014 Peter Lejeck + * @copyright Copyright (c) 2016 the Pantsu.cat developers + * * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal -- cgit v1.2.3 From f5f387293f67b6d0fcd2f34a5d118db88ef9660c Mon Sep 17 00:00:00 2001 From: Juuso Lapinlampi Date: Mon, 23 May 2016 21:26:06 +0000 Subject: UploadedFile: Fix typo SHA1 to SHA-1 This typo has been around for a while. Well, not anymore. --- static/classes/UploadedFile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static/classes/UploadedFile.class.php') diff --git a/static/classes/UploadedFile.class.php b/static/classes/UploadedFile.class.php index 8c80b4a..20d42b3 100644 --- a/static/classes/UploadedFile.class.php +++ b/static/classes/UploadedFile.class.php @@ -43,7 +43,7 @@ class UploadedFile private $sha1; /** - * Generates the SHA1 or returns the cached SHA1 hash for the file. + * Generates the SHA-1 or returns the cached SHA-1 hash for the file. * * @deprecated 2.1.0 To be replaced with SHA-256 hashing. * @return string|false $sha1 -- cgit v1.2.3