for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Codexshaper\WooCommerce\Models;
use Codexshaper\WooCommerce\Facades\WooCommerce;
use Codexshaper\WooCommerce\Traits\QueryBuilderTrait;
class Setting extends BaseModel
{
use QueryBuilderTrait;
protected $endpoint = 'settings';
/**
* Retrieve option.
*
* @param int $group_id
* @param int $id
* @param array $options
* @return array
*/
protected function option($group_id, $id, $options = [])
$this->endpoint = "settings/{$group_id}";
return self::find($id, $options);
}
* Retrieve options.
protected function options($id, $options = [])
* Update Existing Item.
* @param array $data
* @return object
protected function update($group_id, $id, $data)
return self::update($id, $data);
update()
$data
This check looks for function calls that miss required arguments.
array
integer
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
* Batch Update.
protected function batch($id, $data)
$this->endpoint = "settings/{$id}";
return self::batch($data);
batch()
This check looks for function calls that miss required arguments.