Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

CodeSniffer

  • Loading branch information...
commit 1d30a60d22beaa248216ee7af475ba26f408db51 1 parent 58322e0
Michael Babker authored
1  .gitignore
@@ -16,4 +16,5 @@ releases
16 16 .idea
17 17
18 18 # Build process #
  19 +build
19 20 build.properties
23 helper.php
... ... @@ -1,15 +1,22 @@
1 1 <?php
2 2 /**
3   -* GitHub Module for Joomla!
4   -*
5   -* @copyright Copyright (C) 2011 Michael Babker. All rights reserved.
6   -* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
7   -*/
  3 + * GitHub Module for Joomla!
  4 + *
  5 + * @package GitHubModule
  6 + *
  7 + * @copyright Copyright (C) 2011 Michael Babker. All rights reserved.
  8 + * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9 + */
8 10
9   -// No direct access
10 11 defined('_JEXEC') or die;
11 12
12   -class modGithubHelper
  13 +/**
  14 + * Helper class for the GitHub Module
  15 + *
  16 + * @package GitHubModule
  17 + * @since 1.0
  18 + */
  19 +class ModGithubHelper
13 20 {
14 21 /**
15 22 * Function to compile the data to render a formatted object
@@ -116,7 +123,7 @@ static function processData($obj, $params)
116 123 if ($i <= $count)
117 124 {
118 125 // Initialize a new object
119   - $github[$i]->commit = new stdClass();
  126 + $github[$i]->commit = new stdClass;
120 127
121 128 // The commit message linked to the commit
122 129 $github[$i]->commit->message = '<a href="https://github.com/'.$uname.'/'.$frepo.'/commit/'.$o['sha'].'" target="_blank" rel="nofollow">'.substr($o['sha'], 0, 7).'</a> - ';
22 mod_github.php
... ... @@ -1,12 +1,13 @@
1 1 <?php
2 2 /**
3   -* GitHub Module for Joomla!
4   -*
5   -* @copyright Copyright (C) 2011 Michael Babker. All rights reserved.
6   -* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
7   -*/
  3 + * GitHub Module for Joomla!
  4 + *
  5 + * @package GitHubModule
  6 + *
  7 + * @copyright Copyright (C) 2011 Michael Babker. All rights reserved.
  8 + * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9 + */
8 10
9   -// No direct access
10 11 defined('_JEXEC') or die;
11 12
12 13 // Check if cURL is loaded; if not, proceed no further
@@ -26,17 +27,12 @@
26 27 $options = array(
27 28 'defaultgroup' => 'mod_github');
28 29 $cache = JCache::getInstance('callback', $options);
29   - $cacheTime = $params->get('cache_time');
30   - // J! 1.5 and 1.6 cache is set in seconds, 1.7 caches in minutes
31   - if (version_compare(JVERSION,'1.7.0','ge'))
32   - {
33   - $cacheTime = round($cacheTime / 60);
34   - }
  30 + $cacheTime = round($cacheTime / 60);
35 31 $cache->setLifeTime($cacheTime);
36 32 $cache->setCaching(true);
37 33
38 34 // Call the cache; if expired, pull new data
39   - $github = $cache->call(array('modGithubHelper', 'compileData'), $params);
  35 + $github = $cache->call(array('ModGithubHelper', 'compileData'), $params);
40 36 }
41 37 else
42 38 {
13 tmpl/default.php
... ... @@ -1,12 +1,13 @@
1 1 <?php
2 2 /**
3   -* GitHub Module for Joomla!
4   -*
5   -* @copyright Copyright (C) 2011 Michael Babker. All rights reserved.
6   -* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
7   -*/
  3 + * GitHub Module for Joomla!
  4 + *
  5 + * @package GitHubModule
  6 + *
  7 + * @copyright Copyright (C) 2011 Michael Babker. All rights reserved.
  8 + * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9 + */
8 10
9   -// No direct access
10 11 defined('_JEXEC') or die;
11 12
12 13 // Variables for the foreach

0 comments on commit 1d30a60

Please sign in to comment.
Something went wrong with that request. Please try again.