| Total Complexity | 3 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class ShareController extends Controller |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Instance of the 'pull request checker'. |
||
| 12 | * |
||
| 13 | * @var PullRequestChecker |
||
| 14 | */ |
||
| 15 | protected $checker; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Instance of user model. |
||
| 19 | * |
||
| 20 | * @var User |
||
| 21 | */ |
||
| 22 | protected $user; |
||
| 23 | |||
| 24 | |||
| 25 | /** |
||
| 26 | * Create a new controller instance. |
||
| 27 | * |
||
| 28 | * @param PullRequestChecker $checker |
||
| 29 | */ |
||
| 30 | public function __construct(PullRequestChecker $checker, User $user) |
||
| 31 | { |
||
| 32 | $this->checker = $checker; |
||
| 33 | $this->user = $user; |
||
| 34 | $this->sharingMode = true; |
||
| 35 | |||
| 36 | parent::__construct(); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Display a user's PR status if user already authorized this app, |
||
| 41 | * otherwise redirect to home page. |
||
| 42 | * |
||
| 43 | * @param string $github_username |
||
| 44 | * |
||
| 45 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View |
||
| 46 | */ |
||
| 47 | public function index($github_username) |
||
| 61 | } |
||
| 62 | } |
||
| 63 |