aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin J. Novack <jnovack@gmail.com>2012-09-18 20:11:11 -0400
committerJustin J. Novack <jnovack@gmail.com>2012-09-19 13:32:27 -0400
commit6c0d5be1b6ec69257b09b97ddfe0405eabe92459 (patch)
tree3324ca77b3ff6c227d33eeddc13e53a912e7e51a /src
parent149e039741f94f9e22bd2c8d7dcf33158a110e79 (diff)
downloadphorkie-6c0d5be1b6ec69257b09b97ddfe0405eabe92459.tar.gz
phorkie-6c0d5be1b6ec69257b09b97ddfe0405eabe92459.zip
Cleaned up files for 0.3 milestone.
Diffstat (limited to 'src')
-rw-r--r--src/phorkie/File.php3
-rw-r--r--src/phorkie/Repository.php2
-rw-r--r--src/phorkie/Repository/Post.php3
-rw-r--r--src/phorkie/SetupCheck.php1
-rw-r--r--src/phorkie/Tool/Info.php19
-rw-r--r--src/phorkie/Tools.php7
6 files changed, 33 insertions, 2 deletions
diff --git a/src/phorkie/File.php b/src/phorkie/File.php
index f378f60..7f5b5b4 100644
--- a/src/phorkie/File.php
+++ b/src/phorkie/File.php
@@ -118,6 +118,9 @@ class File
throw new Exception('Unknown type');
}
+ /**
+ * @return string Mime type of file
+ */
public function getMimeType()
{
$ext = $this->getExt();
diff --git a/src/phorkie/Repository.php b/src/phorkie/Repository.php
index 43f2b23..4ac5ae7 100644
--- a/src/phorkie/Repository.php
+++ b/src/phorkie/Repository.php
@@ -104,7 +104,7 @@ class Repository
$this->hash = $output;
}
- /**
+ /**
* Populates $this->message
*
* @return void
diff --git a/src/phorkie/Repository/Post.php b/src/phorkie/Repository/Post.php
index 9119e06..b181b5a 100644
--- a/src/phorkie/Repository/Post.php
+++ b/src/phorkie/Repository/Post.php
@@ -130,7 +130,8 @@ class Repository_Post
->setOption('message', $commitmsg)
->setOption('author', $sessionData['name'].' <'.$sessionData['email'].'>')
->execute();
- //FIXME: git needs ref BEFORE add. ideally VersionControl_Git needs to be updated
+ //FIXME: git needs ref BEFORE add
+ //quick hack until http://pear.php.net/bugs/bug.php?id=19605 is fixed
$vc->getCommand('notes --ref=identity add')
->setOption('force')
->setOption('message', "$notes")
diff --git a/src/phorkie/SetupCheck.php b/src/phorkie/SetupCheck.php
index b1107b5..24f7009 100644
--- a/src/phorkie/SetupCheck.php
+++ b/src/phorkie/SetupCheck.php
@@ -11,6 +11,7 @@ class SetupCheck
'pear.php.net/Pager' => 'Pager',
'pear.php.net/Services_Libravatar' => 'Services_Libravatar',
'zustellzentrum.cweiske.de/MIME_Type_PlainDetect' => 'MIME_Type_PlainDetect',
+ 'pear.michelf.ca/Markdown' => 'Markdown',
);
protected $writableDirs;
diff --git a/src/phorkie/Tool/Info.php b/src/phorkie/Tool/Info.php
index c1c3c69..2e95a9f 100644
--- a/src/phorkie/Tool/Info.php
+++ b/src/phorkie/Tool/Info.php
@@ -10,16 +10,35 @@ class Tool_Info
$this->class = $class;
}
+ /**
+ * Format the tool path
+ *
+ * @param File $file
+ *
+ * @return string
+ */
public function getLink(File $file)
{
return $file->getLink('tool', $this->stripPrefix($this->class));
}
+ /**
+ * Clean namespace from class
+ *
+ * @return string
+ */
public function getTitle()
{
return $this->stripPrefix($this->class);
}
+ /**
+ * Removes custom namespace prefix
+ *
+ * @param string $class Class of object
+ *
+ * @return string
+ */
protected function stripPrefix($class)
{
$prefix = '\\phorkie\\Tool_';
diff --git a/src/phorkie/Tools.php b/src/phorkie/Tools.php
index e4aab63..9435dc0 100644
--- a/src/phorkie/Tools.php
+++ b/src/phorkie/Tools.php
@@ -4,6 +4,13 @@ namespace phorkie;
class Tools
{
+ /**
+ * Delete an entire directory structure
+ *
+ * @param string $path Path to delete
+ *
+ * @return bool
+ */
public static function recursiveDelete($path)
{
if (!is_dir($path) || is_link($path)) {