Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
tipuloidea
/
back
/
vendor
/
spatie
/
php-structure-discoverer
/
src
/
Data
:
Usage.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Spatie\StructureDiscoverer\Data; class Usage { public function __construct( public string $fcqn, public ?string $name = null, ) { $this->name ??= $this->resolveNonFcqnName($this->fcqn); } public function resolveNonFcqnName(string $fcqn): string { $position = strrpos($fcqn, '\\'); if ($position === false) { return $fcqn; } return substr($fcqn, $position + strlen('\\')); } }