for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Psi\Component\Grid\Metadata;
use Psi\Component\Grid\Metadata\SourceMetadata;
use Psi\Component\Grid\Metadata\ViewMetadata;
final class ColumnMetadata
{
private $name;
private $type;
private $options = [];
public function __construct(
string $name,
$name
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
SourceMetadata $source,
ViewMetadata $view
) {
$this->source = $source;
source
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
$this->view = $view;
view
}
public function getName(): string
return $this->name;
public function getSource(): SourceMetadata
return $this->source;
public function getView(): ViewMetadata
return $this->view;
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.