This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FILE: /mnt/c/Users/l0gicgate/Dropbox/Software/github/Slim/Slim/App.php | |
------------------------------------------------------------------------------------------------------------------------------------------------- | |
FOUND 4 ERRORS AFFECTING 4 LINES | |
------------------------------------------------------------------------------------------------------------------------------------------------- | |
65 | ERROR | @var annotation of property \Slim\App::$settings does not specify type hint for its items. | |
78 | ERROR | @param annotation of method \Slim\App::__construct() does not specify type hint for items of its traversable parameter $settings. | |
140 | ERROR | @return annotation of method \Slim\App::getSettings() does not specify type hint for items of its traversable return value. | |
162 | ERROR | @param annotation of method \Slim\App::addSettings() does not specify type hint for items of its traversable parameter $settings. | |
--------------------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use DI\Container; | |
use DI\ContainerBuilder; | |
use Slim\App; | |
use Tuupola\JwtAuthentication; | |
$containerBuilder = new ContainerBuilder(); | |
$containerBuilder->addDefinitions([ | |
'JwtAuthenticationSettings' => [ | |
'secret' => getenv('jwt_secret'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Project\Services\Authentication; | |
// This file should reside in your project root's `src\Services` sub-directory | |
use Illuminate\Hashing\BcryptHasher; | |
use Psr\Log\LoggerInterface; | |
use Project\Repositories\UserRepository; | |
class AuthenticationService { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace Project\Actions; | |
use Psr\Http\Message\ResponseInterface; | |
use Psr\Http\Message\ServerRequestInterface; | |
/** | |
* Class Action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$app->add(function ($request, $response, $next) { | |
$detectedIp = $request->getAttribute('ip_address', null); | |
$trustedIps = ['1.1.1.1', '2.2.2.2']; | |
if (!$detectedIp || !in_array($detectedIp, $trustedIps)) { | |
return $response->withJson(['error' => 'Unauthorized ip address', 401]); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
networks: | |
load-balancer-network: | |
external: true | |
client-network: | |
name: client-network | |
services: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
type Foo interface { | |
methodA() string | |
} | |
type Bar struct { | |
Foo | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type IGenericType interface { | |
GetName() string | |
} | |
type GenericTypeRepository struct { | |
NativeType IGenericType | |
} | |
func (r *GenericTypeRepository) FindAll() (*[]IGenericType, error) { | |
var types []r.NativeType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String a(String arg12) { | |
byte[] v12; | |
if(c.a == 0) { | |
return "1"; | |
} | |
try { | |
f.a(b.a, "last report", Long.valueOf(Calendar.getInstance().getTimeInMillis())); | |
v12 = a.rb(b.a, arg12, null); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ss.sys.ces.d; | |
import android.content.Context; | |
import com.ss.sys.ces.utils.NetInterface; | |
import java.io.IOException; | |
import java.security.SecureRandom; | |
import java.security.cert.X509Certificate; | |
import java.util.concurrent.TimeUnit; | |
import javax.net.ssl.HostnameVerifier; | |
import javax.net.ssl.SSLContext; |