PHP Classes

File: src/Functions/box.php

Recommend this page to a friend!
  Classes of Axel Pardemann  >  PHP Optional Chaining  >  src/Functions/box.php  >  Download  
File: src/Functions/box.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Optional Chaining
Chain class function calls preventing errors
Author: By
Last change: Update of src/Functions/box.php
Date: 2 years ago
Size: 369 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

namespace
NorseBlue\Optionals\Functions;

use
NorseBlue\Optionals\SchroedingerBox;

/**
 * Create a new SchroedingerBox object.
 *
 * @param mixed $cat
 * @param null $default
 *
 * @return \NorseBlue\Optionals\SchroedingerBox
 */
function box($cat, $default = null): SchroedingerBox
{
    return new
SchroedingerBox($cat, $default);
}

For more information send a message to info at phpclasses dot org.