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

Enhancement: Run phpmd on Travis #217

Merged
merged 5 commits into from
Dec 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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