for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace KriKrixs\object\user;
class UserStatsDifficulties
{
private object $diff;
/**
* Create a new UserStatsDifficulties object
* @param object $diff
*/
public function __construct(object $diff)
$this->diff = $diff;
}
* Return raw data
* @return object
public function toJson(): object
return $this->diff;
* Return array data
* @return array
public function toArray(): array
return json_decode($this->diff, true);
$this->diff
object
string
$json
json_decode()
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
ignore-type
return json_decode(/** @scrutinizer ignore-type */ $this->diff, true);
* Get user stats difficulties total
* @return int
public function getTotal(): int
return $this->diff->total;
* Get user stats difficulties easy number
public function getEasyNumber(): int
return $this->diff->easy;
* Get user stats difficulties normal number
public function getNormalNumber(): int
return $this->diff->normal;
* Get user stats difficulties hard number
public function getHardNumber(): int
return $this->diff->hard;
* Get user stats difficulties expert number
public function getExpertNumber(): int
return $this->diff->expert;
* Get user stats difficulties expert+ number
public function getExpertPlusNumber(): int
return $this->diff->expertPlus;