app/Integrations/Dav/Backend/Card.php
Class extends undeclared class \Sabre\CardDAV\backend\pdo
(Did you mean class \PDO) Open
Open
class Card extends CardDAV\Backend\PDO
- Exclude checks
Reference to undeclared property \App\Integrations\Dav\Backend\Card->pdo
Open
Open
$stmt = $this->pdo->prepare(sprintf('UPDATE vtiger_crmentity SET deleted = ? WHERE crmid IN (SELECT crmid FROM %s WHERE addressbookid = ? && uri = ?);', $this->cardsTableName));
- Exclude checks
Call to undeclared method \App\Integrations\Dav\Backend\Card::addChange
Open
Open
$this->addChange($addressBookId, $cardUri, 3);
- Exclude checks
Reference to undeclared property \App\Integrations\Dav\Backend\Card->pdo
Open
Open
$stmt = $this->pdo->prepare(sprintf('DELETE FROM %s WHERE addressbookid = ? && uri = ?', $this->cardsTableName));
- Exclude checks
Avoid excessively long variable names like $addressBooksTableName. Keep variable name length under 20. Open
Open
public $addressBooksTableName = 'dav_addressbooks';
- Read upRead up
- Exclude checks
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
Open
public $addressBookChangesTableName = 'dav_addressbookchanges';
- Read upRead up
- Exclude checks
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
Open
public $addressBooksTableName = 'dav_addressbooks';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $cardsTableName = 'dav_cards';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function deleteCard($addressBookId, $cardUri)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Deletes a card.
- Exclude checks
Line exceeds 120 characters; contains 185 characters Open
Open
$stmt = $this->pdo->prepare(sprintf('UPDATE vtiger_crmentity SET deleted = ? WHERE crmid IN (SELECT crmid FROM %s WHERE addressbookid = ? && uri = ?);', $this->cardsTableName));
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
Open
$stmt = $this->pdo->prepare(sprintf('DELETE FROM %s WHERE addressbookid = ? && uri = ?', $this->cardsTableName));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return 1 === $stmt->rowCount();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$stmt = $this->pdo->prepare(sprintf('DELETE FROM %s WHERE addressbookid = ? && uri = ?', $this->cardsTableName));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* The PDO table name used to store addressbooks.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* The PDO table name used to store cards.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return bool
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param mixed $addressBookId
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$stmt->execute([$addressBookId, $cardUri]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* The table name that will be used for tracking changes in address books.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$stmt->execute([1, $addressBookId, $cardUri]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$stmt = $this->pdo->prepare(sprintf('UPDATE vtiger_crmentity SET deleted = ? WHERE crmid IN (SELECT crmid FROM %s WHERE addressbookid = ? && uri = ?);', $this->cardsTableName));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->addChange($addressBookId, $cardUri, 3);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $addressBookChangesTableName = 'dav_addressbookchanges';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param string $cardUri
- Exclude checks