DriverFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A make() 0 7 2
1
<?php
2
	namespace Ako\Shorturl;
3
4
    use Ako\Shorturl\Drivers\LocalDriver;
5
6
    class DriverFactory
7
	{
8
		/**
9
		 * @param string $driver
10
		 *
11
		 * @return LocalDriver
12
		 */
13
		public function make (string $driver)
14
		{
15
			switch ($driver) {
16
				case "local":
17
					return new LocalDriver;
18
				default:
19
					return new LocalDriver;
20
			}
21
		}
22
	}