fucongcong/framework

View on GitHub
core/Group/Services/Service.php

Summary

Maintainability
A
1 hr
Test Coverage

Showing 10 of 10 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

public function createService($serviceName)
{
list($group, $serviceName) = explode(":", $serviceName);
// return \Rpc::service("{$group}:{$serviceName}");
$class = $serviceName."ServiceImpl";
Severity: Minor
Found in core/Group/Services/Service.php and 1 other location - About 30 mins to fix
core/Group/Services/Service.php on lines 9..18

Similar blocks of code found in 2 locations. Consider refactoring.
Open

public function createDao($serviceName)
{
list($group, $serviceName) = explode(":", $serviceName);
$class = $serviceName."DaoImpl";
$serviceName = "src\\Dao\\".$group."\\Impl\\".$class;
Severity: Minor
Found in core/Group/Services/Service.php and 1 other location - About 30 mins to fix
core/Group/Services/Service.php on lines 21..31

Expected 1 space after FUNCTION keyword; 0 found
Open

return app()->singleton($serviceName, function() use ($serviceName) {

Expected 1 space after FUNCTION keyword; 0 found
Open

return app()->singleton($serviceName, function() use ($serviceName) {

Spaces must be used to indent lines; tabs are not allowed
Open

list($group, $serviceName) = explode(":", $serviceName);

Spaces must be used to indent lines; tabs are not allowed
Open

$serviceName = "src\\Dao\\".$group."\\Impl\\".$class;

Spaces must be used to indent lines; tabs are not allowed
Open

public function createDao($serviceName)

Spaces must be used to indent lines; tabs are not allowed
Open

{

Spaces must be used to indent lines; tabs are not allowed
Open

$class = $serviceName."DaoImpl";

Spaces must be used to indent lines; tabs are not allowed
Open

}
Category
Status