Showing 86 of 191 total issues
Method create
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create(Credentials $credentials, Status $status)
{
Logger::info("Begin", ['service' => 'DirectPreApproval']);
try {
$connection = new Connection\Data($credentials);
Method create
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create(Credentials $credentials, Discount $discount)
{
Logger::info("Begin", ['service' => 'DirectPreApproval']);
try {
$connection = new Connection\Data($credentials);
Method create
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create(Credentials $credentials, QueryNotification $queryNotification)
{
Logger::info("Begin", ['service' => 'DirectPreApproval']);
try {
$connection = new Connection\Data($credentials);
Method create
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create(Credentials $credentials, RetryPaymentOrder $retryPaymentOrder)
{
Logger::info("Begin", ['service' => 'DirectPreApproval']);
try {
$connection = new Connection\Data($credentials);
Method create
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create(Credentials $credentials, Cancel $cancel)
{
Logger::info("Begin", ['service' => 'DirectPreApproval']);
try {
$connection = new Connection\Data($credentials);
Function setParameter
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function setParameter($parameter)
{
if (is_array($parameter)) {
$arr = array();
foreach ($parameter as $key => $parameterItem) {
- 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 setItems
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function setItems($items)
{
if (is_array($items)) {
$arr = array();
foreach ($items as $key => $item) {
- 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 setMetadata
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function setMetadata($metadata)
{
if (is_array($metadata)) {
$arr = array();
foreach ($metadata as $key => $metadataItem) {
- 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 getData
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function getData(Requests $request)
{
$data = [];
if ($request->parameterLenght() > 0) {
- 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 getData
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function getData(Requests $request, $properties)
{
$data = [];
if (!is_null($request->acceptedPaymentMethods())) {
$accepted = $request->acceptedPaymentMethods();
- 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 setPaymentMethod
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function setPaymentMethod($paymentMethod)
{
if (is_array($paymentMethod)) {
$arr = array();
foreach ($paymentMethod as $key => $method) {
- 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
Method create
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create(Credentials $credentials, Accession $directPreApproval)
{
Logger::info("Begin", ['service' => 'DirectPreApproval']);
try {
$connection = new Connection\Data($credentials);
Method search
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function search(Credentials $credentials, $days)
{
Logger::info("Begin", ['service' => 'PreApproval.Search.Interval']);
try {
Method checkout
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function checkout(
Credentials $credentials,
\PagSeguro\Domains\Requests\DirectPayment\CreditCard $payment
)
{
Method create
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create(Credentials $credentials, $data)
{
Logger::info("Begin", ['service' => 'DirectPreApproval']);
try {
$connection = new Connection\Data($credentials);
Method create
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create(Credentials $credentials, Payment $payment)
{
Logger::info("Begin", ['service' => 'DirectPreApproval']);
try {
$connection = new Connection\Data($credentials);
Method create
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create(Credentials $credentials, \PagSeguro\Domains\Requests\Authorization $authorization)
{
Logger::info("Begin", ['service' => 'Authorization']);
try {
$connection = new Connection\Data($credentials);
Method search
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function search(
Credentials $credentials,
array $options
)
{
Method create
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create(Credentials $credentials, PreApproval $preApproval)
{
Logger::info("Begin", ['service' => 'PreApproval']);
try {
$connection = new Connection\Data($credentials);
Method create
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create(Credentials $credentials, Query $directPreApproval)
{
Logger::info("Begin", ['service' => 'DirectPreApproval']);
try {
$connection = new Connection\Data($credentials);