YetiForceCompany/YetiForceCRM

View on GitHub
app/Integrations/Dav/Backend/Card.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Class extends undeclared class \Sabre\CardDAV\backend\pdo (Did you mean class \PDO)
Open

class Card extends CardDAV\Backend\PDO
Severity: Critical
Found in app/Integrations/Dav/Backend/Card.php by phan

Reference to undeclared property \App\Integrations\Dav\Backend\Card->pdo
Open

        $stmt = $this->pdo->prepare(sprintf('UPDATE vtiger_crmentity SET deleted = ? WHERE crmid IN (SELECT crmid FROM %s WHERE addressbookid = ? && uri = ?);', $this->cardsTableName));
Severity: Minor
Found in app/Integrations/Dav/Backend/Card.php by phan

Call to undeclared method \App\Integrations\Dav\Backend\Card::addChange
Open

        $this->addChange($addressBookId, $cardUri, 3);
Severity: Critical
Found in app/Integrations/Dav/Backend/Card.php by phan

Reference to undeclared property \App\Integrations\Dav\Backend\Card->pdo
Open

        $stmt = $this->pdo->prepare(sprintf('DELETE FROM %s WHERE addressbookid = ? && uri = ?', $this->cardsTableName));
Severity: Minor
Found in app/Integrations/Dav/Backend/Card.php by phan

Avoid excessively long variable names like $addressBooksTableName. Keep variable name length under 20.
Open

    public $addressBooksTableName = 'dav_addressbooks';
Severity: Minor
Found in app/Integrations/Dav/Backend/Card.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Avoid excessively long variable names like $addressBookChangesTableName. Keep variable name length under 20.
Open

    public $addressBookChangesTableName = 'dav_addressbookchanges';
Severity: Minor
Found in app/Integrations/Dav/Backend/Card.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

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

    public $addressBooksTableName = 'dav_addressbooks';

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

     *

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

    public $cardsTableName = 'dav_cards';

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

    {

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

     * @var string

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

    /**

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

     */

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

    public function deleteCard($addressBookId, $cardUri)

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

     * @var string

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

     * Deletes a card.

Line exceeds 120 characters; contains 185 characters
Open

        $stmt = $this->pdo->prepare(sprintf('UPDATE vtiger_crmentity SET deleted = ? WHERE crmid IN (SELECT crmid FROM %s WHERE addressbookid = ? && uri = ?);', $this->cardsTableName));

Line exceeds 120 characters; contains 121 characters
Open

        $stmt = $this->pdo->prepare(sprintf('DELETE FROM %s WHERE addressbookid = ? && uri = ?', $this->cardsTableName));

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

        return 1 === $stmt->rowCount();

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

        $stmt = $this->pdo->prepare(sprintf('DELETE FROM %s WHERE addressbookid = ? && uri = ?', $this->cardsTableName));

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

     * The PDO table name used to store addressbooks.

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

     */

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

     */

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

    }

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

     * The PDO table name used to store cards.

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

     *

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

     * @return bool

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

    /**

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

     * @param mixed  $addressBookId

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

     *

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

        $stmt->execute([$addressBookId, $cardUri]);

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

     * The table name that will be used for tracking changes in address books.

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

        $stmt->execute([1, $addressBookId, $cardUri]);

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

    /**

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

        $stmt = $this->pdo->prepare(sprintf('UPDATE vtiger_crmentity SET deleted = ? WHERE crmid IN (SELECT crmid FROM %s WHERE addressbookid = ? && uri = ?);', $this->cardsTableName));

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

     *

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

     *

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

     * @var string

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

        $this->addChange($addressBookId, $cardUri, 3);

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

    /**

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

     */

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

    public $addressBookChangesTableName = 'dav_addressbookchanges';

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

     * @param string $cardUri

There are no issues that match your filters.

Category
Status