@@ -7,36 +7,36 @@ |
||
| 7 | 7 | |
| 8 | 8 | class RouteServiceProvider extends ServiceProvider |
| 9 | 9 | { |
| 10 | - /** |
|
| 11 | - * This namespace is applied to the controller routes in your routes file. |
|
| 12 | - * |
|
| 13 | - * In addition, it is set as the URL generator's root namespace. |
|
| 14 | - * |
|
| 15 | - * @var string |
|
| 16 | - */ |
|
| 17 | - protected $namespace = 'PiFinder\Http\Controllers'; |
|
| 10 | + /** |
|
| 11 | + * This namespace is applied to the controller routes in your routes file. |
|
| 12 | + * |
|
| 13 | + * In addition, it is set as the URL generator's root namespace. |
|
| 14 | + * |
|
| 15 | + * @var string |
|
| 16 | + */ |
|
| 17 | + protected $namespace = 'PiFinder\Http\Controllers'; |
|
| 18 | 18 | |
| 19 | - /** |
|
| 20 | - * Define your route model bindings, pattern filters, etc. |
|
| 21 | - * |
|
| 22 | - * @param \Illuminate\Routing\Router $router |
|
| 23 | - */ |
|
| 24 | - public function boot(Router $router) |
|
| 25 | - { |
|
| 26 | - parent::boot($router); |
|
| 19 | + /** |
|
| 20 | + * Define your route model bindings, pattern filters, etc. |
|
| 21 | + * |
|
| 22 | + * @param \Illuminate\Routing\Router $router |
|
| 23 | + */ |
|
| 24 | + public function boot(Router $router) |
|
| 25 | + { |
|
| 26 | + parent::boot($router); |
|
| 27 | 27 | |
| 28 | - // |
|
| 29 | - } |
|
| 28 | + // |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * Define the routes for the application. |
|
| 33 | - * |
|
| 34 | - * @param \Illuminate\Routing\Router $router |
|
| 35 | - */ |
|
| 36 | - public function map(Router $router) |
|
| 37 | - { |
|
| 38 | - $router->group(['namespace' => $this->namespace], function ($router) { |
|
| 39 | - require app_path('Http/routes.php'); |
|
| 40 | - }); |
|
| 41 | - } |
|
| 31 | + /** |
|
| 32 | + * Define the routes for the application. |
|
| 33 | + * |
|
| 34 | + * @param \Illuminate\Routing\Router $router |
|
| 35 | + */ |
|
| 36 | + public function map(Router $router) |
|
| 37 | + { |
|
| 38 | + $router->group(['namespace' => $this->namespace], function ($router) { |
|
| 39 | + require app_path('Http/routes.php'); |
|
| 40 | + }); |
|
| 41 | + } |
|
| 42 | 42 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function map(Router $router) |
| 37 | 37 | { |
| 38 | - $router->group(['namespace' => $this->namespace], function ($router) { |
|
| 38 | + $router->group(['namespace' => $this->namespace], function($router) { |
|
| 39 | 39 | require app_path('Http/routes.php'); |
| 40 | 40 | }); |
| 41 | 41 | } |
@@ -6,32 +6,32 @@ |
||
| 6 | 6 | |
| 7 | 7 | class MarkdownParser |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Markdown parser instance. |
|
| 11 | - * |
|
| 12 | - * @var ParsedownExtra |
|
| 13 | - */ |
|
| 14 | - private $markdown; |
|
| 9 | + /** |
|
| 10 | + * Markdown parser instance. |
|
| 11 | + * |
|
| 12 | + * @var ParsedownExtra |
|
| 13 | + */ |
|
| 14 | + private $markdown; |
|
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * MarkdownParser constructor. |
|
| 18 | - * |
|
| 19 | - * @param ParsedownExtra $markdown |
|
| 20 | - */ |
|
| 21 | - public function __construct(ParsedownExtra $markdown) |
|
| 22 | - { |
|
| 23 | - $this->markdown = $markdown; |
|
| 24 | - } |
|
| 16 | + /** |
|
| 17 | + * MarkdownParser constructor. |
|
| 18 | + * |
|
| 19 | + * @param ParsedownExtra $markdown |
|
| 20 | + */ |
|
| 21 | + public function __construct(ParsedownExtra $markdown) |
|
| 22 | + { |
|
| 23 | + $this->markdown = $markdown; |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * Parse a markdown document. |
|
| 28 | - * |
|
| 29 | - * @param $path |
|
| 30 | - * |
|
| 31 | - * @return mixed|string |
|
| 32 | - */ |
|
| 33 | - public function parse($path) |
|
| 34 | - { |
|
| 35 | - return $this->markdown->text($path); |
|
| 36 | - } |
|
| 26 | + /** |
|
| 27 | + * Parse a markdown document. |
|
| 28 | + * |
|
| 29 | + * @param $path |
|
| 30 | + * |
|
| 31 | + * @return mixed|string |
|
| 32 | + */ |
|
| 33 | + public function parse($path) |
|
| 34 | + { |
|
| 35 | + return $this->markdown->text($path); |
|
| 36 | + } |
|
| 37 | 37 | } |
@@ -8,33 +8,33 @@ |
||
| 8 | 8 | |
| 9 | 9 | class Registrar implements RegistrarContract |
| 10 | 10 | { |
| 11 | - /** |
|
| 12 | - * Get a validator for an incoming registration request. |
|
| 13 | - * |
|
| 14 | - * @param array $data |
|
| 15 | - * |
|
| 16 | - * @return \Illuminate\Contracts\Validation\Validator |
|
| 17 | - */ |
|
| 18 | - public function validator(array $data) |
|
| 19 | - { |
|
| 20 | - return Validator::make($data, [ |
|
| 21 | - 'email' => 'required|email|max:255|unique:users', |
|
| 22 | - 'password' => 'required|confirmed|min:6', |
|
| 23 | - ]); |
|
| 24 | - } |
|
| 11 | + /** |
|
| 12 | + * Get a validator for an incoming registration request. |
|
| 13 | + * |
|
| 14 | + * @param array $data |
|
| 15 | + * |
|
| 16 | + * @return \Illuminate\Contracts\Validation\Validator |
|
| 17 | + */ |
|
| 18 | + public function validator(array $data) |
|
| 19 | + { |
|
| 20 | + return Validator::make($data, [ |
|
| 21 | + 'email' => 'required|email|max:255|unique:users', |
|
| 22 | + 'password' => 'required|confirmed|min:6', |
|
| 23 | + ]); |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * Create a new user instance after a valid registration. |
|
| 28 | - * |
|
| 29 | - * @param array $data |
|
| 30 | - * |
|
| 31 | - * @return User |
|
| 32 | - */ |
|
| 33 | - public function create(array $data) |
|
| 34 | - { |
|
| 35 | - return User::create([ |
|
| 36 | - 'email' => $data['email'], |
|
| 37 | - 'password' => bcrypt($data['password']), |
|
| 38 | - ]); |
|
| 39 | - } |
|
| 26 | + /** |
|
| 27 | + * Create a new user instance after a valid registration. |
|
| 28 | + * |
|
| 29 | + * @param array $data |
|
| 30 | + * |
|
| 31 | + * @return User |
|
| 32 | + */ |
|
| 33 | + public function create(array $data) |
|
| 34 | + { |
|
| 35 | + return User::create([ |
|
| 36 | + 'email' => $data['email'], |
|
| 37 | + 'password' => bcrypt($data['password']), |
|
| 38 | + ]); |
|
| 39 | + } |
|
| 40 | 40 | } |
@@ -4,16 +4,16 @@ |
||
| 4 | 4 | |
| 5 | 5 | class DeviceTransformer extends Transformer |
| 6 | 6 | { |
| 7 | - public function transform($device) |
|
| 8 | - { |
|
| 9 | - return [ |
|
| 10 | - 'ip' => $device['ip'], |
|
| 11 | - 'mac' => $device['mac'], |
|
| 12 | - 'name' => $device['name'], |
|
| 13 | - 'group' => $device['group'], |
|
| 14 | - 'on_home_page' => $device['public'], |
|
| 15 | - 'device_added' => $device['created_at']->toIso8601String(), |
|
| 16 | - 'last_contact' => $device['updated_at']->toIso8601String(), |
|
| 17 | - ]; |
|
| 18 | - } |
|
| 7 | + public function transform($device) |
|
| 8 | + { |
|
| 9 | + return [ |
|
| 10 | + 'ip' => $device['ip'], |
|
| 11 | + 'mac' => $device['mac'], |
|
| 12 | + 'name' => $device['name'], |
|
| 13 | + 'group' => $device['group'], |
|
| 14 | + 'on_home_page' => $device['public'], |
|
| 15 | + 'device_added' => $device['created_at']->toIso8601String(), |
|
| 16 | + 'last_contact' => $device['updated_at']->toIso8601String(), |
|
| 17 | + ]; |
|
| 18 | + } |
|
| 19 | 19 | } |
@@ -4,17 +4,17 @@ |
||
| 4 | 4 | |
| 5 | 5 | abstract class Transformer |
| 6 | 6 | { |
| 7 | - /** |
|
| 8 | - * Transform a collection of items. |
|
| 9 | - * |
|
| 10 | - * @param array $items |
|
| 11 | - * |
|
| 12 | - * @return array |
|
| 13 | - */ |
|
| 14 | - public function transformCollection(array $items) |
|
| 15 | - { |
|
| 16 | - return array_map([$this, 'transform'], $items); |
|
| 17 | - } |
|
| 7 | + /** |
|
| 8 | + * Transform a collection of items. |
|
| 9 | + * |
|
| 10 | + * @param array $items |
|
| 11 | + * |
|
| 12 | + * @return array |
|
| 13 | + */ |
|
| 14 | + public function transformCollection(array $items) |
|
| 15 | + { |
|
| 16 | + return array_map([$this, 'transform'], $items); |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - abstract public function transform($item); |
|
| 19 | + abstract public function transform($item); |
|
| 20 | 20 | } |
@@ -10,26 +10,26 @@ |
||
| 10 | 10 | |
| 11 | 11 | class User extends Model implements AuthenticatableContract, CanResetPasswordContract |
| 12 | 12 | { |
| 13 | - use Authenticatable, CanResetPassword; |
|
| 13 | + use Authenticatable, CanResetPassword; |
|
| 14 | 14 | |
| 15 | - /** |
|
| 16 | - * The database table used by the model. |
|
| 17 | - * |
|
| 18 | - * @var string |
|
| 19 | - */ |
|
| 20 | - protected $table = 'users'; |
|
| 15 | + /** |
|
| 16 | + * The database table used by the model. |
|
| 17 | + * |
|
| 18 | + * @var string |
|
| 19 | + */ |
|
| 20 | + protected $table = 'users'; |
|
| 21 | 21 | |
| 22 | - /** |
|
| 23 | - * The attributes that are mass assignable. |
|
| 24 | - * |
|
| 25 | - * @var array |
|
| 26 | - */ |
|
| 27 | - protected $fillable = ['email', 'password']; |
|
| 22 | + /** |
|
| 23 | + * The attributes that are mass assignable. |
|
| 24 | + * |
|
| 25 | + * @var array |
|
| 26 | + */ |
|
| 27 | + protected $fillable = ['email', 'password']; |
|
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * The attributes excluded from the model's JSON form. |
|
| 31 | - * |
|
| 32 | - * @var array |
|
| 33 | - */ |
|
| 34 | - protected $hidden = ['password', 'remember_token']; |
|
| 29 | + /** |
|
| 30 | + * The attributes excluded from the model's JSON form. |
|
| 31 | + * |
|
| 32 | + * @var array |
|
| 33 | + */ |
|
| 34 | + protected $hidden = ['password', 'remember_token']; |
|
| 35 | 35 | } |
@@ -4,5 +4,5 @@ |
||
| 4 | 4 | |
| 5 | 5 | abstract class Event |
| 6 | 6 | { |
| 7 | - // |
|
| 7 | + // |
|
| 8 | 8 | } |