Page MenuHomeDevCentral

D441.id1070.diff
No OneTemporary

D441.id1070.diff

diff --git a/app/Analyzers/GitHub/GitHubPayloadAnalyzer.php b/app/Analyzers/GitHub/GitHubPayloadAnalyzer.php
--- a/app/Analyzers/GitHub/GitHubPayloadAnalyzer.php
+++ b/app/Analyzers/GitHub/GitHubPayloadAnalyzer.php
@@ -9,6 +9,7 @@
use Storage;
class GitHubPayloadAnalyzer {
+
///
/// Private members
///
@@ -82,6 +83,11 @@
*/
const CONFIG_DEFAULT_FILE = 'default.json';
+ /**
+ * Gets the full path to the configuration file.
+ *
+ * @return string
+ */
public function getConfigurationFileName () {
$dir = Config::get('services.github.analyzer.configDir');
$filename = $dir . '/' . $this->project . '.json';
@@ -106,10 +112,16 @@
/// Properties
///
+ /**
+ * Gets the name of the repository.
+ *
+ * @var string
+ */
public function getRepository () {
if ($this->isAdministrativeEvent()) {
return '';
}
+
return $this->payload->repository->name;
}
@@ -117,6 +129,9 @@
/// Qualification of the payload
///
+ /**
+ * @return bool
+ */
public function isAdministrativeEvent () {
$administrativeEvents = [
'membership', // Member added to team
@@ -128,9 +143,9 @@
}
/**
- * Gets the group for a specific payload
+ * Gets the group for a specific payload.
*
- * @return string the group, central part of the routing key
+ * @return string The group, central part of the routing key
*/
public function getGroup () {
// Some events are organization-level only and can't be mapped to an
@@ -156,7 +171,7 @@
///
/**
- * Gets a short textual description of the event
+ * Gets a short textual description of the event.
*
* @return string
*/
@@ -165,11 +180,12 @@
}
/**
- * Gets a link to view the event on GitHub
+ * Gets a link to view the event on GitHub.
*
* @return string The most relevant URL
*/
public function getLink () {
return $this->analyzerEvent->getLink();
}
+
}
diff --git a/app/Analyzers/Phabricator/PhabricatorPayloadAnalyzer.php b/app/Analyzers/Phabricator/PhabricatorPayloadAnalyzer.php
--- a/app/Analyzers/Phabricator/PhabricatorPayloadAnalyzer.php
+++ b/app/Analyzers/Phabricator/PhabricatorPayloadAnalyzer.php
@@ -8,6 +8,7 @@
use Storage;
class PhabricatorPayloadAnalyzer {
+
///
/// Private members
///
@@ -57,6 +58,11 @@
*/
const CONFIG_DEFAULT_FILE = 'default.json';
+ /**
+ * Gets the full path to the configuration file.
+ *
+ * @return string
+ */
public function getConfigurationFileName () {
$dir = Config::get('services.phabricator.analyzer.configDir');
$filename = $dir . '/' . $this->project . '.json';
@@ -68,6 +74,11 @@
return $filename;
}
+ /**
+ * Gets the full path to the configuration file.
+ *
+ * @return string
+ */
public function loadConfiguration () {
$fileName = $this->getConfigurationFileName();
@@ -82,12 +93,15 @@
/// Qualification of the story
///
+ /**
+ * @return bool
+ */
public function isAdministrativeEvent () {
return false;
}
/**
- * Gets the group for a specific story
+ * Gets the group for a specific story.
*
* @return string the group, central part of the routing key
*/

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 27, 22:25 (8 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2316794
Default Alt Text
D441.id1070.diff (3 KB)

Event Timeline