DriverFactory::make()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 1
dl 0
loc 7
rs 10
c 0
b 0
f 0
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
	}