for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Config getting as types
* User: moyo
* Date: 2018/8/13
* Time: 11:44 AM
*/
namespace Carno\Config\Chips;
trait Types
{
* @param string $key
* @return int
public function int(string $key) : int
return (int) $this->get($key);
get()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return (int) $this->/** @scrutinizer ignore-call */ get($key);
}
* @return bool
public function bool(string $key) : bool
return filter_var($this->get($key), FILTER_VALIDATE_BOOLEAN);
* @return string
public function string(string $key) : string
return (string) $this->get($key);