for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ubiquity\utils\store;
/**
* Data storage for async platforms
*
* Ubiquity\core$Application
* This class is part of Ubiquity
* @author jc
* @version 1.0.0
*/
class ApplicationStorage {
* @var array
private static $datas;
* Put a value in storage at key position.
* @param string $key
* @param mixed $value
public static function put(string $key, $value){
$key
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public static function put(/** @scrutinizer ignore-unused */ string $key, $value){
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
self::$datas[$key=$value];
}
* Return a value by key.
* @param mixed $default
* @return mixed
public static function get(string $key,$default=null){
return self::$datas[$key]??$default;
* Return all keys in storage.
* @return array
public static function getAllKeys(){
return \array_keys(self::$datas);
* Return all datas in storage.
public static function getAll(){
return self::$datas;
* Check if a key exists or not.
* @return boolean
public static function exists(string $key){
return isset(self::$datas[$key]);
* Search for a given value and returns the first corresponding key if successful.
* @return string|boolean
public static function search($value){
return \array_search($value,self::$datas);
* Clear all values in storage.
public static function clear(){
self::$datas=[];
* Remove a value by key.
public static function remove(string $key){
unset(self::$datas[$key]);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.