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
4941b2eea6a12a96b98248ef35eceddb0608c3d7
PHP
limod/beeromat_raspberry
/beeromat_web/beeromat/application/controllers/IndexController.php
UTF-8
4,306
2.625
3
[]
no_license
<?php class IndexController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ } public function getWateringData($from, $to) { $wateringMapper = new Application_Model_WateringMapper(); $waterings = $wateringMapper->fetchLatest($from, ...
true
0399a7013c6157a3f00641ccdde80eb3286cdf18
PHP
nguyendangnam9x/TestReport
/application/models/user.php
UTF-8
893
2.609375
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php class User extends CI_Model { private $table = 'users'; function __construct() { /* Call the Model constructor */ parent::__construct(); } function findOne($user, $password) { $this->load->database(); $this->db->where(array('name' => $user, 'password' => $password)); $qu...
true
e0e72e6777b31ff936323a5b441bbd667dee15f6
PHP
amituddin/WeddingCardSeller-Web
/push.php
UTF-8
3,327
2.703125
3
[]
no_license
<html> <head> <title>Android Push Notification With Image Example</title> <meta charset="UTF-8"> <link href='styles/style.css' rel='stylesheet' type='text/css'> <script type="text/javascript"> function validate() { if( document.myForm.title.value == "" ) ...
true
812481adb69e4c2562b94b619841fe87cfee6009
PHP
bouhaddou/ighri
/src/DataFixtures/AppFixtures.php
UTF-8
1,788
2.59375
3
[]
no_license
<?php namespace App\DataFixtures; use Faker\Factory; use App\Entity\User; use App\Entity\Image; use App\Entity\Posts; use App\Entity\Produits; use App\Entity\Categorie; use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\Common\Persistence\ObjectManager; use Symfony\Component\Security\Core\Encoder\UserPasswordEn...
true
c0d03e11e31e89d4760fdd5d7bb3f3a674539737
PHP
bjifas/EggplantBlueFront
/presentacion/cargaMenu.php
UTF-8
4,494
2.734375
3
[]
no_license
<?php ///dudas: el objeto $u se pasa de una pagina a la otra? ////NO, los objetos de borran de memoria cuando se sale del php, no se pasan de .php, se crean cada vez que se necesiten, es mas, hay una función destruct que debería de destruir dicho objeto. ///como traemos todos los valores del objeto si lo creamos con...
true
fc1c81011bbb83fd4499e50d47b9eac21c6b20fd
PHP
laminas/laminas-stdlib
/src/SplStack.php
UTF-8
1,849
3.015625
3
[]
permissive
<?php declare(strict_types=1); namespace Laminas\Stdlib; use ReturnTypeWillChange; use Serializable; use UnexpectedValueException; use function is_array; use function serialize; use function sprintf; use function unserialize; /** * Serializable version of SplStack * * @template TValue * @extends \SplStack<TVal...
true
d9622e92b093c2bf89d08402cfbb4119e811b97d
PHP
JacobMisirian/TelBoard
/TelBoard/board.php
UTF-8
3,880
3.28125
3
[]
no_license
<html> <head> <title>Tel Message Board</title> </head> <body> <center><h2>Tel Message Board</h2> <a href="index.php"><img src="TelBoard.png" height="150px" width="200px"></a></center> <br><br> <?php //If there was no values specified for how many entries then default to 0 through 10, otherwise use the predermined...
true
4df5d66b252d7160663391ece5a2bb5818acdd40
PHP
NeuralNoise/socialNetworking-3
/app/Http/Repository/PostRepository.php
UTF-8
1,337
2.765625
3
[ "MIT" ]
permissive
<?php namespace App\Http\Repository; use App\Post; /** * Post Repository class. */ class PostRepository implements PostInterface { /** * Get a list of all posts. * * @return array Array containing list of all posts */ public function getPostsList() { return [ 'Sh...
true
0d039482ff7debc407857b7b481cb7fad2a3fcab
PHP
aseerishraque/php-mysql-simple-crud
/conn.php
UTF-8
289
2.609375
3
[]
no_license
<?php $hostname = 'localhost'; $username = 'root'; $password = ''; $database = 'simple_crud'; $conn = new mysqli($hostname,$username,$password,$database); // Check connection if ($conn -> connect_errno) { echo "Failed to connect to MySQL: " . $mysqli -> connect_error; exit(); } ?>
true
88a39e4f91cf4d39792105bc2fdce406d95b80e8
PHP
guimelcode/new_portique_theme
/includes/archives.php
UTF-8
1,019
2.625
3
[]
no_license
<?php /** Archives manager - gérer les appels de contenu - gérer le formatage HTML */ function archives($args){ $postTitle = $_POST["postTitle"]; if($postTitle){ $args = array( 'post_type' => 'exposition', 'name' => $postTitle, ); $gros_query = new WP_Query($args); if ( $gros_query->h...
true
77d8506e9e7d4bf69835304d7eeed277489e0bb7
PHP
segundogaldames/miPrimerSitio
/class/session.php
UTF-8
478
2.984375
3
[]
no_license
<?php class Session { public function __construct() { session_start(); } public function login($id_usuario, $nom_usuario, $rol) { $_SESSION['autenticado'] = true; $_SESSION['usuario_id'] = $id_usuario; $_SESSION['usuario_nombre'] = $nom_usuario; $_SESSION['u...
true
0db467d85c0c78f5732795e334ac529187ce2b8b
PHP
kovacics/LeagueManager
/src/Controller/CompetitionController.php
UTF-8
1,904
2.640625
3
[]
no_license
<?php namespace App\Controller; use App\Entity\Category; use App\Entity\Competition; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKerne...
true
8fae90c9f11fc5cb9338571383479b48da992894
PHP
srijanone/ezcontent
/modules/ezcontent_node/modules/ezcontent_smart_article/src/EzcontentSpeechToTextInterface.php
UTF-8
982
2.671875
3
[]
no_license
<?php namespace Drupal\ezcontent_smart_article; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Component\Plugin\PluginInspectionInterface; /** * An interface implementation for speech-to-text conversion plugin. */ interface EzcontentSpeechToTextInterface extends PluginInspectionInterface, Conta...
true
05d88747c6cde99b1f81b82374084832d53c661d
PHP
fsajp/testdir
/tempt/add.php
UTF-8
2,259
2.8125
3
[]
no_license
<html> <meta charset='shift-JIS'> <body> <h1>Add New Records</h1> <?php try { $db = new PDO('sqlite:/home/fenny/public_html/tempt/addressbook.db'); //if(isset($_POST['submit'])) echo "<fieldset style='width:300px;'>"; echo "<form method='POST' action=''>"; echo "First Name &nbsp &nbsp: <input type='text' name='First...
true
5f92db649139f6fca575d900fbc42a76adf883ac
PHP
crishyj/embilsher_ereader
/embellisher-ereader/forum/mods/external_authentication/plugins_bin/base_plugin/settings.php
UTF-8
3,137
2.703125
3
[]
no_license
<?php /* This file allows you to add code to be executed on the module settings page. A common usage would be to create additional rows of settings to display. Please look at the other Phorum modules' settings pages for examples of how to add rows to a the admin input forms.. Another use...
true
a6ef83329409c9cd5afb5ea8dbe4281164da4b19
PHP
michelre/project4-louvre
/Louvre/src/MV/BookingBundle/Stripe/MVStripe.php
UTF-8
1,720
2.6875
3
[]
no_license
<?php namespace MV\BookingBundle\Stripe; class MVStripe { private $mail; private $locale; private $currency; public function __construct($mail, $locale, $currency) { $this->mail = $mail; $this->locale = $locale; $this->currency = $currency; } /** * @param $amount *...
true
ec0230c0306cc62c9880f522582f8c86a4224513
PHP
miltonarce/lostthings
/api/app/LostThings/Controllers/ItemsController.php
UTF-8
4,219
2.953125
3
[]
no_license
<?php namespace LostThings\Controllers; use LostThings\Models\Item; use LostThings\Core\View; use LostThings\Core\Validator; use LostThings\Core\Route; /** * Controller para manejar todas las acciones sobre el modelo Item */ Class ItemsController extends BaseController { /** * Permite obtener todas las publi...
true
b8d81ad5734e5b4039a2e0c94bc52ea40db67231
PHP
PatrikArvius/oophp
/view/dice100/play-process.php
UTF-8
906
2.734375
3
[]
no_license
<?php namespace Anax\View; //Starts session if (session_status() == PHP_SESSION_NONE) { session_name("paar19"); session_start(); } $dice100 = $_SESSION["dice100"]; $comp = $dice100->computer; $player = $dice100->player; //Deals with the form. $newGame = $_POST["newGame"] ?? null; $compRoll = $_POST["compRoll...
true
4a7d802fc26348eb02bfaad581eedd6f2ad47b79
PHP
Godtrilla/March-Madness-Database
/view_teams.php
UTF-8
872
2.9375
3
[]
no_license
<!--HOMEPAGE TO PRINT ALL TEAM INFO TO SCREEN--> <html> <body> <h2>VIEW ALL TEAMS</h2> <p>Display all team information</p> <form action="view_teams.php" method="post"> <input name="viewTeams" type="submit" value="VIEW TEAM DATA"> </form> <br><br> <a href="http://www.csce.uark.e...
true
ebd35b03127c5aad87f70001d90c945a0858157c
PHP
evardsson/s3c3
/app/util/logger/LogMailHandler.php
UTF-8
1,321
2.78125
3
[ "MIT" ]
permissive
<?php /** * Email handler for logging. * * Email handler for Monolog Logging - based on NativeMailHandler in Monolog. * * @author Sjan Evardsson <sjan@evardsson.com> * @link http://www.evardsson.com/ * @copyright Sjan Evardsson 2013 * @version 1.0 * @package s3c3 * @subpackage utilities */ namespace s3c3\uti...
true
f9c68c3d158d1828d3bf70bdb54aef7f0ef57610
PHP
contributte/apitte
/src/Core/ErrorHandler/PsrLogErrorHandler.php
UTF-8
1,378
2.671875
3
[ "MIT" ]
permissive
<?php declare(strict_types = 1); namespace Apitte\Core\ErrorHandler; use Apitte\Core\Dispatcher\DispatchError; use Apitte\Core\Exception\Api\ServerErrorException; use Apitte\Core\Exception\ApiException; use Apitte\Core\Exception\Runtime\SnapshotException; use Apitte\Core\Http\ApiResponse; use Psr\Log\LoggerInterface;...
true
afa5f1b8bfecae0f5d0700a87cefc1d595e1f1f0
PHP
Asow922/Transformations
/src/Metamodel/Services/GenerateHtmlService.php
UTF-8
1,322
2.765625
3
[]
no_license
<?php namespace App\Metamodel\Services; use App\Metamodel\Model\Attribute; use App\Metamodel\Model\Root; class GenerateHtmlService { public function generate(Root $model) { return $this->generateHTML($model); } protected function generateHTML(Root $model, $html = '') { if ($mod...
true
71ebb340740fe5a580c6a173ba27f1dbe3a3732f
PHP
yaron/slack-bot
/bot/Controllers/YoutubeController.php
UTF-8
1,076
2.640625
3
[]
no_license
<?php namespace SlackBot\Controllers; use SlackBot\Request; use SlackBot\Services; use GuzzleHttp\Client; class YoutubeController { public function Youtube(Request $request) { $rtm_session = Services::load('API')->getRTMSession(); $api_key = Services::load('Config')->get('youtube_api_key'); $query =...
true
608c4c8bd1504d258007727abcfc49fcc063d399
PHP
jarick/bx
/src/BX/Cache/Cache.php
UTF-8
4,818
2.90625
3
[ "MIT" ]
permissive
<?php namespace BX\Cache; use BX\Error\Error; use BX\Config\DICService; /** * Кеш * * Класс для работы с кешированием * * @author jarick <zolotarev.jar@gmail.com> * @version 0.1 */ class Cache { /** * @var string */ private static $manager = 'cache'; /** * Return error manager * * @return ICacheMan...
true
3e28f27c89a4f03e9d67d78f4103e16128673e27
PHP
nikic/php-src
/ext/intl/breakiterator/breakiterator.stub.php
UTF-8
2,519
2.625
3
[ "GD", "IJG", "Zlib", "LicenseRef-scancode-other-permissive", "TCL", "BSD-3-Clause", "BSD-4-Clause-UC", "OLDAP-2.8", "ISC", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "PHP-3.01" ]
permissive
<?php /** @generate-function-entries */ class IntlBreakIterator implements Traversable { /** @return IntlBreakIterator|null */ public static function createCharacterInstance(?string $locale = null) {} /** @return IntlCodePointBreakIterator */ public static function createCodePointInstance() {} /...
true
e79de91526cc240b3d180b1668ca9671f3c06dcb
PHP
hilkafi/rangpur_redcricent
/vendor/dereuromark/media-embed/src/MediaEmbed/Object/ObjectInterface.php
UTF-8
633
2.984375
3
[ "MIT" ]
permissive
<?php namespace MediaEmbed\Object; /** * ObjectInterface must be implemented by classes that are a specific type of media. */ interface ObjectInterface { /** * Returns the unique id of a media resource. * * @api * * @return string */ public function id(); /** * Returns the host as slugged string....
true
a3531cb2eac4a86b7131160a8465ed361affa1d6
PHP
suncompy/xintaolian
/application/common/logic/RecognizeLogic.php
UTF-8
12,037
2.578125
3
[]
no_license
<?php namespace app\common\logic; use think\Db; use think\Hook; use app\common\model\Recognize; use app\common\model\RecognizeTrade; use app\common\model\Users; class RecognizeLogic { /** * 添加一个认筹活动 * @param string $title 认筹活动标题 * @param float $price 单价 * @param float $qty 发行数量 * @param f...
true
53e6d9b7e6ddf2f491932699ea6be8fa3abce116
PHP
countless-integers/laravel-health-check
/src/Checkers/LogFileChecker.php
UTF-8
817
2.890625
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace CountlessIntegers\LaravelHealthCheck\Checkers; use CountlessIntegers\LaravelHealthCheck\Contracts\HealthCheckerInterface; use CountlessIntegers\LaravelHealthCheck\Contracts\HealthCheckReportInterface; use CountlessIntegers\LaravelHealthCheck\Reports\CheckerReport; /** * Chec...
true
7e400b34b971fb3e15351f9365e8d313542b9095
PHP
tuananh8985/laravel22
/database/seeds/EntrustTablesSeeder.php
UTF-8
2,586
2.546875
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Seeder; class EntrustTablesSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { /** * clear all data authorize */ \DB::statement('SET FOREIGN_KEY_CHECKS=0;'); \DB...
true
77921e792ada4a73d9f6956cb7f17b354b8dec85
PHP
talhaelahi01/todo
/temperatures/mysql.php
UTF-8
779
2.625
3
[]
no_license
<?php $as=$_POST['a']; $ass="23"; $mysqli = mysqli_connect("localhost","root","","temperatures"); $datetime=date("Y-m-d h:i:sa"); // $q="select now()"; // $r=mysqli_query($mysqli,$q); // while($row1=mysqli_fetch_assoc($r)) // { // $datetime=$row1['date_time']; // } $query="insert into veet_temp values('','.$as.',...
true
43ed68cd0b5c030d68a23b9168aa1f5f5c7a98bc
PHP
enlacee/chatlineapi
/app-view/Model/GroupTable.php
UTF-8
1,187
2.765625
3
[]
no_license
<?php namespace AppView\Model; use \Zend\Db\TableGateway\TableGateway; class GroupTable { protected $tableGateWay; protected $id = 'id_group'; public function __construct(TableGateway $tableGateWay) { $this->tableGateWay = $tableGateWay; } public function fetchAll($params) { $where = array_merge(array(...
true
7d86a18b375db01af6a976bd8f56f7ab85b9dce9
PHP
fleli723/sprint1
/classes/Template.php
UTF-8
2,622
3.203125
3
[]
no_license
<?php /**************************************************************** * This template class is used to contruct the HTML pages used * * for the UWSP Fall 2019 Semester CMNT-310 class. Assignment 1 * * * * @author Steve Suehring <steve.suehring@uwsp.edu>...
true
86fc8087393524df23441fca6bc98399d4816bb6
PHP
CodeSleeve/holloway
/src/Functions/Str.php
UTF-8
651
3.296875
3
[ "MIT" ]
permissive
<?php namespace CodeSleeve\Holloway\Functions; class Str { /** * Chomp a string a into an array of substrings. * * INPUT: chomp('.', 'foo.bar.baz.qux') * * OUTPUT: [ * 'foo.bar.baz', * 'foo.bar', * 'foo' * ] * * @param string $string * @retu...
true
398aa54544b4f27ad470d84ad82564fab232c11e
PHP
simonkorosec/FRI-2Letnik
/ST/Vaje11/controller/ChatController.php
UTF-8
4,221
2.78125
3
[]
no_license
<?php require_once("model/ChatDB.php"); require_once("ViewHelper.php"); class ChatController { public static function index() { $type = filter_input(INPUT_GET, 'type', FILTER_VALIDATE_REGEXP, [ "options" => [ "default" => "sse", "regexp" => "/^(sse)|(poll)$/" ...
true
1327730a5ca78a764a6fee5ef6b8a967271c5f5e
PHP
DocDams/SQLIPublishScheduler
/Services/Handlers/PublishSchedulerHandlerInterface.php
UTF-8
1,158
2.65625
3
[ "MIT" ]
permissive
<?php namespace SQLI\PublishSchedulerBundle\Services\Handlers; use eZ\Publish\API\Repository\Values\Content\Content; use eZ\Publish\API\Repository\Values\Content\Location; interface PublishSchedulerHandlerInterface { /** * Find all contents that should be "published" * * @param \DateTime|null $cur...
true
6267008ef3fca95b75b243a6f742bb8acfd8063a
PHP
haruco3/complex-test
/summary.php
UTF-8
2,788
2.890625
3
[]
no_license
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Complex Numbers - Summary</title> <link href="css/home.css" rel="style...
true
7f60cbebcabedb28513433c9e673e99e9a5682d6
PHP
jr-cologne/login-script
/app/ErrorHandling/ErrorHandler.php
UTF-8
835
2.546875
3
[ "MIT" ]
permissive
<?php namespace LoginScript\ErrorHandling; use LoginScript\{ ErrorHandling\Exception\ErrorHandlerException, Config\Config }; use Bugsnag\{ Client as BugsnagClient, Handler as BugsnagHandler }; class ErrorHandler { public function __construct() { $bugsnag = BugsnagClient::make($this->getApiKey()); ...
true
58b9625916d592d8fbad2642c239206eee617ba1
PHP
ethealin/cours_mobile
/api/controllers/FilmsController.php
UTF-8
3,158
2.65625
3
[]
no_license
<?php class FilmsController{ //get all films public function actionFindAll() { $db = DbController::connect(); $data = Film::findAll($db); if(!empty($data)) Api::response(200,array('data',$data)); else Api::response(400,array('error'=>'your request has failed')); } public function actionFindOne() ...
true
118d634b54f1138d443a00ec0ffce79e3642e11e
PHP
cornejong/southcoast-console
/src/Console/Console.php
UTF-8
6,306
3.09375
3
[]
no_license
<?php namespace SouthCoast\Console; use SouthCoast\Helpers\StringHelper; class Console { const EOL = PHP_EOL; /** * @var array */ protected static $config = []; /** * @var mixed */ protected static $environment_arguments_map = null; /** * @var mixed */ prot...
true
529e2b8a6c0884e290265af7b4c58e33fd9000e1
PHP
nikeddarn/lizard
/app/Channels/InvoiceMessageDatabaseChannel.php
UTF-8
1,783
2.765625
3
[ "MIT" ]
permissive
<?php /** * Invoice message database channel. */ namespace App\Channels; use Illuminate\Notifications\Notification; use RuntimeException; class InvoiceMessageDatabaseChannel { /** * Send the given notification. * * @param mixed $notifiable * @param \Illuminate\Notifications\Notification ...
true
38ed2ce05c00940dd101a579569d9b4a1a214a88
PHP
ALHAN710/MyEnergyClever-SymWebsite
/src/Controller/SiteController.php
UTF-8
24,290
2.59375
3
[]
no_license
<?php namespace App\Controller; use DateTime; use DateInterval; use App\Entity\Site; use App\Entity\User1; use App\Form\SiteType; use App\Repository\SmartModRepository; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Co...
true
00a255f74ee38162fb641dcc0edf97debf9a97ea
PHP
cultuurnet/search-v3
/src/Parameter/AbstractParameter.php
UTF-8
620
2.734375
3
[]
no_license
<?php declare(strict_types=1); namespace CultuurNet\SearchV3\Parameter; use CultuurNet\SearchV3\ParameterInterface; abstract class AbstractParameter implements ParameterInterface { /** * The key to use in the query string * @var string */ protected $key; /** * The value to use. ...
true
f02eb361720201c0ff1c6d931f624a3ba18051cc
PHP
trankhanhtk/adoh
/app/controllers/UsersController.php
UTF-8
2,674
2.859375
3
[]
no_license
<?php class UsersController extends \BaseController { /* Apply filter */ public function __construct() { $this->beforeFilter('auth'); } /** * Display a listing of the resource. * GET /users * * @return Response */ public function index() { return View::make('admin.users.index', array('users' => U...
true
2c3ecc556b67e737c51c7f1178db2101dc60d56d
PHP
acmunhoz/inventario
/mouse.php
UTF-8
2,767
2.515625
3
[]
no_license
<!DOCTYPE html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title>Inventario</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <?php include'header.html';?> <div id="form_altera"> <?php include 'db_connect.php'; //Altera o usuário if (!e...
true
8025c10a1ee44c31151ace59b9198ae68413870b
PHP
K0sen/bsa-2018-php-1
/src/Task1/Cryptocurrency.php
UTF-8
641
3.4375
3
[]
no_license
<?php declare(strict_types=1); namespace Cryptocurrency\Task1; abstract class Cryptocurrency implements Currency { protected $name; protected $logoUrl; protected $price; public function __construct(float $price) { $this->price = $price; // sets name according to class name ...
true
d42c7d6f118eaf6a6a8ce2459b4edb95d82950be
PHP
rukykf/devops-nanodegree-capstone
/src/code/DevopsClass.php
UTF-8
202
2.859375
3
[]
no_license
<?php namespace DevopsProject; class DevopsClass { public function sayHello() { echo "This is Kofi's Udacity Devops-nanodegree capstone project"; return "Hello World"; } }
true
3c07886573b98b6c52cfc002f51257b419a43cd4
PHP
anji-plus/captcha
/service/php/vendor/intervention/image/src/Intervention/Image/AbstractFont.php
UTF-8
4,735
3.375
3
[ "MIT", "GPL-3.0-only", "Apache-2.0" ]
permissive
<?php namespace Intervention\Image; abstract class AbstractFont { /** * Text to be written * * @var String */ public $text; /** * Text size in pixels * * @var int */ public $size = 12; /** * Color of the text * * @var mixed */ publi...
true
36b8b83621d6181bc2fbc5c4645c1292b94647af
PHP
felipenasr/php
/OrientacaoAoObjeto/encapsulamento/exemplo-02.php
UTF-8
480
3.75
4
[]
no_license
<?php class Pessoa{ public $nome = "Felipe"; protected $idade = 22; private $senha = "123456"; public function verDados(){ echo $this->nome."<br>"; echo $this->idade."<br>"; echo $this->senha."<br>"; } } class Programador extends Pessoa{ public function verDados(){ echo get_class($thi...
true
b778000a50a725e1192f4832caec38124c78ac7a
PHP
yilmazyusuf/Design-Pattern-Samples
/Behavioral/ChainOfResponsibilities/Php/Shopping/Responsibles/Grocer.php
UTF-8
841
2.84375
3
[]
no_license
<?php namespace Behavioral\ChainOfResponsibilities\Php\Shopping\Responsibles; use Behavioral\ChainOfResponsibilities\Php\Shopping\Handler; use Behavioral\ChainOfResponsibilities\Php\Shopping\Request; class Grocer extends Handler implements iShopFeatures { protected function process(Request $request): bool {...
true
1cf223239886ed61f42176be87f1f9f50b4f1391
PHP
JamesMcAvoy/projet-web
/src/controllers/Controller.php
UTF-8
2,856
2.859375
3
[]
no_license
<?php namespace Controllers; use WyriHaximus\React\Http\Middleware as SessionMiddleware, React\Http\Io\ServerRequest as Request, React\Http\Response, Philo\Blade\Blade; abstract class Controller { /** * @var Philo\Blade\Blade */ protected static $blade; /** * Create the templ...
true
332efee86020c0d06b461598a0b6352da92a62a2
PHP
taocheng1030/laravel-ProophessorDo-italia-master
/app/ProophessorDo/Model/Section/Command/CreateSection.php
UTF-8
876
2.609375
3
[ "BSD-3-Clause" ]
permissive
<?php declare(strict_types=1); namespace App\EventSourcing\Model\Section\Command; use App\ProophessorDo\Model\Section\SectionId; use App\ProophessorDo\Model\Section\SectionName; use Prooph\Common\Messaging\Command; use Prooph\Common\Messaging\PayloadConstructable; use Prooph\Common\Messaging\PayloadTrait; use Prooph\...
true
152f120a96fd05b2fd2f427b99c93ae5a20b9a2f
PHP
dschol72/DED2-week5
/member_pages/show_article.php
UTF-8
785
2.84375
3
[]
no_license
<?php // Include bestand met handige functies include('../includes/functions.php'); $paginaTitel = 'Show article'; include('../includes/header.php'); ?> <main> <?php include('../includes/db_connect.php'); $id = $_GET['id']; $sql = "SELECT title, article, created FROM DED2_articles WHERE id='$id'"; $result = my...
true
6d7c1f33e97f11e66a20cfae76a0155f1221b126
PHP
MiracleTrue/yxtx
/app/Entity/PitRanking.php
UTF-8
1,867
2.796875
3
[]
no_license
<?php namespace App\Entity; use Illuminate\Database\Eloquent\Builder; /** * Class PitRanking * Table 坑冠排行表 * @package App\Entity */ class PitRanking extends Entity { /*修改器:相册json转换array*/ public function setMatchPhotosAttribute($photos) { //['xxx.jpg','aaa.jpg'] if (is_array($photos)...
true
d1a72d675e20bdc9001ab854944152b359dfa464
PHP
fijey/rt-rw-net
/application/views/user/date.php
UTF-8
726
2.921875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php // mengatur time zone untuk WIB. date_default_timezone_set("Asia/Jakarta"); // mencari mktime untuk tanggal 1 Januari 2011 00:00:00 WIB $selisih1 = $user['end_transc']; // mencari mktime untuk current time $selisih2 = $user['jam_transc']; // mencari selisih detik antara kedua waktu $delta = $s...
true
8981ac6a1616d3e28584afcffb42d55275309ab1
PHP
freshy969/strong-native-types
/src/Types/NullableFloatType.php
UTF-8
1,910
3.25
3
[ "MIT" ]
permissive
<?php declare(strict_types = 1); // Namespace namespace Alphametric\Strong\Types; // Using directives use Alphametric\Strong\Support\FloatUtilities; use Alphametric\Strong\Foundation\NullableType; // Exceptions use Alphametric\Strong\Exceptions\DataImportException; use Alphametric\Strong\Exceptions\InvalidAssignment...
true
5de6aa4650fc182cbdf92090fd34ce45c5cc1aa3
PHP
Fifahh/1900018048
/tabel.php
UTF-8
2,135
2.875
3
[]
no_license
<!DOCTYPE html> <html> <head> <title>Jadwal Les</title> <style> body { background-color: #FFF0F5; } </style> </head> <body> <body> <h1><center>Jadwal Les Kelas Online</center></h1> <?php $nama=$tempat= $alamat=$kelamin...
true
23578bb111151a39e9640564c7cf1fb863c9769c
PHP
monsieurluge/result
/src/Error/BaseError.php
UTF-8
627
3.140625
3
[ "MIT" ]
permissive
<?php namespace monsieurluge\Result\Error; use monsieurluge\Result\Error\Error; /** * A generic Error. * @immutable */ final class BaseError implements Error { /** @var string **/ private $code; /** @var string **/ private $message; public function __construct(string $code, string $message) ...
true
07f56971b9d924abf7c662f7d5e01fd16d2ab50e
PHP
Aegyior/idea-management-software
/app/Http/Requests/User/AbstractRequest.php
UTF-8
1,272
2.609375
3
[]
no_license
<?php namespace App\Http\Requests\User; use Illuminate\Validation\Rule; use Illuminate\Foundation\Http\FormRequest; use App\Service\Reference; abstract class AbstractRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public fu...
true
6a4ad3c5a59cb4262c6d42585acc3d37ff4f417c
PHP
piopi/BehatCrawler
/src/Crawler.php
UTF-8
8,687
2.828125
3
[ "MIT" ]
permissive
<?php namespace Behat\Crawler; use Behat\Mink\Driver\Selenium2Driver; use Behat\Mink\Session; use GuzzleHttp\Psr7\Uri; use WebDriver\Exception\NoAlertOpenError; /** * Class Crawler * @package Behat\Crawler */ class Crawler { /** @var Session */ private $session; /** @var CrawlerQueue */ private Cr...
true
5fdb84254ce419832063333ed2bf7fccc489be2f
PHP
cwkhawand/discord-php-webhooks
/src/Util.php
UTF-8
1,277
2.515625
3
[]
no_license
<?php class Util { const Colors = array( "DEFAULT" => "0x000000", "WHITE" => "0xffffff", "AQUA" => "0x1abc9c", "GREEN" => "0x2ecc71", "BLUE" => "0x3498db", "YELLOW" => "0xffff00", "PURPLE" => "0x9b59b6", "LUMINOUS_VIVID_PINK" => "0xe91e63", "GOLD" => "0xf1c40f", "ORANGE" => "0xe67e22", "RED" => "...
true
5100b4773837dce5be0aff8c96c2500812718a4f
PHP
successmarket/oroinc-platform
/src/Oro/Bundle/UserBundle/EventListener/LoginAttemptsHandler.php
UTF-8
2,060
2.75
3
[ "MIT" ]
permissive
<?php namespace Oro\Bundle\UserBundle\EventListener; use Oro\Bundle\UserBundle\Entity\BaseUserManager; use Oro\Bundle\UserBundle\Entity\User; use Oro\Bundle\UserBundle\Provider\UserLoggingInfoProvider; use Psr\Log\LoggerInterface; use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent; use Symfony\Compo...
true
00e231bfb4ca55414fbb7316848e1d5803e3727f
PHP
chrokh/microbase
/base/router.php
UTF-8
2,759
2.921875
3
[]
no_license
<?php class Router{ private static $hasRouted = false; public static function Route(){ $route = self::findRouteFromRequest(); if($route != null){ self::runBeforeFilters($route); self::routeTo($route); self::runAfterFilters($route); }else{ self::throwFileNotFound(); } } ...
true
96be44db93a1312f7e1217137ac0999902ae7984
PHP
chrisgillis/slackwolf
/src/Game/Command/JoinCommand.php
UTF-8
2,180
2.84375
3
[ "MIT" ]
permissive
<?php namespace Slackwolf\Game\Command; use Exception; use Slack\Channel; use Slack\ChannelInterface; use Slack\RealTimeClient; use Slackwolf\Game\GameManager; use Slackwolf\Game\GameState; use Slackwolf\Game\Formatter\PlayerListFormatter; use Slackwolf\Game\Formatter\UserIdFormatter; use Slackwolf\Message\Message; /...
true
914c6d556e36d41ebed2f1f7dda94420daba23a7
PHP
RPCIII/gulfcountyclerk
/public/plugins/download-monitor/src/Admin/Settings/Fields/Field.php
UTF-8
1,319
2.890625
3
[ "MIT", "GPL-3.0-only" ]
permissive
<?php abstract class DLM_Admin_Fields_Field { /** @var String */ private $name; /** @var String */ private $value; /** @var String */ private $placeholder; /** * DLM_Admin_Fields_Field constructor. * * @param String $name * @param String $value * @param String $placeholder */ public function __...
true
ae22e7bb4ad407f91040f6fcfda3775b843375dd
PHP
fikri-hafidzudin/pekan-2-hari-4
/index.php
UTF-8
652
3.203125
3
[]
no_license
<?php require_once 'animal.php'; require_once 'frog.php'; require_once 'ape.php'; $sheep = new Animal("shaun"); $kodok = new Frog("buduk"); $kodok->set_legs(4); $sungokong = new ape("kera sakti"); echo $sheep->name . '<br>'; // "shaun" echo $sheep->legs . '<br>'; // 2 echo $sheep->cold_blooded . '<br>' ;// false ...
true
935ac4a965efc69bf1c5eeabc6d1e68f9c9bf215
PHP
mstroink/steca-grid
/src/Resource/Measurements/Measurements.php
UTF-8
3,500
2.625
3
[]
no_license
<?php declare(strict_types=1); namespace MStroink\StecaGrid\Resource\Measurements; use InvalidArgumentException; use MStroink\StecaGrid\Resource\InverterResponse; final class Measurements implements InverterResponse { private Measurement $dcVoltage; private ?Measurement $dcCurrent; private ?Measurement ...
true
81f7e6ae0a616dcc7a07e46c7e25e78c90b7b1e1
PHP
fracz/refactor-extractor
/results/simplepie--simplepie/8a5f6013c4405cc8d5ccb27f2d76c78e8657df53/after/Credit.php
UTF-8
749
3.1875
3
[]
no_license
<?php class SimplePie_Credit { var $role; var $scheme; var $name; // Constructor, used to input the data public function __construct($role = null, $scheme = null, $name = null) { $this->role = $role; $this->scheme = $scheme; $this->name = $name; } public function __toString() { // There is no $this-...
true
f66efbad2456db415e976ccd1b98ff7a353b6f3f
PHP
DanielBadura/Redmine-Api-Client
/src/Struct/Project.php
UTF-8
3,823
2.671875
3
[ "MIT" ]
permissive
<?php namespace DanielBadura\Redmine\Api\Struct; use JMS\Serializer\Annotation as JMS; /** * @author Daniel Badura <d.m.badura@googlemail.com> */ class Project { /** * @var int * * @JMS\Type("integer") */ protected $id; /** * @var string * * @JMS\Type("string") ...
true
77a12ec494ad00b4f1beb0e89dc99d3f460ca591
PHP
plattformneun/marktstand
/src/Access/Verifiable.php
UTF-8
1,079
2.765625
3
[ "MIT" ]
permissive
<?php namespace Marktstand\Access; use Carbon\Carbon; use Illuminate\Support\Facades\Event; use Marktstand\Events\UserVerified; use Marktstand\Events\VerificationRequest; trait Verifiable { /** * Verify the user. * * @return void */ public function verify() { $this->verified_a...
true
888460427c646d8a281240ac81426760ba7fe7e0
PHP
greeflas/ITEA-News-Portal
/src/Service/HomePageServiceInterface.php
UTF-8
558
2.625
3
[]
no_license
<?php namespace App\Service; use App\Dto\HomePage; /** * Contract for home page service. * * @author Vladimir Kuprienko <vldmr.kuprienko@gmail.com> */ interface HomePageServiceInterface extends PageServiceInterface { /** * Gets home page data. * * @return HomePage */ public function g...
true
ed3d8056e150169e0d001b67d38ea35a34db7d0b
PHP
marcostercio/brechonarede
/controle/controladorListarFuncionarios.php
UTF-8
1,257
2.671875
3
[]
no_license
<?php require_once 'modelo/DAO/classeFuncionarioDAO.php'; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ $novoFuncionarioDAO = new classeFuncionarioDAO(); $funcionarios =$novoFuncio...
true
1e384134ee0c99414014ef2ac5974da885417382
PHP
kiou/orani2020
/src/Redirection/AfterLoginRedirection.php
UTF-8
1,454
2.703125
3
[ "MIT" ]
permissive
<?php namespace App\Redirection; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\RouterInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Http\Authentication\Authenticatio...
true
b418e1361ec70f96c8b0a1f57bf9b524e1b6c93a
PHP
Ugolkova/management.com
/models/index_model.php
UTF-8
2,540
2.890625
3
[]
no_license
<?php class Index_model extends Model{ function __construct() { parent::__construct(); } /** * Get list of fields according to owner id * * @param integer $ownerId */ public function getFieldsList($ownerId){ $fields = array(); if($ownerId == 1){ ...
true
a75c6eeedfeb0526593674c05ffa3e85fa27ed1b
PHP
digihum/ushahidi-extra-form-parts
/hooks/extra_form_parts.php
UTF-8
578
2.765625
3
[]
no_license
<?php defined('SYSPATH') or die('No direct script access.'); // Start wildlife category block class extra_form_parts { // CHANGE THIS FOR OTHER BLOCKS public function __construct() { // Array of block params $block = array( "classname" => "extra_form_parts", // Must match class name aboce "name" => "Extra f...
true
23f290efe6e1e35f2d8c753ffec3370808f89959
PHP
loamok/asyncAdd
/src/Message/AdditionMessage.php
UTF-8
406
2.90625
3
[]
no_license
<?php namespace App\Message; use App\Entity\Addition; use Doctrine\ORM\EntityManagerInterface; final class AdditionMessage { private $a; private $b; public function __construct(int $a, int $b) { $this->a = $a; $this->b = $b; } public function getA(): int { return $t...
true
253c2eb0deac4c3de517453778d820d727e08239
PHP
kimael-code/studium
/database/migrations/2021_05_23_002025_create_students_table.php
UTF-8
1,523
2.640625
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\DB; class CreateStudentsTable extends Migration { /** * Run the migrations. * * @return bool */ public function up() { $query = "CREATE TABLE IF NOT EXISTS students ( PRIMARY KEY (id)...
true
628e0c5b1abe2d52d67a22a3e0d66305fb917ef9
PHP
dboston528/php-ish
/includes/newclass.inc.php
UTF-8
214
3.3125
3
[]
no_license
<?php class NewClass extends ParentClass { //Properties and methods go here public function name() { return $this->name; } } //instantiating class $object = new NewClass; var_dump($object);
true
25b85139839ece08f2dfb64aac24095c167f5214
PHP
sanja911/surat-disposisi--kominfo
/formadmin/surat/cetak-index.php
UTF-8
2,564
2.6875
3
[]
no_license
<?php require_once("../../assets/lib/fpdf/fpdf.php"); require_once("../../config/koneksi.php"); class PDF extends FPDF { // Page header function Header() { // Logo $this->Image('../../assets/img/kominfo.PNG',20,10); // Arial bold 15 $this->SetFont('Times','B',15); // Mo...
true
214c09902a1d01b693fc9d5041185ea49f11ab28
PHP
ellis-/Robo47-Components
/library/Robo47/Filter/Tidy.php
UTF-8
5,738
2.734375
3
[ "BSD-3-Clause" ]
permissive
<?php /** * Robo47 Components * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE. * It is also available through the world-wide-web at this URL: * http://robo47.net/licenses/new-bsd-license * If you did not receive a copy of the license a...
true
4da7000b92d8d7365e4035009fcf5e320a85df82
PHP
wanghaofu/orm
/src/MSlavePDODriver.php
UTF-8
1,925
2.640625
3
[]
no_license
<?php namespace King\Orm; use PDO; use Silo\Builder\AbstractBuilder; use Silo\Builtin\PDODriver; class MSlavePDODriver extends PDODriver { /** * @var PDO */ private $slavePdo; public function __construct(PDO $masterPdo, PDO $slavePdo) { parent::__construct($masterPdo); $thi...
true
fa1dff89b642253c3793327ae3f01aadb1d38a49
PHP
danielarroteia9898/PSI_PWS_PL_A
/PWS_PL/Ficha3/Ficha3ex4.php
UTF-8
172
2.625
3
[]
no_license
<?php $vetorAssociativo = array("PT" => "Portugal", "GB" => "Great Britain", "ES" => "Spain", "FR" => "France"); ?> <ul> <?php
true
3ddea640f2d9804f52779c7b4a17febb8ac21d0b
PHP
JasonPuglisi/fitspiration-website
/article.php
UTF-8
2,027
2.53125
3
[ "MIT" ]
permissive
<?php require $_SERVER['DOCUMENT_ROOT'] . '/template/header.php'; if (isset($_GET['id']) && ctype_digit($_GET['id'])) { $stmt = $db->prepare('SELECT level, title, date, source, body, image, description, category FROM articles WHERE id=:id LIMIT 1'); $stmt->execute(array( ':id'=>$_GET['id'] )); $results = $stmt->f...
true
c4b793b1c44db900249e1f3220435dbc004b6c95
PHP
bervynco/alibaba-website
/application/controllers/UserController.php
UTF-8
1,553
2.59375
3
[ "MIT" ]
permissive
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class UserController extends CI_Controller { public function assignDataToArray($postData, $arrColumns){ $insertArray = array(); foreach($arrColumns as $col){ $insertArray[$col] = (!empty($postData[$col])) ? $postData...
true
3a69303fdf15e800d247604b8ab8cea946918144
PHP
itsmarkarthur/kitlist
/kitlist/wp-content/themes/sahifa-child/woocommerce/myaccount/my-posts-used.php
UTF-8
2,042
2.53125
3
[]
no_license
<?php /** * Created by IntelliJ IDEA. * @author: Rebecca Shen for KIT List * Date: 6/4/15 * Time: 3:04 PM * Created to show how many posts were used by the user ** @version 2.2.0* */ /** * My posts used * */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } $user_id = get_current_user_...
true
f8ed68ae505acddc7d804713b895d88e295212e2
PHP
GW2Treasures/gw2api
/src/Middleware/EffectiveUrlMiddleware.php
UTF-8
1,896
2.828125
3
[ "MIT" ]
permissive
<?php namespace GW2Treasures\GW2Api\Middleware; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; /** * This puts the effective url into a header. * * With guzzle 6 it is no longer possible to get the effective url directly from the response. * By using this middleware the effective ...
true
ad614e85868800f74c38240a108f57c3b606f50d
PHP
kpage1/CSC455Final
/product_list.php
UTF-8
1,500
2.8125
3
[]
no_license
<?php require './includes/header.php'; require_once '../../../mysqli_connect.php'; $sql = 'SELECT * FROM merch_type'; $result = mysqli_query($dbc, $sql); if (!$result) { echo "We are unable to process your request at this time. Please try again later."; include 'includes/footer.php'; exit; }e...
true
470dfd6a9f9decb3167d6ed43489356238f19980
PHP
verybuytw/esunacq-cardlink
/src/Request/TradeRequest.php
UTF-8
1,074
2.53125
3
[]
no_license
<?php namespace VeryBuy\Payment\EsunBank\Acq\CardLink\Request; use Closure; use InvalidArgumentException; class TradeRequest extends RequestContract { /** * @param Closure $success * @param Closure $error * * @return Closure */ protected function validate(Closure $success = null, Clo...
true
c39faf61056c64fd183e58ae909884fb270b6d97
PHP
ekreative/server-manager
/src/AppBundle/Command/CheckSiteStatusCommand.php
UTF-8
1,501
2.640625
3
[ "MIT" ]
permissive
<?php namespace AppBundle\Command; use AppBundle\Entity\Site; use Doctrine\Bundle\DoctrineBundle\Registry; use Doctrine\ORM\EntityManager; use Psr\Log\LoggerInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterfac...
true
f63a3baa42ef1e5515b24303a7909b46180a4db5
PHP
klAndersen/Bachelor-development-projects
/Web Development/Inf 268 Utviklingsprosjekt/include_php/finnstudent.inc.php
UTF-8
7,556
2.75
3
[]
no_license
<?php /**********************************SØKING ETTER BRUKERE***********************/ function finnVedNavn() { //let opp bruker via navn $tilkobling = kobleTil(); //opprett tilkobling til db $finnFnavn = mysql_real_escape_string($_POST['finnFnavn']); $finnEnavn = mysql_real_escape_string($_POST['fin...
true
11db201d8cb408263e4ae3a67b78c917a6e8f14d
PHP
palya-framework/palya
/tests/PalyaTest/CQRS/TestAsset/CommandHandler/CreateCustomerCommandHandler.php
UTF-8
959
2.609375
3
[]
no_license
<?php namespace PalyaTest\CQRS\TestAsset\CommandHandler; use Palya\CQRS\Bus\MessageInterface; use Palya\CQRS\CommandHandler\AbstractCommandHandler; use PalyaTest\CQRS\TestAsset\Command\CreateCustomerCommand; use PalyaTest\CQRS\TestAsset\DomainObject\Customer; use PalyaTest\CQRS\TestAsset\ValueObject\CustomerName; cl...
true
c7f6478d2e0151bbafea34f651d84f9947b7ca2e
PHP
vsundman/valerie_sundman
/project/rss.php
UTF-8
1,616
2.71875
3
[]
no_license
<?php //so the <? in the xml tag doesn't break php echo '<?xml version="1.0" encoding="utf-8"?>'; //connect to DB require( 'includes/config.php' ); include_once( 'includes/functions.php' ); ?> <rss version="2.0"> <channel> <title>Newest Uploads</title> <link>http://localhost/valerie_sundman/project/</link> ...
true
c76e0150d9c8e2811a4d46bfd429cfc27a031ad2
PHP
mityazakharov/simple-booking-api
/database/seeds/EmployerFakerSeeder.php
UTF-8
1,223
2.765625
3
[ "MIT" ]
permissive
<?php use App\Models\Color; use App\Models\Employer; use Illuminate\Database\Seeder; use Illuminate\Support\Str; class EmployerFakerSeeder extends Seeder { const LOCALE = 'ru_RU'; const NUMBER = 30; /** * Run the database seeds. * * @return void */ public function run() { ...
true
352289579b9c7d2ed40ad1a22842dd9e894672a4
PHP
Andrey-Matanov/cooking_site
/database/factories/RecipeFactory.php
UTF-8
1,026
2.625
3
[ "MIT" ]
permissive
<?php namespace Database\Factories; use App\Models\Recipe; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Facades\DB; class RecipeFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Recipe::class;...
true
5f20330bcf2ceba876fc5fc642857e903112b2dc
PHP
devLopez/laravel-api-health
/src/Checkers/AbstractSslCertificateChecker.php
UTF-8
1,796
2.921875
3
[ "MIT" ]
permissive
<?php namespace Pbmedia\ApiHealth\Checkers; use Spatie\SslCertificate\Downloader; use Spatie\SslCertificate\Exceptions\CouldNotDownloadCertificate; use Spatie\SslCertificate\Exceptions\InvalidUrl; abstract class AbstractSslCertificateChecker extends AbstractChecker { /** * The Spatie SSL downloader. * ...
true
8c7260e4effcf519363ee036db0740eca6194ebd
PHP
rdeeb/ZeroBase-Platform
/library/forms/models/ModelFactory.php
UTF-8
2,074
2.921875
3
[ "MIT" ]
permissive
<?php namespace Zerobase\Forms\Models; use Zerobase\Toolkit\Singleton; class ModelFactory extends Singleton { private $models = array(); protected function __construct() { $this->loadDefaultModels(); } private function loadDefaultModels() { $this->addWidgetModel( 'memory', '...
true
4d9f08600e2e3bc1b1737e4107835c4e3f85f792
PHP
immortal727/shelter
/src/Controllers/IndexController.php
UTF-8
547
2.609375
3
[]
no_license
<? namespace Ifmo\Web\Controllers; use Ifmo\Web\Core\Controller; use Ifmo\Web\Services\AnimalService; class IndexController extends Controller{ private $animalService; public function __construct(){ $this->animalService=new AnimalService(); } public function indexAction(){ $animals=$thi...
true
8a49f73dd85d873d522e910be679c20da16412e4
PHP
hanekedesign/the-centers
/lib/formerly.php
UTF-8
5,837
2.65625
3
[ "MIT" ]
permissive
<?php $incrmt = 0; function gen_opt_field($name, $val, $rep = null) { if ($val == null) return ""; $ins = " $name=\"" . ($rep?:$val) . "\" "; return $ins; } function gen_size_class($size) { $sizeclass = "input-col-12"; switch ($size) { case "none": $sizeclass = "input-col-none"; break;...
true
110d666c3cd1c41f5add7a4ea9730137737ffd44
PHP
Flexible-User-Experience/opengest-4
/src/Manager/Xls/ImputableCostXlsManager.php
UTF-8
6,457
2.734375
3
[]
no_license
<?php namespace App\Manager\Xls; use App\Entity\Operator\OperatorWorkRegister; use App\Entity\Purchase\PurchaseInvoiceLine; use App\Entity\Vehicle\VehicleConsumption; use App\Manager\RepositoriesManager; use Exception; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Writer\Xlsx; /** * Class I...
true
c6ac9af4f11cae59380ba13e34b997c66811e640
PHP
antonch1989/algorithms
/number_of_divisors/find_number_of_divisors.php
UTF-8
374
3.796875
4
[]
no_license
<?php /** * sqrt($n) complexity * works correctly for integers starting from 1 * * @param $n * @return int */ function getNumberOfDivisors($n) { $factors = 0; $i = 1; while ($i * $i < $n) { if ($n % $i === 0) { $factors += 2; } $i++; } if ($i * $i === $n...
true
b52c04cca62deabcd23eb03743c9c1db3e76e0f7
PHP
half0wl/php-StateMachine
/tests/StateMachineTest.php
UTF-8
4,620
2.859375
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Halfowl\StateMachine; use DomainException; use RuntimeException; use LengthException; class StateMachineTest extends \PHPUnit\Framework\TestCase { private State $green; private State $yellow; private State $red; private StateTransition $greenToYellow; pri...
true