for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of product_management
* User: Sinan TURGUT <[email protected]>
* Date: 24.06.2019
* php version 7.2
*
* @category Assessment
* @package ProductManagement
* @author Sinan TURGUT <[email protected]>
* @license See LICENSE file
* @link https://dev.sinanturgut.com.tr
*/
namespace App\Model;
use Exception;
use App\Core;
* Class Product
* @package App\Model
class Product extends Core\Model
{
* @return |null
|null
0
public static function getInstance()
$Rec = new Product();
$Rec
return null;
}
* @param int $start
* @return Product
public function listProducts($start = 0)
$start
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function listProducts(/** @scrutinizer ignore-unused */ $start = 0)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return($this->query("select p.*,u.user_name from posts p join users u on p.user_id=u.id order by p.post_date_created desc"));
* @param $productName
* @param $productCategory
* @param $productSummary
* @param $productPrice
public function addProduct($productName, $productCategory, $productSummary, $productPrice)
$productSummary
public function addProduct($productName, $productCategory, /** @scrutinizer ignore-unused */ $productSummary, $productPrice)
$productName
public function addProduct(/** @scrutinizer ignore-unused */ $productName, $productCategory, $productSummary, $productPrice)
$productCategory
public function addProduct($productName, /** @scrutinizer ignore-unused */ $productCategory, $productSummary, $productPrice)
$productPrice
public function addProduct($productName, $productCategory, $productSummary, /** @scrutinizer ignore-unused */ $productPrice)
return $this->query("INSERT INTO post_titles(post_id,post_title,post_slug)".
" values (".$this->clearSQLParam($id).",'".$this->clearSQLParam($title)."','".$this->clearSQLParam($slug)."')");