|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Alister\Faker\Provider; |
|
4
|
|
|
|
|
5
|
|
|
use Faker\Provider\Base as FakerBase; |
|
6
|
|
|
|
|
7
|
|
|
class Skills extends FakerBase |
|
8
|
|
|
{ |
|
9
|
|
|
public static $skills = [ |
|
10
|
|
|
'agile', 'android', 'angular.js', 'apache', 'api', 'backbone.js', |
|
11
|
|
|
'bootstrap', 'less', 'scss', 'c#', 'c++', |
|
12
|
|
|
'cassandra', 'chef', 'ci', 'clojure', 'concurrency', 'css', |
|
13
|
|
|
'database', 'dba', 'developer', 'devops', 'django', 'drupal', |
|
14
|
|
|
'engineer', 'frontend', 'games', 'github', 'hadoop', 'hibernate', |
|
15
|
|
|
'html5', 'ios', 'java', 'javascript', 'lamp', 'linux', 'low-latency', |
|
16
|
|
|
'mobile', 'mongodb', 'mysql', 'nginx', 'node-js', 'nosql', |
|
17
|
|
|
'objective-c', 'php', 'postgresql', 'puppet', 'python', 'redis', |
|
18
|
|
|
'rest', 'ruby', 'ruby-on-rails', 'scala', 'scalability', 'scaling', |
|
19
|
|
|
'spring', 'sql-server', 'symfony', 'symfony2', 'sysadmin', 'systems', |
|
20
|
|
|
'tdd', 'telecomms', 'testing', 'tomcat', 'unix', 'ux', 'varnish', |
|
21
|
|
|
'wpf', 'xcode', 'zend', 'zf2', |
|
22
|
|
|
]; |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* Generate fake 'skills', from a list. |
|
26
|
|
|
* |
|
27
|
|
|
* @example 'zf2' or ['css', 'redis'] |
|
28
|
|
|
*/ |
|
29
|
|
|
public static function skills($qty = 1, $max = 0) |
|
30
|
|
|
{ |
|
31
|
|
|
if ($max > 0) { |
|
32
|
|
|
$qty = self::numberBetween($qty, $max); |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
return self::randomElements(self::$skills, $qty); |
|
36
|
|
|
} |
|
37
|
|
|
|
|
38
|
|
|
public function skillsString($qty = 1, $max = 0) |
|
39
|
|
|
{ |
|
40
|
|
|
return implode(',', $this->skills($qty, $max)); |
|
41
|
|
|
} |
|
42
|
|
|
} |
|
43
|
|
|
|