Skip to content

Instantly share code, notes, and snippets.

View spolischook's full-sized avatar
🌐
Saving the world

Serhii Polishchuk spolischook

🌐
Saving the world
View GitHub Profile
<?php
$array = array(
0 => 0,
1 => 1,
2 => 2,
3 => array(
0 => 30,
1 => 31,
2 => 32,
3 => 33,
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>{% block title %}Черкаська мрія{% endblock %}</title>
{% block stylesheets %}
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
{% stylesheets 'bundles/assets/css/*' filter='cssrewrite' %}
<link rel="stylesheet" type="text/css" charset="UTF-8" media="all" href="{{ asset_url }}"/>
<link rel="stylesheet" type="text/css" href="styles-for-all-dreams.css" />
<?php
class KsortRecursive
{
protected function ksortRecursive(array $array)
{
foreach ($array as $key => $nestedArray) {
if (is_array($nestedArray) && !empty($nestedArray)) {
$array[$key] = $this->ksortRecursive($nestedArray);
}
}
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.2.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.2.*",
"symfony/monolog-bundle": "2.2.*",
"sensio/distribution-bundle": "2.2.*",
<?php
//Отак вар дамп выводится
private function viewToNorm($value)
{
$transformers = $this->config->getViewTransformers();
if (!$transformers) {
return '' === $value ? null : $value;
}
<?php
public function pingAction()
{
// ZOMG I do nothing, I am the fastest action ever
return new Response('pong');
}
{
query: {
bool: {
must: [{
term: {
recipe.categories.name: Family Friendly
}
}]
must_not: []
should: []
Given /^(?:|I )am on (?:|the )homepage$/
When /^(?:|I )go to (?:|the )homepage$/
Given /^(?:|I )am on "(?P<page>[^"]+)"$/
When /^(?:|I )go to "(?P<page>[^"]+)"$/
When /^(?:|I )reload the page$/
When /^(?:|I )move backward one page$/
When /^(?:|I )move forward one page$/
When /^(?:|I )press "(?P<button>(?:[^"]|\\")*)"$/
When /^(?:|I )follow "(?P<link>(?:[^"]|\\")*)"$/
When /^(?:|I )fill in "(?P<field>(?:[^"]|\\")*)" with "(?P<value>(?:[^"]|\\")*)"$/
Test Suite TS#01: Registration
Test Case TC#1-1: Registration form is available.
Pre-Requisite
Registration form.
Steps:
<?php
namespace YourVendor\YourBundle;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
class DynamicCollection extends ArrayCollection
{
public function __call($method, $arguments)