blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 116 | path stringlengths 2 241 | src_encoding stringclasses 31
values | length_bytes int64 14 3.6M | score float64 2.52 5.13 | int_score int64 3 5 | detected_licenses listlengths 0 41 | license_type stringclasses 2
values | text stringlengths 14 3.57M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
0f19ec0050da0f48d4d68686064a4bcdbccbc2c1 | PHP | MichaelKling/fecEventScript | /src/protected/models/ServerInfo.php | UTF-8 | 3,290 | 2.625 | 3 | [] | no_license | <?php
/**
* This is the model class for table "serverinfo".
*
* The followings are the available columns in table 'serverinfo':
* @property integer $id
* @property string $date
* @property integer $server_id
*
* The followings are the available model relations:
* @property Playeractiveitem[] $playeractiveitem... | true |
d385c36adae44fe9580505b127a3031e9ec3b441 | PHP | dave1010/php-fig-psr-8 | /src/Huggable.php | UTF-8 | 564 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
namespace Psr\Hug;
/**
* Defines a huggable object.
*
* A huggable object expresses mutual affection with another huggable object.
*/
interface Huggable
{
/**
* Hugs this object.
*
* All hugs are mutual. An object that is hugged MUST in turn hug the other
* object back by calling hu... | true |
2da65d30580b11949ba2a50a70806d201b9b9e7e | PHP | ShreeyaRamkissoon/WebProject | /includes/addReviews.php | UTF-8 | 2,387 | 2.734375 | 3 | [] | no_license | <?php
//echo "Inside Ajax";
if(isset($_POST)){
$prod_ID = $_POST['product_id'];
$comment = $_POST['comment'];
$comment = filter_var($comment, FILTER_SANITIZE_STRING); //Remove any codes that may harm Database
$custID = $_POST['cust_id'];
$rating = $_POST['rating'];
... | true |
b5c8332fa08d31b428b279a75e99f00dd6cbc392 | PHP | febriaerliana/Floruna | /vendor/krlove/eloquent-model-generator/src/Processor/ProcessorInterface.php | UTF-8 | 524 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Krlove\EloquentModelGenerator\Processor;
use Krlove\EloquentModelGenerator\Config;
use Krlove\EloquentModelGenerator\Model\EloquentModel;
/**
* Interface ProcessorInterface
* @package Krlove\EloquentModelGenerator\Processor
*/
interface ProcessorInterface
{
/**
* @param Eloq... | true |
f03b84ad1a9e8fffc20da4c236359834a757cee3 | PHP | elyasmini/MenuBundle | /Voter/UriPrefixVoter.php | UTF-8 | 1,410 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Symfony\Cmf\Bundle\MenuBundle\Voter;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Route;
use Knp\Menu\ItemInterface;
/**
* This voter checks if the content option is a Symfony Route instance and if
* so compares its option "currentUriPrefix" with the request path. Thi... | true |
c5abdfe9137c14eeedc44af85f2e502ea334d73b | PHP | kemenydani/spa-dev | /app/models/Image.php | UTF-8 | 428 | 2.59375 | 3 | [] | no_license | <?php
namespace models;
use core\Model as Model;
abstract class Image extends Model implements ImageInterface
{
public function getId()
{
return $this->getProperty('id');
}
public function getFolder()
{
return $this->getProperty('folder');
}
public function getFileName()... | true |
2a79f2acd393dc23a98e7a9e1fc653be9eb8d7d5 | PHP | matheuscastroweb/ci4-template-view | /Libraries/Template.php | UTF-8 | 1,497 | 2.984375 | 3 | [] | no_license | <?php
namespace App\Libraries;
/**
* Name: ci4-template-view
*
* Created: 06.03.2020
*
* Description:
*
* Original Author: Not found
*
* Requirements: PHP7.2 or above
*
* @package ci4-template-view
* @author Matheus Castro <matheuscastroweb@gmail.com>
* @link http://github.com/benedmun... | true |
d3fab5ba50ff5525aab8183be24319ab58d60e8e | PHP | antonamosov/tourism-submission | /app/Http/Requests/Api/ClientStoreRequest.php | UTF-8 | 1,672 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests\Api;
use Illuminate\Foundation\Http\FormRequest;
class ClientStoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
... | true |
576ccdd3a9830ad9c0ba34ebececef159d38604a | PHP | Vicimus/Support | /tests/Unit/Classes/ConquestBudgetTest.php | UTF-8 | 566 | 2.6875 | 3 | [] | no_license | <?php declare(strict_types = 1);
namespace Vicimus\Support\Tests\Unit\Classes;
use PHPUnit\Framework\TestCase;
use Vicimus\Support\Classes\ConquestBudget;
/**
* Class ConquestBudgetTest
*/
class ConquestBudgetTest extends TestCase
{
/**
* Conquest budget
*
* @return void
*/
public funct... | true |
0b5add89c4ee6585c3d6435b0618a3111c9487fd | PHP | antonydevanchi/LDAP | /src/FreeDSx/Ldap/Protocol/ClientProtocolHandler.php | UTF-8 | 3,937 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the FreeDSx LDAP package.
*
* (c) Chad Sikorra <Chad.Sikorra@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FreeDSx\Ldap\Protocol;
use FreeDSx\Ldap\Control\Control;
use FreeD... | true |
d0e8af55076caaa3ad47b94d68fe27abdc5d97bf | PHP | beelibrary820145/tanxiongfeng | /Beethink/Common/Model/PasswordModel.class.php | UTF-8 | 1,035 | 3.296875 | 3 | [] | no_license | <?php
/**
* 密码 强度检查
*/
class PasswordModel
{
public function checkPsd($psd)
{
return $this->checkLevel($psd);
}
/**
* 判断当前字符类型
*/
private function charMode($code)
{
if($code>=48 && $code<=57) //数字
{
return 1;
}
if($code>=65 && $code<=90) //大写字母
{
return 2;
}... | true |
c533592a75de728ee88bcc10bebbe4153526f747 | PHP | StevemRico/CasodeEstudio3 | /class/successmessages.php | UTF-8 | 637 | 3.03125 | 3 | [] | no_license | <?php
class SuccessMessages{
const SUCCESS_PRUEBA = "1";
const SUCCESS_SIGNUP_NEWUSER = "2";
private $successList = [];
public function __construct(){
$this->successList = [
SuccessMessages::SUCCESS_PRUEBA => 'Success Prueba',
SuccessMessages::SUCCESS_S... | true |
30f3e985af69798b07dfe4f1ac41b44b0946a91d | PHP | michal-kusy/test | /src/App/Factory/ClientEntityFactory.php | UTF-8 | 920 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Factory;
use App\Entity\ClientEntity;
use App\Util\Assert;
use App\Util\AssertInterface;
use DateTimeImmutable;
class ClientEntityFactory implements ClientEntityFactoryInterface
{
/** @var AssertInterface */
private $assert;
public function __construct(AssertInterface $assert)
... | true |
2163818dbf9e5c34371494d53932e1d621bd2b02 | PHP | radenfebri/Laravel-Flutter | /app/Http/Controllers/CommentController.php | UTF-8 | 2,406 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Comment;
use App\Models\Post;
use Illuminate\Http\Request;
class CommentController extends Controller
{
//get all comments a post
public function index($id)
{
$post = Post::find($id);
if(!$post)
{
return response([
... | true |
309e8f02b218cc7607aafe1ca8c45f64295d8c67 | PHP | bydls/lumen7 | /app/Models/ApiRole.php | UTF-8 | 488 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property boolean $status
* @property string $title
* @property int $addtime
* @property string $last_update_time
*/
class ApiRole extends Model
{
/**
* The table associated with the model.
*
* @va... | true |
3263a5438e6543e1c78c4bf9b9f2cb571575ef7e | PHP | dotnetmario/PersonalFinance | /app/Http/Controllers/ExpencesController.php | UTF-8 | 2,442 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
// requests
use App\Http\Requests\Expence\GetExpencesRequest;
use App\Http\Requests\Expence\ManageExpencesRequest;
// models
use App\Expence;
use Illuminate\Support\Facades\Auth;
class ExpencesController extends Controller
{
/**
* manage expences (add/edit/delete)
... | true |
f61c68079ece327f07cd7c1e5846a0d5b8f3eb6a | PHP | wojciech-kowalik/drupal-modules | /visualnet_api/src/Request/AccountRequest.php | UTF-8 | 561 | 2.515625 | 3 | [] | no_license | <?php
namespace Drupal\visualnet_api\Request;
use Drupal\visualnet_api\VisualnetClient;
use Drupal\visualnet_api\VisualnetRequestInterface;
/**
* Class AccountRequest
*
* @package Drupal\visualnet_api\Request
* @access public
* @copyright visualnet.pl
*/
class AccountRequest implements VisualnetRequestInterfac... | true |
de53f146b7e2ac0715cf05ce3b8fa4489e74639a | PHP | 975L/PurchaseCreditsBundle | /Form/PurchaseCreditsFormFactory.php | UTF-8 | 1,837 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*
* (c) 2018: 975L <contact@975l.com>
* (c) 2018: Laurent Marquet <laurent.marquet@laposte.net>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace c975L\PurchaseCreditsBundle\Form;
use c975L\ConfigBundle\Service\ConfigServiceInterf... | true |
354b168a74befc5b51d0ff41235d0a8340bc9214 | PHP | starikov-kirill/guest-book | /application/libraries/User.php | UTF-8 | 1,818 | 2.6875 | 3 | [] | no_license | <?php if (!defined('BASEPATH')) exit('Нет доступа к скрипту');
class User {
/**
* resize and rename page
* @param url page
* @return page this naw name and size
*/
function upload_avatar() {
$config['upload_path'] = './'.URL_AVATAR;
$config['allowed_types'] = 'gif|jpg|png';
$config['... | true |
448cf431848886707e6890df71245f3022780b88 | PHP | cclites/CSSI | /app/Http/Middleware/ApiInputValidate.php | UTF-8 | 2,633 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
// Models
//use App\Models\Log;
use Log;
use Auth;
use Route;
use JWTAuth;
use Closure;
use App\Models\Type;
class ApiInputValidate{
//This translates the named version of the check into the proper
//numerical code. All eyeforsecurity API checks run through here.
public fun... | true |
23e7e7dc717c07118189c428b943a180014378ae | PHP | HCC-Coder-Bootcamp/php103 | /weipin/homework/smallest-number.php | UTF-8 | 1,002 | 3.40625 | 3 | [] | no_license | <?php
$input1 = readline("Number1:" . PHP_EOL);
$input2 = readline("Number2:" . PHP_EOL);
$input3 = readline("Number3:" . PHP_EOL);
$input4 = readline("Number4:" . PHP_EOL);
$input5 = readline("Number5:" . PHP_EOL);
if ( $input1 < $input2 && $input1 < $input3 && $input1 < $input4 && $input1 < $input5 ) {
ec... | true |
c1452fec3d5f619dee28374bfb5d278d7914eb96 | PHP | emanuelcorrea/menuzes | /app/Models/Section.php | UTF-8 | 896 | 2.75 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Section extends Model
{
use HasFactory;
/**
* The model's default values for attributes.
*
* @var array
*/
protected $attributes = [
'name' => fals... | true |
11b8216091945b02feead75e4a8502219ec0f82a | PHP | jonbrobinson/eventgator | /src/Helpers/FbApiHelper.php | UTF-8 | 6,933 | 2.53125 | 3 | [] | no_license | <?php
namespace EventGator\Helpers;
use EventGator\Handlers\EventFormatterAbstractClass;
use GuzzleHttp\Client as Guzzle;
class FbApiHelper extends EventFormatterAbstractClass
{
const FB_BASE_URL = 'https://graph.facebook.com';
const DEFAULT_GRAPH_VERSION = 'v2.6';
protected $fb;
protected $guzzleH... | true |
60ed56f4b35a18c5a449e611a00015d54981f79f | PHP | mvrush/htdocs | /phpmotors/model/reviews-model.php | UTF-8 | 4,186 | 3.25 | 3 | [] | no_license | <?php
//PHP Motors Reviews Model
//insert a review
function insertReview($reviewText, $reviewDate, $invId, $clientId){
// Create a connection object using the phpmotors connection function
$db = phpmotorsConnect();
// The SQL statement
$sql = 'INSERT INTO reviews (reviewText, reviewDate, invId, clientI... | true |
14931d3ff42764d311f6aa22ad0978398cf91e47 | PHP | davidepatruno/php-basket | /database.php | UTF-8 | 561 | 2.875 | 3 | [] | no_license | <?php
include 'function.php';
$players = [];
for ($i = 0; $i < 10; $i++){
$randomnum = rand(0,20);
$perc_2shots = rand(0,90);
$perc_3shots = (100 - $perc_2shots - $randomnum);
$totshots = rand(1,150);
$players[] = [
'codice'=> randomcode(),
'puntitotali'=> intval(((($perc_3shots / 100)* $totshots) ... | true |
e480fadc3d3019a3aee987b9bd8541aa239fceeb | PHP | Michel-Magnier/projet_toto | /public/forgotpwd.php | UTF-8 | 3,216 | 2.796875 | 3 | [] | no_license | <?php
require_once __DIR__.'/../inc/config.php';
// code de public/forgotpwd.php
$id="";
$email="";
$messageErreur = "";
// Je verifie si je viens d'emplir le formulaire de forgotpwd
echo "Voici le POST :<br><pre>";
print_r($_POST);
echo "</pre>";
if (!empty($_POST)){
if($email = isset($_POST['saisieEmail'])){
... | true |
4945bea04bd1325921209ac09d507657d7e03c11 | PHP | lmaiacosta/avalyst-teste | /back-end/src/Validators/SelfValidation.php | UTF-8 | 5,244 | 2.78125 | 3 | [] | no_license | <?php
namespace Api\Validators;
abstract class SelfValidation
{
public $errors = [];
protected function validateData($data, $rules)
{
foreach ($rules as $key => $validator)
{
try
{
if (is_array($validator))
{
$val... | true |
bcc8b8df91fa100b1c7ac66d8b0453ba82ad8b84 | PHP | stratus-meridian/apigee-kickstart-drupal8-drops | /vendor/drush/drush/src/Commands/ValidatorsCommands.php | UTF-8 | 5,630 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Drush\Commands;
use Consolidation\AnnotatedCommand\AnnotationData;
use Consolidation\AnnotatedCommand\CommandError;
use Consolidation\AnnotatedCommand\CommandData;
use Drush\Utils\StringUtils;
use Symfony\Component\Console\Input\Input;
/*
* Common validation providers. Use them by adding an annotatio... | true |
5b3091f245e00acaa6e0942273822a4bf3d6d893 | PHP | NamelessCoder/notify | /Classes/Poller/AbstractPoller.php | UTF-8 | 1,777 | 2.6875 | 3 | [] | no_license | <?php
class Tx_Notify_Poller_AbstractPoller {
/**
* @var Tx_Extbase_Object_ObjectManagerInterface
*/
protected $objectManager;
/**
* @param Tx_Extbase_Object_ObjectManagerInterface $objectManager
* @return void
*/
public function injectObjectManager(Tx_Extbase_Object_ObjectManagerInterface $objectManage... | true |
a9759e7c082cfd8543ddc554081c7cfc3ec3e0a2 | PHP | fedbruno/SoftwareDevelopementII | /Project 2/sql.php | UTF-8 | 513 | 2.703125 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "fedbruno";
$password = "";
// Create connection
$conn = mysqli_connect($servername, $username, $password);
// Check connection
if (!$conn)
die("Connection failed: " . mysqli_connect_error());
if (mysqli_query($conn,"use Project2... | true |
2ec824dbae79cb89c879106794fb4e1d6293a571 | PHP | IrvingChur/cron-timer | /Kernel/Process/ProcessExecute.php | UTF-8 | 889 | 2.546875 | 3 | [] | no_license | <?php
namespace Kernel\Process;
use Application\ApplicationInterface;
use Dao\KernelDao\KernelDao;
use Model\Kernel\KernelModel;
class ProcessExecute
{
/**
* @describe 执行任务
* @param KernelModel $task 任务模型
* @return void
*/
public function handler(KernelModel $task)
{
$objKern... | true |
82956744884e6fe86f30675b7d02e4c554346c6b | PHP | splaa/lr-shop | /app/Http/Controllers/WebSelf/PostController.php | UTF-8 | 2,570 | 2.578125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Http\Controllers\WebSelf;
use App\Http\Controllers\Controller;
use App\Http\Requests\WebSelf\CreatePostRequest;
use App\RepositoryInterface\EloquentPostRepository;
use App\RepositoryInterface\PostRepositoryInterface;
use App\RepositoryInterface\PostRepositoryInterface as ... | true |
a9b0e3f9f0ef70644bded57d5d7c8bf08c6a51e7 | PHP | likemusic/mini-crm | /src/app/Menu/Main/Base/AccessResolver/ByEntityName.php | UTF-8 | 936 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Menu\Main\Base\AccessResolver;
use App\Common\User\IsCurrentUserCanAccess;
use App\Menu\Main\NotRoot\MenuEntityPermissionByEntityName;
class ByEntityName
{
use IsCurrentUserCanAccess;
/** @var MenuEntityPermissionByEntityName */
private $menuEntityPermissionByEntityName;
public ... | true |
a03541fcef301443b7bbe2051d6e6e95f4776f73 | PHP | iribarren/setlist-client | /src/Setlist.php | UTF-8 | 2,085 | 2.65625 | 3 | [] | no_license | <?php
namespace SetlistClient;
use SetlistClient\AbstractApi;
/**
* Description of Setlist
*
* @author airibarren
*/
class Setlist extends AbstractApi {
public function getById($id = '') {
if ($id == '') {
throw new Exception("No search parameters given\n");
}
$path = "s... | true |
cde6dc1b65373f3b85267c004713e0a5f0069fa0 | PHP | tehmeerali786/PHP-Basic-to-E-commerce | /loops.php | UTF-8 | 769 | 3.828125 | 4 | [] | no_license | <h2>
<?php
//while loop
$x = 1;
while($x <= 10) {
echo $x;
$x++;
}
echo "<br />";
$y = 5;
do {
echo $y;
$y++;
} while ($y<10);
echo "<br />";
// for loop
for ($x=0; $x <= 10; $x++) {
echo "Number is : " .$x. "<br />";
}
e... | true |
06fc5d035e46d663dede9a6ca8dc298a7864bdab | PHP | Lady01/sistema | /eletrodomesticos/Pagamento/visao/ajax.php | UTF-8 | 636 | 2.625 | 3 | [] | no_license | <?php
require('conexao.php');
switch( $_POST['op'] )
{
case 1:
$PRODUTO = $_POST['produto'];
$sql = "SELECT * FROM produto WHERE nome LIKE '%$PRODUTO%'";
$qry = mysql_query($sql);
while( $row = mysql_fetch_object($qry) )
{
echo "<a href='?addProduto= ". $row->id ."'>". $row->nome ."</a><br>";
... | true |
5fcb0b8445cb255fc2e5d9b50bef73b38b50c12d | PHP | Darvisechavarria09/supermercadoj1 | /eliminarUsuarios.php | UTF-8 | 458 | 2.734375 | 3 | [] | no_license | <?php
echo($_GET["id"]);
include("BaseDatos.php");
//1. Recibo el id que voy a eliminar por la URL(GET)
$idEliminar=($_GET["id"]);
//2. Crear el objeto de la clase Base Datos
$transaccion = new BaseDatos();
//3. Crear la consultaSQL para eliminar
$consultaSQL = "DELETE FROM usuarios... | true |
88f109f18d42048550fd1af19b974cf5d36f3df4 | PHP | ullum/perpusweb | /application/views/laporan/peminjaman_pdf.php | UTF-8 | 2,533 | 2.8125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
function tgl_indo($tanggal){
$bulan = array (
1 => 'Januari',
'Februari',
'Maret',
'April',
'Mei',
'Juni',
'Juli',
'Agustus',
'September',
'Oktober',
'November',
'Desember'
);
$pecahkan = explode('-', $tanggal);
// variabel pecahkan 0 = tanggal
// variabel pecahkan 1 = bulan
// v... | true |
b45f91331e2a4bfedc92d17b760304cccbf4089c | PHP | php-service-bus/telegram-bot-core | /src/Api/Method/Location/SendVenue.php | UTF-8 | 2,771 | 2.6875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* Telegram Bot API.
*
* @author Maksim Masiukevich <contacts@desperado.dev>
* @license MIT
* @license https://opensource.org/licenses/MIT
*/
declare(strict_types=0);
namespace ServiceBus\TelegramBot\Api\Method\Location;
use ServiceBus\TelegramBot\Api\Method\SendEntity;
use ServiceBus\TelegramBot\Ap... | true |
6067e3764e4c6f9a9c56ef6f723e79bf7e3c2fde | PHP | dmrado/aucsku | /rx.php | UTF-8 | 7,598 | 2.515625 | 3 | [] | no_license | <?php
session_start();
//подключаемся к базе данных если выражение isset вернет true
include_once('func.php');
$conn=mysqli_connect($server,$login,$password);
mysqli_query($conn, "SET NAMES UTF8");
mysqli_select_db($conn, $database);
if (isset($_POST['userlogin']) && isset($_POST['userpassword'])) {
$userlo... | true |
507e80debe4b001189e809b02e9fc4fb425d940e | PHP | sallaino/TPI | /project/src/php/router.php | UTF-8 | 5,686 | 2.875 | 3 | [] | no_license | <?php
/**
* Etml
* Author: sallaino
* Date: 24.05.2018
* Description: Where all the controller are routed
*/
session_start();
require('../php/controller/controllerManager.php');
try{
// verify if the parameter is set
if (isset($_GET['action'])) {
// Call the class controllerManager
$action = new controll... | true |
c145cd16f7fbf5dedf6f709c6cfba9994bcc0889 | PHP | Naho-Suzuki/mission | /mission_5-2.php | UTF-8 | 12,411 | 3.171875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang = "ja">
<head>
<meta charset = "UTF-8">
<title>mission_5_2</title>
</head>
<body>
<p><strong>好きな音楽は?</strong> アーティストでも曲名でも何でもOK!</p>
<?php
// DB接続設定
$dsn = 'mysql:dbname=データベース名;host=localhost';
... | true |
ec4bd3f8b1849b29aedbfceed51d3aed0ece942b | PHP | danrichards/larascrape | /src/Dan/Larascrape/Console/DomInspectCommand.php | UTF-8 | 3,700 | 2.890625 | 3 | [] | no_license | <?php
namespace Dan\Larascrape\Console;
use Dan\AiCrawler\Support\HtmlSourceDownloader;
use Illuminate\Console\Command;
use Dan\Core\Helpers\RegEx;
use Dan\AiCrawler\Support\AiCrawler;
use Dan\AiCrawler\Support\Source;
/**
* Test various utilities in the Symfony DomCrawler & Articrawl Extension
*
* @package AiCra... | true |
3b1be8ac58114c9d56dd9df8beeb5a46bd7cd8fe | PHP | isofarro-archive/php5-comments | /example-threaded.php | UTF-8 | 2,186 | 2.734375 | 3 | [] | no_license | <?php
require_once 'CommentManager.php';
require_once 'CommentStorage.php';
$comments = array(
array(
'article_id' => '1',
'user' => array(
'username' => 'joebloggs'
),
'body' => 'Hello World',
'created' => time()
),
array(
'article_id' => '1',
'user' => array(
'username' =... | true |
9ea652372da7796faaf139693ee5a24f46674257 | PHP | buzzingpixel/executive-ee | /src/executive/traits/TruthyTrait.php | UTF-8 | 560 | 3.078125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace buzzingpixel\executive\traits;
use function in_array;
use function is_string;
use function mb_strtolower;
trait TruthyTrait
{
public static $truthyValues = [
1,
'1',
'y',
true,
'yes',
'true',
];
/**
* Checks i... | true |
b61cc45c1ca7fbf3369ddc5b2f93835810c14480 | PHP | TursunboyevJahongir/LessonsForStudents | /PHP begin/data_types.php | UTF-8 | 606 | 3.328125 | 3 | [] | no_license | <?php
$var_one = 45; //integer
$var_two = true; //bool
$var_three = array(4,5,6); //array
$var_four = 15.5; //double
$var_five = NULL; //NULL
$var_six = "STRING"; // string
$var_seven = new DateTime(); //object
//echo gettype($var_one);
//echo gettype($var_two);
//echo gettype($var_three);
//echo gettype($var_four);
... | true |
379808969a91c9aacab22c6421628c3a60d5b941 | PHP | furaoing/edusoho | /vendor/codeages/biz-rate-limiter/migrations/20161130153312_biz_rate_limit.php | UTF-8 | 879 | 2.640625 | 3 | [] | no_license | <?php
use Phpmig\Migration\Migration;
class BizRateLimit extends Migration
{
/**
* Do the migration
*/
public function up()
{
$container = $this->getContainer();
$connection = $container['db'];
$connection->exec("
CREATE TABLE `ratelimit` (
... | true |
101b48a6f13f58a062eb5a30fd04817eb6f921f0 | PHP | dipsor/newprjx | /app/Users/Transformers/TeamsTransformer.php | UTF-8 | 769 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Users\Transformers;
use League\Fractal\TransformerAbstract;
use App\Users\Models\Team;
/**
* Class RoleTransformer
* @package App\Users\Transformers
*/
class TeamTransformer extends TransformerAbstract
{
/**
* @param Team $team
* @return array
*/
public function transfor... | true |
184f6f574ec79ad54eb729493a54ca1d9c0134f0 | PHP | lzmz3kj/spin-framework | /src/Core/ConnectionManagerInterface.php | UTF-8 | 1,007 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Spin\Core;
use \Spin\Database\PdoConnection;
use \Spin\Database\PdoConnectionInterface;
interface ConnectionManagerInterface
{
/**
* Find a connection based on name
*
* @param string $name Name of the connection (from Config)
* @return null | object
*/
f... | true |
c78b2bcebbc618f7a0b771f9ee03be38bdf23bbe | PHP | theoryuu/Arkademy | /4.php | UTF-8 | 936 | 2.578125 | 3 | [] | no_license | <?php
/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run an... | true |
0e059000be9f36477203e603be4a859ec8f70114 | PHP | sagnikmitra/codetigers | /forum.codetigers.org/vendor/vanilla/garden-container/tests/AbstractContainerTest.php | UTF-8 | 2,488 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-free-unknown",
"GPL-1.0-or-later",
"GPL-2.0-or-later",
"GPL-2.0-only"
] | permissive | <?php
/**
* @author Todd Burry <todd@vanillaforums.com>
* @copyright 2009-2017 Vanilla Forums Inc.
* @license MIT
*/
namespace Garden\Container\Tests;
use PHPUnit\Framework\TestCase;
abstract class AbstractContainerTest extends TestCase {
const DB = 'Garden\Container\Tests\Fixtures\Db';
const DB_INTERFA... | true |
8037f06a9aebcbe69c06db9ebe6c3fff221bf1ea | PHP | michail1523/homeworks | /17.php | UTF-8 | 178 | 2.796875 | 3 | [] | no_license | <?php
$a=78;
$b='78';
if($a==$b){
echo 'they are same';
}else{
echo 'they are not same';
}
/**
* Created by PhpStorm.
* User: New
* Date: 08.02.2016
* Time: 15:39
*/ | true |
23e675b835796e26b055ac46bed10c04ca8e1598 | PHP | SDarmandieu/OfficeTourisme | /Projet/back-laravel/tests/Feature/PointTest.php | UTF-8 | 9,976 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Feature;
use Tests\TestCase;
use App\User;
use App\City;
use App\Point;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class PointTest extends TestCase
{
use DatabaseTransactions;
protected $city;
protected $user;
/**
* Set the URL of the previous request.
*... | true |
9804643b5a975fcf6a229f97e1de3f7b8f0b7e2e | PHP | cmpscabral/cryptobits | /php/MicroCurlTest.php | UTF-8 | 2,796 | 2.546875 | 3 | [] | no_license | <?php
require_once 'MicroCurl.php';
class MicroCurlTest extends PHPUnit_Framework_TestCase {
public function testMatchDomain() {
$this->assertTrue(CookieJar::matchDomain('.client9.com', 'www.client9.com'));
$this->assertFalse(CookieJar::matchDomain('.client9.com', 'www.ieunw.com'));
}
pu... | true |
58f79f9be495c8087ad353331a5b9c8dae362b41 | PHP | ChunkaIskay/finanzas | /app/Contract.php | UTF-8 | 2,154 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Contract extends Model
{
protected $table = 'contracts';
protected $primaryKey = 'contract_id';
public static $messages =[
'codigo_carpeta.required' => 'Ingrese el código de la carpeta',
'codigo.required' => '... | true |
80c3cd0484a0a80c64183b3b7c119dff562ac060 | PHP | wunderkammer/a4 | /database/seeds/DrawingGalleryTableSeeder.php | UTF-8 | 802 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Drawing;
use App\Gallery;
class DrawingGalleryTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$drawings =[
'sleepy bat' => ['portrait','abstract'],
'blue bird' =... | true |
35b86757f2d1cd7db3c156a695c2bc204dfae9da | PHP | OnePlc/PLC_X_Job_Position | /src/Model/Position.php | UTF-8 | 1,157 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Position.php - Position Entity
*
* Entity Model for Position Position
*
* @category Model
* @package Job\Position
* @author Verein onePlace
* @copyright (C) 2020 Verein onePlace <admin@1plc.ch>
* @license https://opensource.org/licenses/BSD-3-Clause
* @version 1.0.0
* @since 1.0.0
*/
namespace ... | true |
d5ae7b1b58276b7c3ae5c1157400bef707ab7f75 | PHP | wasymshykh/timer-project | /clean-rooms.php | UTF-8 | 1,058 | 2.609375 | 3 | [] | no_license | <?php
require 'app/start.php';
$m = new Members($db);
$r = new Rooms($db);
$rooms = $r->get_rooms();
if ($rooms['status']) {
$rooms = $rooms['data'];
foreach ($rooms as $room) {
$members = $m->get_members_by('member_room_id', $room['room_id']);
if ($members['status']) {
... | true |
f4c7900699c7ed0681104dfd05fd927967688aff | PHP | parsecsv/parsecsv-for-php | /tests/properties/SortByTest.php | UTF-8 | 2,502 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace ParseCsv\tests\properties;
class SortByTest extends BaseClass {
public function testSortByRating() {
$this->csv->sort_by = 'rating';
$this->csv->conditions = 'title does not contain Blood';
if (!preg_match('/^8\.2\./', phpversion()))
$this->_compareWithExpected... | true |
bb6cee5ca35e3f2963d7f78927273b30767fb8de | PHP | event-engine/php-code-generator-cartridge-event-engine | /src/EventFactory.php | UTF-8 | 3,258 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @see https://github.com/event-engine/php-code-generator-cartridge-event-engine for the canonical source repository
* @copyright https://github.com/event-engine/php-code-generator-cartridge-event-engine/blob/master/COPYRIGHT.md
* @license https://github.com/event-engine/php-code-generator-cartrid... | true |
e5430069bdebccf37ab7490cb614c1380c193a48 | PHP | Lornot/learning_app | /modules/notifiers/MailNotifier.php | UTF-8 | 223 | 2.875 | 3 | [] | no_license | <?php
require_once 'Notifier.php';
class MailNotifier extends Notifier
{
public function inform($message)
{
print "Меседж через емейл: {$message}\n";
}
} | true |
8d5571fdecd0c87268cc0f8f158036d40824238e | PHP | Sebastian-123-web/swaiie | /php/sesion.php | UTF-8 | 986 | 2.546875 | 3 | [] | no_license | <?php
if (isset($_POST["username"]) && isset($_POST["password"])){
$username = $_POST["username"];
$password = $_POST["password"];
include 'conexion.php';
$sql = 'SELECT `tipo_usuario` FROM `usuario` WHERE `id_user`="'.$username.'" AND `password`="'.$password.'"';
$query = mysqli_query($link, $sq... | true |
be2ce102fad525c37d97780aec2f05a0b86fa5ce | PHP | iiifx-production/password-generator | /source/Method/MethodOpenSSL.php | UTF-8 | 434 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace iiifx\PasswordGenerator\Method;
class MethodOpenSSL implements MethodInterface
{
/**
* @inheritdoc
*/
public static function isAvailable ()
{
return function_exists( 'openssl_random_pseudo_bytes' );
}
/**
* @inheritdoc
*/
public function getRandomIn... | true |
f7025275b0657496c646fa3b09b5a57173bab608 | PHP | infohojin/daelim_db_2020 | /201930231/var/unset.php | UTF-8 | 337 | 2.78125 | 3 | [] | no_license | <?php
$hello = "안녕";
echo $hello;
// hello 더 이상 필요없음
// 메모리가 부족해서ㅠㅠ
unset($hello); // 메모리가 제거됨
echo $hello; // 삭제하고 없는 hello를 호출해서
echo $hello; // 당연히 오류가 발생함
// 마지막줄 프로그램이 종료되면,
// 변수가 메모리에서 없어짐 | true |
1191abe83b5f3a83b00e6baa3043ab34b5f06f9e | PHP | sasedev/CommonsHtmlmodel | /src/Sase/Commons/Htmlmodel/Tag/InlineTextSemantic/MarkTag.php | UTF-8 | 1,400 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/**
* MarkTag
*
* mark element representation Class
*
*
* @category html5
* @author <a href="mailto:seif.salah@gmail.com">sasedev</a>
* @license MIT
* @copyright <a href="https://sasedev.net">sasedev</a> 2017
*/
namespace Sase\Commons\Htmlmodel\Tag\InlineTextSemantic;
use Sase\Commons\Htmlmo... | true |
00d9402288c01dd85a60ec01d4b0e5af02c2c01e | PHP | wandersoul/portfolio | /contact_new.php | UTF-8 | 4,291 | 3.25 | 3 | [] | no_license | <?php
/* File name: contact_new.php
* Author: Marc Anderson
* Website Name: Marc Anderson's Porfolio Site
* File decription: This page provides the user with a method to add new contacts to the list.
* Upon successfully filling in the required fields and submission, the database will enter in
* a new contact... | true |
7fe23d61a732c39f66fdc0d0209dd5e72d652fd9 | PHP | wizaplace/wizaplace-php-sdk | /src/Catalog/ProductFilter.php | UTF-8 | 2,773 | 2.796875 | 3 | [] | no_license | <?php
/**
* @author Wizacha DevTeam <dev@wizacha.com>
* @copyright Copyright (c) Wizacha
* @license Proprietary
*/
declare(strict_types=1);
namespace Wizaplace\SDK\Catalog;
/**
* Class ProductFilter
* @package Wizaplace\SDK\Catalog
*/
final class ProductFilter
{
public const ID = 'id';
pub... | true |
5687dc7270a40d697f14959e3ab4235f11221e01 | PHP | tzhuan/dec | /tests/Decimal/DecimalAbsTest.php | UTF-8 | 503 | 2.546875 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
use Dec\{
Dec as Decimal,
DecConst as DecimalConstants
};
date_default_timezone_set('UTC');
class DecimalAbsTest extends TestCase
{
public function testAbs()
{
$this->assertTrue(Decimal::fromInteger(0)->abs()->equals(Decimal::fromInteger(0)));
$t... | true |
38c69a0e0995c01993ea33f0615d6d4548615651 | PHP | ruzzll/php-openfire-restapi | /src/AuthenticationToken.php | UTF-8 | 2,908 | 2.859375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* OpenFireRestAPI is based entirely on official documentation of the REST API
* Plugin and you can extend it by following the directives of the documentation
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full l... | true |
53303978284a1288e4810900533f62c8d324203e | PHP | neirocha/aulagit | /oo/CadastroCliente/Clientes.php | UTF-8 | 3,251 | 3.34375 | 3 | [] | no_license | <?php
namespace Clientes;
/**
* Abstract Class Cliente
*
* Classe abstrata Cliente
* Não pode ser instanciada
*/
abstract class Cliente
{
/**
* ID
*
* @var int
*/
protected $id;
/**
* Nome ou Nome fantasia
*
* @var string
*/
protected $nome;
/**
* ... | true |
60dcec43cd471ef69a25d0b2d0abd08c6fd9e414 | PHP | skooppaos/data-manager | /src/Contracts/IocManagerInterface.php | UTF-8 | 926 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Michaels\Manager\Contracts;
/**
* Contract for Manager instances that manage dependencies
* @package Michaels\Manager
*/
interface IocManagerInterface extends IocContainerInterface
{
/**
* Initializes IoC Container
* @param array $components
* @return mixed
*/
public fun... | true |
57474aa4d28095dc55a71ee65a58cdbe4444c5c9 | PHP | uetiko/NazepReload | /librerias/html_admon.php | UTF-8 | 10,360 | 2.71875 | 3 | [] | no_license | <?php
/*
Sistema: Nazep
Nombre archivo: html_admon.php
Funci�n archivo: Generar toda las funciones para mostrar los elementos web de la aplicaci�n
Fecha creaci�n: Marzo 2011
Fecha �ltima Modificaci�n: Marzo 2011
Versi�n: 0.2
Autor: Claudio Morales Godinez
Correo electr�nico: claudio@nazep.com.mx
*/
class HtmlAdmon
{
... | true |
a87e88832e6cce44e02d53662bf31a357ca9ff22 | PHP | xzela/lang-antiques-src | /web/helpers/snappy_source_helper.php | UTF-8 | 2,396 | 2.828125 | 3 | [
"Apache-2.0"
] | permissive | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
# ---
# Author: Gavin Vickery
# Created: 2007/06/01
# Last Update: 2007/06/05
# ---
// Generate base directory for source files
function snappy_basedir($typeDir) {
$newCI =& get_instance();
$baseDir = $newCI->config->slash_item... | true |
0d9d1d695d171c4cfeaee77f5de326a5ad9c199f | PHP | LuciaHurtadoCardoso/PHP | /ejercicios_tanda3/exercise25_t3.php | UTF-8 | 490 | 3.109375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Exercise25/tanda3</title>
</head>
<body>
<?php
$num = $_POST['num'];
$numString = (string... | true |
b17270bfaf1d63c58c6b1e26cf77909337ff9380 | PHP | SamjuTheCoder/inventory_control | /app/Http/Controllers/StoresController.php | UTF-8 | 2,526 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DB;
use App\Models\Store;
use Session;
use App\Models\ProductMovement;
class StoresController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function create()
{
$data['... | true |
7ea48da3a0b73359ad4b04e71986a1431be8bf59 | PHP | rapidmail/rapidmail-apiv3-client-php | /src/Service/V1/Api/Mailings/Mailing/Parameter/MailingQueryParam.php | UTF-8 | 2,077 | 2.796875 | 3 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | <?php
namespace Rapidmail\ApiClient\Service\V1\Api\Mailings\Mailing\Parameter;
use Rapidmail\ApiClient\Exception\InvalidArgumentException;
use Rapidmail\ApiClient\Service\Parameter\GenericParameter;
class MailingQueryParam extends GenericParameter
{
/**
* @var string[]
*/
const STATUS_VALUES = [
... | true |
6050db7f75fc113c05edff200a33085d1f8b1fdc | PHP | jasonpdk/PHP-Minecraft-Query | /prometheus_metrics.php | UTF-8 | 1,212 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
header('Content-Type: text/plain; version=0.0.4; charset=utf-8');
$max_age = 30;
$expires = gmdate("D, d M Y H:i:s", time() + $max_age) . " GMT";
header("Expires: $expires");
header("Pragma: cache");
header("Cache-Control: max-age=$max_age");
?>
<?php
require __DIR__ . '/src/MinecraftQuery.php';
require ... | true |
6a6e8ab8453ca6e6000f3ae17cba152584f6fce0 | PHP | bjeavons/rest_router | /includes/Exception.inc | UTF-8 | 302 | 2.578125 | 3 | [] | no_license | <?php
/**
* @file
* Custom exception
*/
class RestRouterException extends Exception {
public $code;
public $message;
public $data;
function __construct($code, $message = NULL, $data = NULL) {
$this->code = $code;
$this->message = $message;
$this->data = $data;
}
}
| true |
b450676f3137d218c4bdbf50d63f4ee631b57b76 | PHP | jason17055/coder-contest | /credentials_handouts.inc.php | UTF-8 | 2,798 | 2.609375 | 3 | [] | no_license | <?php
$sql = "SELECT title,subtitle,logo,handout_html
FROM contest
WHERE contest_id=".db_quote($_REQUEST['contest']);
$result = mysql_query($sql);
$contest_info = mysql_fetch_assoc($result)
or die("invalid contest id");
?>
<html>
<head>
<title><?php echo htmlspecialchars($contest_info['title'])?></title>
<style type... | true |
c81fb4ce35118466bc704dd77d66e841734c0c56 | PHP | link2arslan/travelport | /src/Util/HotelUpsellQualify.php | UTF-8 | 6,289 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace FilippoToso\Travelport\Util;
class HotelUpsellQualify
{
/**
* @var CorporateDiscountID $CorporateDiscountID
*/
public $CorporateDiscountID = null;
/**
* @var typeHotelChainCode $HotelChainCode
*/
public $HotelChainCode = null;
/**
* @var typeHotelCode $H... | true |
1b298f03a85a6ada07c06e5dafd3c381c902d57c | PHP | ssaini18/phplogin | /login.php | UTF-8 | 1,691 | 2.671875 | 3 | [] | no_license | <head>
<title>Login</title>
</head>
<?php
$error = "";
if ($_SERVER['REQUEST_METHOD']=='POST'){
$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
$password_hashed = mysql_real_escape_string(md5($password));
if(!empty($username) &&... | true |
021a82b1e38d6ff1ad734678f93dcdd44361a9ca | PHP | sas-irad/person-info-bundle | /PersonInfo/PersonInfo.php | UTF-8 | 1,254 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace SAS\IRAD\PersonInfoBundle\PersonInfo;
class PersonInfo implements PersonInfoInterface {
private $pennkey;
private $penn_id;
private $first_name;
private $last_name;
public function __construct($array) {
foreach ( array('pennkey', 'penn_id', 'first_name',... | true |
8d5a99a64d003148f292476202090eb58753b924 | PHP | Mooncode29/php-exercise | /param_url/exercice4/index.php | UTF-8 | 207 | 2.671875 | 3 | [] | no_license | <?php
if(isset($_GET['langage']) && isset($_GET['serveur'])){
echo "langage :"." ".$_GET['langage']." "."et serveur: ".$_GET['serveur'];
}else{
echo "Il faut renseigner le langage et le serveur";
}
?> | true |
9479076cb7cbb3c4519c2cb0c2125044f2c61c4b | PHP | felipedeacorrea/teste-om30 | /app/Helpers/general_helper.php | UTF-8 | 2,767 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
function _encrypt(string $value = null)
{
$dirty = array("+", "/", "=");
$clean = array("_PL_", "_SL_", "_EQ_");
$value = base64_encode(base64_encode($value));
return str_replace($dirty, $clean, $value);
}
function _decrypt(string $value = null)
{
$dirty = array("+", "/", "=");
$clean =... | true |
c6f298de89b4709afdd777d249b921cbd8dc2bd1 | PHP | clickenergy/code-challenge | /02 - Refactor/api.php | UTF-8 | 2,773 | 2.75 | 3 | [] | no_license | <?php
namespace App\Api;
use GuzzleHttp\Client;
class MyApiClient
{
public $baseUrl;
public $token;
public function __construct($token)
{
$this->baseUrl = env('API_BASEURL');
$this->token = $token;
}
public function get($query, $column, $params = null)
{
$cli... | true |
5b7343e8a8c6a78e04e547db73acadcb12056190 | PHP | naylonkessler/php-features-magicas-ou-nao | /invoke.php | UTF-8 | 130 | 2.65625 | 3 | [] | no_license | <?php
class Engine
{
public function __invoke()
{
var_dump('Engine turned on ...');
}
}
$engine = new Engine();
$engine();
| true |
641b74e995c6faf22b92f2d9d8e7bc821e1cbbfe | PHP | prathonit/EasyMess | /config/classes/database.class.php | UTF-8 | 932 | 2.84375 | 3 | [] | no_license | <?php
class DB{
public function connectToDb(){
$handle = new mysqli('localhost','prathonit','pwdpwd','easymess');
if ($handle->connect_error){
return False;
}
return $handle;
}
public function selectUserFromDb($uid){
$handle = $this->connectToDb();
$query = "SEL... | true |
e7161b92488fe02caa9d475dd770d6f4cf86c524 | PHP | dagh1/projet | /src/Entity/Societe.php | UTF-8 | 4,736 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repo... | true |
c03ed4a8fe84f672c1f8033427aa5c3de43f7201 | PHP | SuperIbm/Weborobot | /app/Modules/AdminSection/Database/Migrations/2017_02_23_161125_TableAdminSection.php | UTF-8 | 1,288 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
/**
* Класс миграции.
* @version 1.0
* @since 1.0
* @copyright Weborobot.
* @author Инчагов Тимофей Александрович.
*/
class TableAdminSection extends Migration
{
/**
* Запуск миграции.
* @return void
... | true |
5df2e8412e87138d5230d58c024053c5e00b186e | PHP | Wordpresssb/amply | /optional/temp/colors/class-amply-color-patterns.php | UTF-8 | 2,357 | 2.8125 | 3 | [] | no_license | <?php
/**
* Theme color patterns.
*
* @package amply
*/
/**
* Amply_Color_Patterns class
*/
if ( ! class_exists( 'Amply_Color_Patterns' ) ) {
/**
* Amply_Image_Sizes class
*/
class Amply_Color_Patterns {
/**
* Instance
*
* @var object $instance
*/
private static $instance;
/**
* Get... | true |
1b6feb605e696118cf126034c5cacc67e2a65372 | PHP | ashkan90/BOLD | /app/controllers/User.php | UTF-8 | 793 | 2.5625 | 3 | [] | no_license | <?php
/**
*
*/
class User extends Controller
{
function __construct($controller, $action)
{
parent::__construct($controller, $action);
$this->load_model('Users');
}
public function loginAction(){
if ($_POST) {
dd($_POST);
$validation = true;
if ($validation === true) {
$user = $this->User... | true |
0b0727530fae5553afc71b0fad4112a54adc7590 | PHP | saulhoward/haddock-cms | /plug-ins/user-login/branches/db-in-plug-ins/classes/database/elements/row-subclasses/UserLogin_UserRow.inc.php | UTF-8 | 1,686 | 2.859375 | 3 | [] | no_license | <?php
/**
* UserLogin_UserRow
*
* @copyright 2007-08-27, Robert Impey
*/
class
UserLogin_UserRow
extends
Database_Row
{
public function
get_name()
{
return $this->get('name');
}
public function
get_email()
{
return $this->get('email');
}
... | true |
e12bfdd6e640b3942a01b109a50d23f12359ee54 | PHP | Seagull-Project-PHP-Framework/seagullframework-cms | /lib/SGL/File.php | UTF-8 | 2,405 | 3.125 | 3 | [] | no_license | <?php
/**
* File management utility methods.
*
* @package SGL
* @author Demian Turner <demian@phpkitchen.com>
*/
class SGL_File
{
/**
* Copies directories recursively.
*
* @static
* @param string $source
* @param string $dest
* @param boolean $overwrite
* @return boolean
... | true |
8bed58fb8bbf6075fffeed203d0db3950315b57b | PHP | yohanneskaaa/Canteen_assessment | /Treats2-4.php | UTF-8 | 4,586 | 2.640625 | 3 | [] | no_license | <?php
$con = mysqli_connect("localhost", "yohanneska", "wildfog34", "yohanneska_canteen" );
if(mysqli_connect_errno()) {
echo "Failed to connect to MySQL:".mysqli_connect_error(); die();}
else{
echo "connected to database";
}
/*Setting variable to sort according to alpha and price*/
if (isset($_GET['sort'])) {... | true |
26ef8f738d3b5b04c0bbe0d3fe843ba3456fbce2 | PHP | Gia636/PHP-homework-assignments | /CSVtoTable.php | UTF-8 | 488 | 2.828125 | 3 | [] | no_license | <?php
function CSVtoTable($CSV){
$table = '<table>';
$file = fopen($CSV, 'r');
$headings = fgetcsv($file);
$table .= '<tr>';
foreach ($headings as $number => $value){
$table .= "<th>{$value}</th>";}
$table .= '</tr>';
$table .= '<tr>';
while(! feof($file)){
$data = fgetcsv($file);
foreach ($data as $number ... | true |
6e85a95c2f25e51f919987d557f7f5903fea0341 | PHP | xdrop/MammalWebCS | /backend/src/classes/Database/Queries/ChartStatsQuery.php | UTF-8 | 2,225 | 2.921875 | 3 | [] | no_license | <?php
class ChartStatsQuery extends Query
{
/**
* Creates the SQL query to fetch the data required and stores it in the appropriate internal query
* @param array $params The parameters of the query
* @return mixed
*/
protected function fetchQuery(&$params)
{
$query = $this->db... | true |
2a30ef84ccced3209c2ef6577c00efb9806ace17 | PHP | huszarpp/ShoesDatabase | /SizeFilter.php | UTF-8 | 614 | 2.90625 | 3 | [] | no_license |
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<?php
$con = mysqli_connect('localhost','root','peter','Shoes');
if (!$con) {
die('Could not connect: ' . mysqli_error($con));
}
$sql = "SELECT DISTINCT Sizes.ID, Sizes.Size FROM Stock INNER JOIN Sizes ON Stock.SizeID = Sizes.ID";
$result = mys... | true |
e29a76f1b55dadeec9f15780334a2ba55c8eedf4 | PHP | nnamnguyen/dotb_ims_new | /custom/clients/base/api/TranslateLanguages.php | UTF-8 | 3,346 | 2.53125 | 3 | [] | no_license | <?php
class TranslateLanguages extends DotbApi
{
function registerApiRest()
{
return array(
'translate_language_get_list_modules' => array(
'reqType' => 'GET',
'path' => array('translate_language', 'get_list_modules'),
'pathVars' => array(),
... | true |
888d8cd11bcb9c4b937b1d39872dede8eceef3ae | PHP | freshy969/MyEnvoy | /application/model/Email.php | UTF-8 | 1,681 | 3.171875 | 3 | [] | no_license | <?php
class Email {
public static function validate($email) {
if (strpos($email, '@') === FALSE) {
return FALSE;
}
$atpos = strrpos($email, '@');
$localpart = substr($email, 0, $atpos);
$hostpart = substr($email, $atpos + 1);
$localpartlen = strlen($l... | true |
731e2eb56b0b8a1c7a8f7fc143e771f309f87475 | PHP | AnthonyBASTIDE/adminbsb-material-design-bundle | /Helper/ViewHelper.php | UTF-8 | 1,726 | 2.8125 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | <?php
/*
* This file is part of the adminbsb-material-design-bundle package.
*
* (c) 2018 WEBEWEB
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace WBW\Bundle\AdminBSBBundle\Helper;
use WBW\Library\Core\Exception\FileSys... | true |