Showing 174 of 174 total issues
Method receiveNotification
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function receiveNotification()
{
$ipnMessage = new \PayPal\IPN\PPIPNMessage('', PayPalConfig::getConfig());
if ( ! $ipnMessage->validate()) {
Method __construct
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
\BB\Validators\UserValidator $userForm,
\BB\Validators\UpdateSubscription $updateSubscriptionAdminForm,
\BB\Helpers\GoCardlessHelper $goCardless,
\BB\Helpers\UserImage $userImage,
\BB\Validators\UserDetails $userDetailsForm,
Method render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render($request, Exception $e)
{
if ($e instanceof FormValidationException) {
if ($request->wantsJson()) {
return \Response::json($e->getErrors(), 422);
Function store
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function store()
{
$s3 = AWS::get('s3');
$s3Bucket = 'buildbrighton-bbms';
- 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 validateData
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function validateData()
{
//Verify the keyfob, device key and action
//Validate the action
- 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 handle
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function handle()
{
$proposals = $this->proposalRepository->getUnprocessedFinishedProposals();
foreach ($proposals as $proposal) {
$this->info($proposal->title);
- 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 constructor
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor() {
//var jQuery = require('jquery');
var jQuery = global.jQuery;
Function constructor
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor() {
var $ = require('jquery');
Function render
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
var main = <p>Bought an item for Build Brighton, claim the money back here. If your planning on spending over £10
please confirm the purchase with a trustee first.</p>;
//Fetch a list of expenses filtered to the current user
Method up
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
Method index
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function index()
{
$sortBy = \Request::get('sortBy', 'created_at');
$direction = \Request::get('direction', 'desc');
$dateFilter = \Request::get('date_filter', '');
Function handleDevice
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function handleDevice($data)
{
$sessionId = null;
try {
$device = ACSNode::where('device_id', $data['device'])->firstOrFail();
- 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 billMembers
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function billMembers()
{
$subCharges = $this->subscriptionChargeRepository->getDue();
//Check each of the due charges, if they have previous attempted payments ignore them
Method store
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function store()
{
$input = \Input::only(
'given_name',
'family_name',
Method validateData
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function validateData()
{
//Verify the keyfob, device key and action
//Validate the action
Function handleSubmit
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleSubmit() {
var $ = require('jquery');
if (this.state.stripeLowValueWarning) {
Method store
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function store($userId)
{
User::findWithPermission($userId);
$requestData = \Request::only(['reason', 'amount', 'return_path', 'stripeToken', 'ref']);
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
var dropdownOptions = [
{key:'', value:''},
{key:'consumables', value:'Consumables'},
Function correctImageRotation
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function correctImageRotation($filePath)
{
$exif_data = @exif_read_data($filePath);
//Auto image rotation
- 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 up
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function up()
{
Schema::create('equipment', function(Blueprint $table)
{
$table->increments('id');