Backoffice/Event/SiteCommandEvent.php
Return type of getIo()
is undeclared type \Symfony\Component\Console\Style\SymfonyStyle
Open
Open
public function getIo()
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \Symfony\Component\EventDispatcher\Event
Open
Open
class SiteCommandEvent extends Event
- Create a ticketCreate a ticket
- Exclude checks
Parameter $io
has undeclared type \Symfony\Component\Console\Style\SymfonyStyle
Open
Open
public function __construct(SiteInterface $site, SymfonyStyle $io)
- Create a ticketCreate a ticket
- Exclude checks
Parameter $site
has undeclared type \OpenOrchestra\ModelInterface\Model\SiteInterface
Open
Open
public function __construct(SiteInterface $site, SymfonyStyle $io)
- Create a ticketCreate a ticket
- Exclude checks
Return type of getSite()
is undeclared type \OpenOrchestra\ModelInterface\Model\SiteInterface
Open
Open
public function getSite()
- Create a ticketCreate a ticket
- Exclude checks
Avoid variables with short names like $io. Configured minimum length is 3. Open
Open
protected $io;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $io. Configured minimum length is 3. Open
Open
public function __construct(SiteInterface $site, SymfonyStyle $io)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}