Skip to content

Commit

Permalink
Add use function for micro performance optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed Jul 31, 2023
1 parent 556ceaf commit f1a8a59
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Action.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
<?php

namespace Teto\Routing;

use function array_diff;
use function array_fill_keys;
use function array_filter;
use function array_keys;
use function array_values;
use function count;
use function explode;
use function in_array;
use function preg_match;
use function strlen;
use function strpos;
use function substr;

/**
* Action object
*
Expand Down
5 changes: 5 additions & 0 deletions src/CommonPrefixTrieRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

namespace Teto\Routing;

use function ord;
use function strlen;
use function substr;
use function sprintf;

/**
* 共通接頭辞木構造を連想配列で実装したRouter
*
Expand Down
9 changes: 9 additions & 0 deletions src/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

namespace Teto\Routing;

use function array_filter;
use function array_shift;
use function array_values;
use function count;
use function explode;
use function implode;
use function is_numeric;
use function strpos;

/**
* Router
*
Expand Down

0 comments on commit f1a8a59

Please sign in to comment.