for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Bedard\Shop\Models;
use Model;
/**
* DriverConfig Model.
*/
class DriverConfig extends Model
{
use \October\Rain\Database\Traits\Encryptable;
* @var string The database table used by the model.
public $table = 'bedard_shop_driver_configs';
* @var array Default attributes
public $attributes = [
'config' => '',
];
* @var array Encrypted fields
protected $encryptable = [
'config',
* @var array Fillable fields
protected $fillable = [
'class',
* @var array Guarded fields
protected $guarded = ['*'];
* @var array Jsonable fields
protected $jsonable = [
* Get the model's config array.
*
* @return array
public function getConfig()
$config = $this->config ?: [];
return is_string($config) ? json_decode($config, true) : $config;
}
* Populate attriutes based on config so a form can be rendered.
* @param string $class
$class
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
* @return void
public function populate()
$config = $this->getConfig();
foreach ($config as $key => $value) {
$this->$key = $value;
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.