Skip to content

Commit

Permalink
make private methods protected instead (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmneun authored Mar 16, 2019
1 parent 92db465 commit 71435d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Nono/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function run()
* @param array $params
* @throws \Exception
*/
private function call($action, $params)
protected function call($action, $params)
{
if ($action instanceof \Closure) {
$action(...$params);
Expand All @@ -162,7 +162,7 @@ private function call($action, $params)
*
* @param \Exception $e
*/
private function handleException(\Exception $e)
protected function handleException(\Exception $e)
{
echo $e->getMessage();
}
Expand Down
8 changes: 4 additions & 4 deletions src/Nono/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function route($verb, $uri)
* @var string $verb
* @return array
*/
private function routes($verb)
protected function routes($verb)
{
return isset($this->routes[$verb]) ? $this->routes[$verb] : [];
}
Expand All @@ -83,7 +83,7 @@ private function routes($verb)
* @param array $routes
* @return array
*/
private function match($uri, $routes)
protected function match($uri, $routes)
{
if (!preg_match($this->combine($routes), $uri, $m)) {
return [];
Expand All @@ -105,7 +105,7 @@ private function match($uri, $routes)
* @var string $str
* @return string
*/
private function pattern($str)
protected function pattern($str)
{
return preg_replace('~\{([a-zA-Z0-9]+)\}~', '([^/]+)', $str);
}
Expand All @@ -119,7 +119,7 @@ private function pattern($str)
* @var array $routes
* @return string
*/
private function combine($routes)
protected function combine($routes)
{
$str = $mark = '';
foreach ($routes as $id => $data) {
Expand Down

0 comments on commit 71435d1

Please sign in to comment.