Skip to content

Commit

Permalink
Update dependencies (core-library v3.0.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed Aug 7, 2018
1 parent 8affa40 commit 9b8f036
Show file tree
Hide file tree
Showing 29 changed files with 122 additions and 122 deletions.
2 changes: 1 addition & 1 deletion Exception/BadUserRoleException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace WBW\Bundle\BootstrapBundle\Exception;

use Symfony\Component\Security\Core\User\UserInterface;
use WBW\Library\Core\IO\HTTPInterface;
use WBW\Library\Core\Helper\IO\HTTPInterface;

/**
* Bad user role exception.
Expand Down
8 changes: 4 additions & 4 deletions Form/Renderer/FormRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
namespace WBW\Bundle\BootstrapBundle\Form\Renderer;

use Symfony\Component\Translation\TranslatorInterface;
use WBW\Library\Core\Algorithm\Sorting\AlphabeticalTreeSort;
use WBW\Library\Core\Algorithm\Sorting\AlphabeticalTreeSortInterface;
use WBW\Library\Core\Helper\Sorting\AlphabeticalTreeNodeHelper;
use WBW\Library\Core\Model\Sorting\AlphabeticalTreeNodeInterface;

/**
* Form renderer.
Expand Down Expand Up @@ -47,8 +47,8 @@ public static function render($option, TranslatorInterface $translator = null) {
$output = "FormRendererInterface not implemented by this object";
}

if (true === ($option instanceof AlphabeticalTreeSortInterface)) {
$multiplier = AlphabeticalTreeSort::getLevel($option);
if (true === ($option instanceof AlphabeticalTreeNodeInterface)) {
$multiplier = AlphabeticalTreeNodeHelper::getLevel($option);
$nbsp = html_entity_decode(" ");
$symbol = html_entity_decode(0 === $multiplier ? "─" : "└");
$output = implode("", [str_repeat($nbsp, $multiplier * 3), $symbol, $nbsp, $output]);
Expand Down
8 changes: 4 additions & 4 deletions Navigation/NavigationItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace WBW\Bundle\BootstrapBundle\Navigation;

use WBW\Library\Core\Node\AbstractNode;
use WBW\Library\Core\Utility\Argument\ArrayUtility;
use WBW\Library\Core\Helper\Argument\ArrayHelper;

/**
* Navigation item.
Expand Down Expand Up @@ -100,9 +100,9 @@ public function toArray() {
// Initialize the output.
$output = [];

ArrayUtility::set($output, "href", $this->href, [null]);
ArrayUtility::set($output, "icon", $this->icon, [null]);
ArrayUtility::set($output, "span", $this->getId(), [null]);
ArrayHelper::set($output, "href", $this->href, [null]);
ArrayHelper::set($output, "icon", $this->icon, [null]);
ArrayHelper::set($output, "span", $this->getId(), [null]);

// Check the nodes.
if (0 < $this->size()) {
Expand Down
6 changes: 3 additions & 3 deletions Tests/Form/Renderer/FormRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use WBW\Bundle\BootstrapBundle\Form\Renderer\FormRenderer;
use WBW\Bundle\BootstrapBundle\Form\Renderer\TranslatedChoiceRendererInterface;
use WBW\Bundle\BootstrapBundle\Tests\Cases\AbstractBootstrapFrameworkTestCase;
use WBW\Library\Core\Algorithm\Sorting\AlphabeticalTreeSortInterface;
use WBW\Library\Core\Model\Sorting\AlphabeticalTreeNodeInterface;

/**
* Form renderer test.
Expand All @@ -41,13 +41,13 @@ protected function setUp() {
// Set the mocks.
$this->args = [
null,
$this->getMockBuilder(AlphabeticalTreeSortInterface::class)->getMock(),
$this->getMockBuilder(AlphabeticalTreeNodeInterface::class)->getMock(),
$this->getMockBuilder(ChoiceRendererInterface::class)->getMock(),
$this->getMockBuilder(TranslatedChoiceRendererInterface::class)->getMock(),
$this,
];

$this->args[1]->expects($this->any())->method("getAlphabeticalTreeSortParent")->willReturn(null);
$this->args[1]->expects($this->any())->method("getAlphabeticalTreeNodeParent")->willReturn(null);
$this->args[2]->expects($this->any())->method("getChoiceLabel")->willReturn("choiceLabel");
$this->args[3]->expects($this->any())->method("getTranslatedChoiceLabel")->willReturn("translatedChoiceLabel");
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/Twig/Extension/CSS/ImageTwigExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Twig_SimpleFunction;
use WBW\Bundle\BootstrapBundle\Tests\Cases\AbstractBootstrapFrameworkTestCase;
use WBW\Bundle\BootstrapBundle\Twig\Extension\CSS\ImageTwigExtension;
use WBW\Library\Core\Utility\IO\FileUtility;
use WBW\Library\Core\Helper\IO\FileHelper;

/**
* Image Twig extension.
Expand Down Expand Up @@ -55,7 +55,7 @@ public function testBootstrapImageBase64Function() {

$obj = new ImageTwigExtension();

$ref = FileUtility::getContents(getcwd() . "/Tests/Twig/Extension/CSS/ImageTwigExtensionTest.txt");
$ref = FileHelper::getContents(getcwd() . "/Tests/Twig/Extension/CSS/ImageTwigExtensionTest.txt");
$src = getcwd() . "/Resources/doc/images/bootstrap-stack_1024x0860.png";

$arg0 = [];
Expand Down
6 changes: 3 additions & 3 deletions Twig/Extension/AbstractBootstrapTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Twig_Extension;
use WBW\Bundle\BootstrapBundle\Navigation\NavigationInterface;
use WBW\Library\Core\Utility\Argument\StringUtility;
use WBW\Library\Core\Helper\Argument\StringHelper;

/**
* Abstract Bootstrap Twig extension.
Expand Down Expand Up @@ -59,7 +59,7 @@ public static function bootstrapHTMLElement($element, $content, array $attrs = [
$template = "<%element%%attributes%>%innerHTML%</%element%>";

// Initialize the attributes.
$attributes = trim(StringUtility::parseArray($attrs));
$attributes = trim(StringHelper::parseArray($attrs));
if (0 < strlen($attributes)) {
$attributes = " " . $attributes;
}
Expand All @@ -68,7 +68,7 @@ public static function bootstrapHTMLElement($element, $content, array $attrs = [
$innerHTML = null !== $content ? trim($content, " ") : "";

// Return the HTML.
return StringUtility::replace($template, ["%element%", "%attributes%", "%innerHTML%"], [trim($element), $attributes, $innerHTML]);
return StringHelper::replace($template, ["%element%", "%attributes%", "%innerHTML%"], [trim($element), $attributes, $innerHTML]);
}

}
4 changes: 2 additions & 2 deletions Twig/Extension/CSS/AbstractImageTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace WBW\Bundle\BootstrapBundle\Twig\Extension\CSS;

use WBW\Bundle\BootstrapBundle\Twig\Extension\AbstractBootstrapTwigExtension;
use WBW\Library\Core\Utility\Argument\StringUtility;
use WBW\Library\Core\Helper\Argument\StringHelper;

/**
* Abstract image Twig extension.
Expand Down Expand Up @@ -57,7 +57,7 @@ protected function bootstrapImage($src, $alt, $width, $height, $class, $usemap)
$attributes["usemap"] = $usemap;

// Return the HTML.
return StringUtility::replace($template, ["%attributes%"], [StringUtility::parseArray($attributes)]);
return StringHelper::replace($template, ["%attributes%"], [StringHelper::parseArray($attributes)]);
}

}
22 changes: 11 additions & 11 deletions Twig/Extension/CSS/ButtonTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
use Twig_SimpleFilter;
use Twig_SimpleFunction;
use WBW\Bundle\BootstrapBundle\BootstrapBundle;
use WBW\Library\Core\Utility\Argument\ArrayUtility;
use WBW\Library\Core\Utility\Argument\StringUtility;
use WBW\Library\Core\Helper\Argument\ArrayHelper;
use WBW\Library\Core\Helper\Argument\StringHelper;

/**
* Button Twig extension.
Expand Down Expand Up @@ -47,7 +47,7 @@ public function __construct() {
* @return string Returns the Bootstrap button "Danger".
*/
public function bootstrapButtonDangerFunction(array $args = []) {
return $this->bootstrapButton(ArrayUtility::get($args, "content"), ArrayUtility::get($args, "title"), ArrayUtility::get($args, "size", false), ArrayUtility::get($args, "block", false), ArrayUtility::get($args, "active", false), ArrayUtility::get($args, "disable", false), "btn-" . BootstrapBundle::BOOTSTRAP_DANGER, ArrayUtility::get($args, "icon"));
return $this->bootstrapButton(ArrayHelper::get($args, "content"), ArrayHelper::get($args, "title"), ArrayHelper::get($args, "size", false), ArrayHelper::get($args, "block", false), ArrayHelper::get($args, "active", false), ArrayHelper::get($args, "disable", false), "btn-" . BootstrapBundle::BOOTSTRAP_DANGER, ArrayHelper::get($args, "icon"));
}

/**
Expand All @@ -57,7 +57,7 @@ public function bootstrapButtonDangerFunction(array $args = []) {
* @return string Returns the Bootstrap button "Default".
*/
public function bootstrapButtonDefaultFunction(array $args = []) {
return $this->bootstrapButton(ArrayUtility::get($args, "content"), ArrayUtility::get($args, "title"), ArrayUtility::get($args, "size", false), ArrayUtility::get($args, "block", false), ArrayUtility::get($args, "active", false), ArrayUtility::get($args, "disable", false), "btn-" . BootstrapBundle::BOOTSTRAP_DEFAULT, ArrayUtility::get($args, "icon"));
return $this->bootstrapButton(ArrayHelper::get($args, "content"), ArrayHelper::get($args, "title"), ArrayHelper::get($args, "size", false), ArrayHelper::get($args, "block", false), ArrayHelper::get($args, "active", false), ArrayHelper::get($args, "disable", false), "btn-" . BootstrapBundle::BOOTSTRAP_DEFAULT, ArrayHelper::get($args, "icon"));
}

/**
Expand All @@ -67,7 +67,7 @@ public function bootstrapButtonDefaultFunction(array $args = []) {
* @return string Returns the Bootstrap button "Info".
*/
public function bootstrapButtonInfoFunction(array $args = []) {
return $this->bootstrapButton(ArrayUtility::get($args, "content"), ArrayUtility::get($args, "title"), ArrayUtility::get($args, "size", false), ArrayUtility::get($args, "block", false), ArrayUtility::get($args, "active", false), ArrayUtility::get($args, "disable", false), "btn-" . BootstrapBundle::BOOTSTRAP_INFO, ArrayUtility::get($args, "icon"));
return $this->bootstrapButton(ArrayHelper::get($args, "content"), ArrayHelper::get($args, "title"), ArrayHelper::get($args, "size", false), ArrayHelper::get($args, "block", false), ArrayHelper::get($args, "active", false), ArrayHelper::get($args, "disable", false), "btn-" . BootstrapBundle::BOOTSTRAP_INFO, ArrayHelper::get($args, "icon"));
}

/**
Expand All @@ -81,7 +81,7 @@ public function bootstrapButtonInfoFunction(array $args = []) {
public function bootstrapButtonLinkFilter($button, $href = self::DEFAULT_HREF, $target = null) {
$searches = ["<button", "type=\"button\"", "</button>"];
$replaces = ["<a", "href=\"" . $href . "\"" . (null !== $target ? " target=\"" . $target . "\"" : ""), "</a>"];
return StringUtility::replace($button, $searches, $replaces);
return StringHelper::replace($button, $searches, $replaces);
}

/**
Expand All @@ -91,7 +91,7 @@ public function bootstrapButtonLinkFilter($button, $href = self::DEFAULT_HREF, $
* @return string Returns the Bootstrap button "Link".
*/
public function bootstrapButtonLinkFunction(array $args = []) {
return $this->bootstrapButton(ArrayUtility::get($args, "content"), ArrayUtility::get($args, "title"), ArrayUtility::get($args, "size", false), ArrayUtility::get($args, "block", false), ArrayUtility::get($args, "active", false), ArrayUtility::get($args, "disable", false), "btn-link", ArrayUtility::get($args, "icon"));
return $this->bootstrapButton(ArrayHelper::get($args, "content"), ArrayHelper::get($args, "title"), ArrayHelper::get($args, "size", false), ArrayHelper::get($args, "block", false), ArrayHelper::get($args, "active", false), ArrayHelper::get($args, "disable", false), "btn-link", ArrayHelper::get($args, "icon"));
}

/**
Expand All @@ -101,7 +101,7 @@ public function bootstrapButtonLinkFunction(array $args = []) {
* @return string Returns the Bootstrap button "Primary".
*/
public function bootstrapButtonPrimaryFunction(array $args = []) {
return $this->bootstrapButton(ArrayUtility::get($args, "content"), ArrayUtility::get($args, "title"), ArrayUtility::get($args, "size", false), ArrayUtility::get($args, "block", false), ArrayUtility::get($args, "active", false), ArrayUtility::get($args, "disable", false), "btn-" . BootstrapBundle::BOOTSTRAP_PRIMARY, ArrayUtility::get($args, "icon"));
return $this->bootstrapButton(ArrayHelper::get($args, "content"), ArrayHelper::get($args, "title"), ArrayHelper::get($args, "size", false), ArrayHelper::get($args, "block", false), ArrayHelper::get($args, "active", false), ArrayHelper::get($args, "disable", false), "btn-" . BootstrapBundle::BOOTSTRAP_PRIMARY, ArrayHelper::get($args, "icon"));
}

/**
Expand All @@ -111,7 +111,7 @@ public function bootstrapButtonPrimaryFunction(array $args = []) {
* @return string Returns the Bootstrap button transformed into a submit button.
*/
public function bootstrapButtonSubmitFilter($bootstrapButton) {
return StringUtility::replace($bootstrapButton, ["type=\"button\""], ["type=\"submit\""]);
return StringHelper::replace($bootstrapButton, ["type=\"button\""], ["type=\"submit\""]);
}

/**
Expand All @@ -121,7 +121,7 @@ public function bootstrapButtonSubmitFilter($bootstrapButton) {
* @return string Returns the Bootstrap button "Success".
*/
public function bootstrapButtonSuccessFunction(array $args = []) {
return $this->bootstrapButton(ArrayUtility::get($args, "content"), ArrayUtility::get($args, "title"), ArrayUtility::get($args, "size", false), ArrayUtility::get($args, "block", false), ArrayUtility::get($args, "active", false), ArrayUtility::get($args, "disable", false), "btn-" . BootstrapBundle::BOOTSTRAP_SUCCESS, ArrayUtility::get($args, "icon"));
return $this->bootstrapButton(ArrayHelper::get($args, "content"), ArrayHelper::get($args, "title"), ArrayHelper::get($args, "size", false), ArrayHelper::get($args, "block", false), ArrayHelper::get($args, "active", false), ArrayHelper::get($args, "disable", false), "btn-" . BootstrapBundle::BOOTSTRAP_SUCCESS, ArrayHelper::get($args, "icon"));
}

/**
Expand All @@ -131,7 +131,7 @@ public function bootstrapButtonSuccessFunction(array $args = []) {
* @return string Returns the Bootstrap button "Warning".
*/
public function bootstrapButtonWarningFunction(array $args = []) {
return $this->bootstrapButton(ArrayUtility::get($args, "content"), ArrayUtility::get($args, "title"), ArrayUtility::get($args, "size", false), ArrayUtility::get($args, "block", false), ArrayUtility::get($args, "active", false), ArrayUtility::get($args, "disable", false), "btn-" . BootstrapBundle::BOOTSTRAP_WARNING, ArrayUtility::get($args, "icon"));
return $this->bootstrapButton(ArrayHelper::get($args, "content"), ArrayHelper::get($args, "title"), ArrayHelper::get($args, "size", false), ArrayHelper::get($args, "block", false), ArrayHelper::get($args, "active", false), ArrayHelper::get($args, "disable", false), "btn-" . BootstrapBundle::BOOTSTRAP_WARNING, ArrayHelper::get($args, "icon"));
}

/**
Expand Down
12 changes: 6 additions & 6 deletions Twig/Extension/CSS/CodeTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace WBW\Bundle\BootstrapBundle\Twig\Extension\CSS;

use Twig_SimpleFunction;
use WBW\Library\Core\Utility\Argument\ArrayUtility;
use WBW\Library\Core\Helper\Argument\ArrayHelper;

/**
* Code Twig extension.
Expand Down Expand Up @@ -44,7 +44,7 @@ public function __construct() {
* @return string Returns the Bootstrap basic block.
*/
public function bootstrapBasicBlockFunction(array $args = []) {
return $this->bootstrapBasicBlock(ArrayUtility::get($args, "content"));
return $this->bootstrapBasicBlock(ArrayHelper::get($args, "content"));
}

/**
Expand All @@ -54,7 +54,7 @@ public function bootstrapBasicBlockFunction(array $args = []) {
* @return string Returns the Bootstrap inline.
*/
public function bootstrapInlineFunction(array $args = []) {
return $this->bootstrapInline(ArrayUtility::get($args, "content"));
return $this->bootstrapInline(ArrayHelper::get($args, "content"));
}

/**
Expand All @@ -64,7 +64,7 @@ public function bootstrapInlineFunction(array $args = []) {
* @return string Returns the Bootstrap smaple output.
*/
public function bootstrapSampleOutputFunction(array $args = []) {
return $this->bootstrapSampleOutput(ArrayUtility::get($args, "content"));
return $this->bootstrapSampleOutput(ArrayHelper::get($args, "content"));
}

/**
Expand All @@ -74,7 +74,7 @@ public function bootstrapSampleOutputFunction(array $args = []) {
* @return string Returns the Bootstrap user input.
*/
public function bootstrapUserInputFunction(array $args = []) {
return $this->bootstrapUserInput(ArrayUtility::get($args, "content"));
return $this->bootstrapUserInput(ArrayHelper::get($args, "content"));
}

/**
Expand All @@ -84,7 +84,7 @@ public function bootstrapUserInputFunction(array $args = []) {
* @return string Returns the Bootstrap variable.
*/
public function bootstrapVariableFunction(array $args = []) {
return $this->bootstrapVariable(ArrayUtility::get($args, "content"));
return $this->bootstrapVariable(ArrayHelper::get($args, "content"));
}

/**
Expand Down
10 changes: 5 additions & 5 deletions Twig/Extension/CSS/GridTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace WBW\Bundle\BootstrapBundle\Twig\Extension\CSS;

use Twig_SimpleFunction;
use WBW\Library\Core\Utility\Argument\ArrayUtility;
use WBW\Library\Core\Helper\Argument\ArrayHelper;

/**
* Grid Twig extension.
Expand Down Expand Up @@ -64,7 +64,7 @@ public function bootstrapGridFunction(array $args = []) {
* @return string Returns the Bootstrap grid with offset.
*/
public function bootstrapGridOffsetFunction(array $args = []) {
return $this->bootstrapGrid(ArrayUtility::get($args, "lgOffset"), ArrayUtility::get($args, "mdOffset"), ArrayUtility::get($args, "smOffset"), ArrayUtility::get($args, "xsOffset"), ArrayUtility::get($args, "recopyOffset", false), "offset-");
return $this->bootstrapGrid(ArrayHelper::get($args, "lgOffset"), ArrayHelper::get($args, "mdOffset"), ArrayHelper::get($args, "smOffset"), ArrayHelper::get($args, "xsOffset"), ArrayHelper::get($args, "recopyOffset", false), "offset-");
}

/**
Expand All @@ -74,7 +74,7 @@ public function bootstrapGridOffsetFunction(array $args = []) {
* @return string Returns the Bootstrap grid with pull.
*/
public function bootstrapGridPullFunction(array $args = []) {
return $this->bootstrapGrid(ArrayUtility::get($args, "lgPull"), ArrayUtility::get($args, "mdPull"), ArrayUtility::get($args, "smPull"), ArrayUtility::get($args, "xsPull"), ArrayUtility::get($args, "recopyPull", false), "pull-");
return $this->bootstrapGrid(ArrayHelper::get($args, "lgPull"), ArrayHelper::get($args, "mdPull"), ArrayHelper::get($args, "smPull"), ArrayHelper::get($args, "xsPull"), ArrayHelper::get($args, "recopyPull", false), "pull-");
}

/**
Expand All @@ -84,7 +84,7 @@ public function bootstrapGridPullFunction(array $args = []) {
* @return string Returns the Bootstrap grid with push.
*/
public function bootstrapGridPushFunction(array $args = []) {
return $this->bootstrapGrid(ArrayUtility::get($args, "lgPush"), ArrayUtility::get($args, "mdPush"), ArrayUtility::get($args, "smPush"), ArrayUtility::get($args, "xsPush"), ArrayUtility::get($args, "recopyPush", false), "push-");
return $this->bootstrapGrid(ArrayHelper::get($args, "lgPush"), ArrayHelper::get($args, "mdPush"), ArrayHelper::get($args, "smPush"), ArrayHelper::get($args, "xsPush"), ArrayHelper::get($args, "recopyPush", false), "push-");
}

/**
Expand All @@ -94,7 +94,7 @@ public function bootstrapGridPushFunction(array $args = []) {
* @return string Returns the Bootstrap grid with stacked-to-horizontal.
*/
public function bootstrapGridStackedFunction(array $args = []) {
return $this->bootstrapGrid(ArrayUtility::get($args, "lg"), ArrayUtility::get($args, "md"), ArrayUtility::get($args, "sm"), ArrayUtility::get($args, "xs"), ArrayUtility::get($args, "recopy", false), "");
return $this->bootstrapGrid(ArrayHelper::get($args, "lg"), ArrayHelper::get($args, "md"), ArrayHelper::get($args, "sm"), ArrayHelper::get($args, "xs"), ArrayHelper::get($args, "recopy", false), "");
}

/**
Expand Down
Loading

0 comments on commit 9b8f036

Please sign in to comment.