src/Common/Service/FileCache/Driver.php
protected function newItem(string $sKey): Item
    {
        $oObj = (object) [
            'sKey'  => $sKey,
            'sPath' => $this->prepKey($sKey),
        ];

        //  When testing the Factory isn't available
        if (defined('PHPUNIT_NAILS_COMMON_TEST_SUITE')) {
            $oItem = new Item($oObj);
        } else {
            /** @var Item $oItem */
            $oItem = Factory::resource('FileCacheItem', null, $oObj);
        }

        return $oItem;
    }
protected function newItem(string $sKey): Item
    {
        $oObj = (object) [
            'sKey'  => $sKey,
            'sPath' => $this->prepKey($sKey),
        ];

        //  When testing the Factory isn't available
        if (defined('PHPUNIT_NAILS_COMMON_TEST_SUITE')) {
            $oItem = new Item($oObj);
        } else {
            /** @var Item $oItem */
            $oItem = Factory::resource('FileCacheItem', null, $oObj);
        }

        return $oItem;
    }
protected function newItem ( string $ sKey ) : Item { $ oObj = ( object ) [ 'sKey' => $ sKey , 'sPath' => $ this -> prepKey ( $ sKey ) , ] ; //  When testing the Factory isn't available if ( defined ( 'PHPUNIT_NAILS_COMMON_TEST_SUITE' ) ) { $ oItem = new Item ( $ oObj ) ; } else { /** @var Item $oItem */ $ oItem = Factory :: resource ( 'FileCacheItem' , null , $ oObj ) ; } return $ oItem ; }
Configures a new item object

@param string $sKey The item's key

@return Item
@throws FactoryException
Configures a new item object