for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Models;
use Nette\Database\Context;
use Nette\Database\Table\ActiveRow;
class ProvinceModel extends BaseModel
{
/**
* @var string
*/
protected $table = 'kk_provinces';
* @param Context $database
public function __construct(Context $database)
$this->setDatabase($database);
}
* @return array
public function all(): array
$provinces = $this->getDatabase()
->table($this->getTable())
->select('id')
->select('province_name')
->where('deleted', '0')
->fetchAll();
array_walk($provinces, function(&$province, $key) {
$key
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$province = $province->province_name;
});
$provinces[0] = 'zvolte kraj';
return $provinces;
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.