Showing 19 of 63 total issues
Method setup
has 401 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setup()
{
return $this->_setupContainer(
$this->_loadPhpConfigFile(RC_WP_BOOKINGS_CQRS_MODULE_CONFIG_FILE),
[
File WpBookingsCqrsModule.php
has 456 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace RebelCode\Storage\Resource\WordPress\Module;
use Dhii\Config\ConfigFactoryInterface;
File ResourcesEntityManager.php
has 311 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace RebelCode\Storage\Resource\WordPress;
use ArrayAccess;
ResourcesEntityManager
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class ResourcesEntityManager extends BaseCqrsEntityManager
{
/* @since [*next-version*] */
use ContainerGetPathCapableTrait;
Method _updateSessionRules
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function _updateSessionRules($id, $data)
{
$b = $this->exprBuilder;
try {
Method __construct
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
SelectCapableInterface $selectRm,
InsertCapableInterface $insertRm,
UpdateCapableInterface $updateRm,
DeleteCapableInterface $deleteRm,
SelectCapableInterface $rulesSelectRm,
Method _processSessionRuleData
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function _processSessionRuleData($resourceId, $ruleData, $serviceTz)
{
$allDay = $this->_containerGet($ruleData, 'isAllDay');
// Parse the service timezone name into a timezone object
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
wpdb $wpdb,
TemplateInterface $expressionTemplate,
MapFactoryInterface $factory,
$tables,
$fieldColumnMap,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
wpdb $wpdb,
TemplateInterface $template,
MapFactoryInterface $mapFactory,
$tables,
$fieldColumnMap,
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
SelectCapableInterface $selectRm,
InsertCapableInterface $insertRm,
UpdateCapableInterface $updateRm,
DeleteCapableInterface $deleteRm,
InsertCapableInterface $bkResourcesInsertRm,
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
wpdb $wpdb,
TemplateInterface $expressionTemplate,
MapFactoryInterface $factory,
$tables,
$fieldColumnMap,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
wpdb $wpdb,
TemplateInterface $expressionTemplate,
MapFactoryInterface $mapFactory,
$tables,
$fieldColumnMap,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$key,
$dependencies,
ConfigFactoryInterface $configFactory,
ContainerFactoryInterface $containerFactory,
ContainerFactoryInterface $compContainerFactory,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
SelectCapableInterface $selectRm,
InsertCapableInterface $insertRm,
UpdateCapableInterface $updateRm,
DeleteCapableInterface $deleteRm,
FactoryInterface $orderFactory,
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct(Migrator $migrator, $targetVersion, $currentVersion, $eventManager, $eventFactory)
Method query
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function query($query = [], $limit = null, $offset = null, $orderBy = null, $desc = false)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$mysqli,
$migrationsDir,
$dbVersion,
TemplateFactoryInterface $templateFactory,
$placeholderValues
Function _updateSessionRules
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function _updateSessionRules($id, $data)
{
$b = $this->exprBuilder;
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _normalizeSqlFieldColumnMap
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function _normalizeSqlFieldColumnMap($map)
{
$newMap = [];
$expBuilder = $this->_getExprBuilder();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"