for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace drupol\Yaroc\Examples;
use drupol\Yaroc\Plugin\Provider;
/**
* Class Dice.
*/
class Dice extends BaseExample
{
* @throws \Http\Client\Exception
*
* @return bool|mixed
array|false
This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.
array
* @SuppressWarnings(PHPMD.StaticAccess)
public function roll()
$generateIntegers = Provider::withResource('generateIntegers')
->withParameters(['n' => 2, 'min' => 1, 'max' => 6]);
return $this->getRandomOrgAPI()->getData($generateIntegers);
}
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.