Skip to content
This repository has been archived by the owner on May 1, 2019. It is now read-only.

Commit

Permalink
Merge pull request #217 from localheinz/feature/phpmd
Browse files Browse the repository at this point in the history
Enhancement: Run phpmd on Travis
  • Loading branch information
GeeH committed Dec 13, 2014
2 parents 48372fc + 389551e commit 4225e50
Show file tree
Hide file tree
Showing 7 changed files with 244 additions and 13 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ install:

script:
- ./vendor/bin/phpcs --standard=./phpcs.xml -np --report=summary .
- ./vendor/bin/phpmd . text codesize,unusedcode --exclude data,puphpet,vendor
- ./vendor/bin/phpunit --configuration phpunit.xml

notifications:
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"socalnick/scn-social-auth": "1.14.1"
},
"require-dev": {
"phpmd/phpmd": "~2.1",
"phpunit/phpunit": "4.0.*",
"bjyoungblood/BjyProfiler": "1.1.0",
"squizlabs/php_codesniffer": "~2.0.0@RC",
Expand Down
230 changes: 229 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions module/User/src/User/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

class Module extends AbstractModule
{
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*
* @param ModuleManager $moduleManager
* @param ApplicationInterface $app
*/
public function bootstrap(ModuleManager $moduleManager, ApplicationInterface $app)
{
$em = $app->getEventManager()->getSharedManager();
Expand Down
8 changes: 2 additions & 6 deletions module/User/src/User/View/Helper/UserRepositories.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,9 @@ class UserRepositories extends AbstractHelper implements ServiceLocatorAwareInte
protected $events;

/**
* __invoke
*
* @access public
* @param array $options array of options
* @return string
* @return array
*/
public function __invoke($options = array())
public function __invoke()
{
$sl = $this->getServiceLocator();

Expand Down
3 changes: 3 additions & 0 deletions module/ZfModule/src/ZfModule/Mapper/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public function findByLike($query, $limit = null, $orderBy = null, $sort = 'ASC'
return $entity;
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
g */
public function findByOwner($owner, $limit = null, $orderBy = null, $sort = 'ASC')
{
$select = $this->getSelect();
Expand Down
8 changes: 2 additions & 6 deletions module/ZfModule/src/ZfModule/View/Helper/NewModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ public function __construct(Mapper\Module $moduleMapper)
}

/**
* __invoke
*
* @access public
* @param array $options array of options
* @return array Array of modules
* @return string
*/
public function __invoke($options = null)
public function __invoke()
{
$modules = $this->moduleMapper->findAll(10, 'created_at', 'DESC');

Expand Down

0 comments on commit 4225e50

Please sign in to comment.