Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .gitattributes
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/vendor
composer.lock
/.idea
Empty file modified .travis.yml
100644 → 100755
Empty file.
Empty file modified CHANGELOG.md
100644 → 100755
Empty file.
Empty file modified CONTRIBUTING.md
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified bootstrap.php
100644 → 100755
Empty file.
10 changes: 5 additions & 5 deletions composer.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
],
"require": {
"php": ">=5.4.0",
"illuminate/console": "5.*",
"illuminate/database": "5.*",
"illuminate/events": "5.*",
"illuminate/filesystem": "5.*",
"illuminate/support": "5.*"
"illuminate/console": "*",
"illuminate/database": "*",
"illuminate/events": "*",
"illuminate/filesystem": "*",
"illuminate/support": "*"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
Expand Down
Empty file modified phpunit.xml
100644 → 100755
Empty file.
Empty file modified src/Baum/Console/BaumCommand.php
100644 → 100755
Empty file.
Empty file modified src/Baum/Console/InstallCommand.php
100644 → 100755
Empty file.
Empty file modified src/Baum/Extensions/Eloquent/Collection.php
100644 → 100755
Empty file.
Empty file modified src/Baum/Extensions/Eloquent/Model.php
100644 → 100755
Empty file.
Empty file modified src/Baum/Extensions/Query/Builder.php
100644 → 100755
Empty file.
5 changes: 3 additions & 2 deletions src/Baum/Generators/Generator.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Baum\Generators;

use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Str;

abstract class Generator {

Expand Down Expand Up @@ -78,7 +79,7 @@ protected function parseStub($stub, $replacements=array()) {
* @return string
*/
protected function classify($input) {
return studly_case(str_singular($input));
return Str::studly(Str::singular($input));
}

/**
Expand All @@ -88,6 +89,6 @@ protected function classify($input) {
* @return string
*/
protected function tableize($input) {
return snake_case(str_plural($input));
return Str::snake(Str::plural($input));
}
}
Empty file modified src/Baum/Generators/MigrationGenerator.php
100644 → 100755
Empty file.
Empty file modified src/Baum/Generators/ModelGenerator.php
100644 → 100755
Empty file.
Empty file modified src/Baum/Generators/stubs/migration.php
100644 → 100755
Empty file.
Empty file modified src/Baum/Generators/stubs/model.php
100644 → 100755
Empty file.
6 changes: 5 additions & 1 deletion src/Baum/Move.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,11 @@ protected function fireMoveEvent($event, $halt = true) {
// but we relay the event into the node instance.
$event = "eloquent.{$event}: ".get_class($this->node);

$method = $halt ? 'until' : 'fire';
if (version_compare(app()->version(), '5.8.0', '>=')) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can compare against 5.4, this method was deprecated there.
But personally I would not check against it. I would make v2.0 require Laravel >=5.4

$method = $halt ? 'until' : 'dispatch';
} else {
$method = $halt ? 'until' : 'fire';
}

return static::$dispatcher->$method($event, $this->node);
}
Expand Down
Empty file modified src/Baum/MoveNotPossibleException.php
100644 → 100755
Empty file.
Empty file modified src/Baum/Node.php
100644 → 100755
Empty file.
Empty file modified src/Baum/Providers/BaumServiceProvider.php
100644 → 100755
Empty file.
Empty file modified src/Baum/SetBuilder.php
100644 → 100755
Empty file.
5 changes: 3 additions & 2 deletions src/Baum/SetMapper.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Baum;

use \Closure;
use Illuminate\Support\Arr;
use Illuminate\Support\Contracts\ArrayableInterface;
use Baum\Node;

Expand Down Expand Up @@ -128,13 +129,13 @@ protected function mapTreeRecursive(array $tree, $parentKey = null, &$affectedKe
protected function getSearchAttributes($attributes) {
$searchable = array($this->node->getKeyName());

return array_only($attributes, $searchable);
return Arr::only($attributes, $searchable);
}

protected function getDataAttributes($attributes) {
$exceptions = array($this->node->getKeyName(), $this->getChildrenKeyName());

return array_except($attributes, $exceptions);
return Arr::except($attributes, $exceptions);
}

protected function firstOrNew($attributes) {
Expand Down
Empty file modified src/Baum/SetValidator.php
100644 → 100755
Empty file.
Empty file modified tests/config/database.php
100644 → 100755
Empty file.
Empty file modified tests/migrators/CategoryMigrator.php
100644 → 100755
Empty file.
Empty file modified tests/migrators/ClusterMigrator.php
100644 → 100755
Empty file.
Empty file modified tests/models/Category.php
100644 → 100755
Empty file.
Empty file modified tests/models/Cluster.php
100644 → 100755
Empty file.
Empty file modified tests/seeders/CategorySeeder.php
100644 → 100755
Empty file.
Empty file modified tests/seeders/ClusterSeeder.php
100644 → 100755
Empty file.
Empty file modified tests/suite/BaumTestCase.php
100644 → 100755
Empty file.
Empty file modified tests/suite/Category/CategoryColumnsTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/Category/CategoryCustomEventsTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/Category/CategoryHierarchyTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/Category/CategoryMovementTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/Category/CategoryRelationsTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/Category/CategoryScopedTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/Category/CategorySoftDeletesTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/Category/CategoryTreeMapperTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/Category/CategoryTreeRebuildingTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/Category/CategoryTreeValidationTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/CategoryTestCase.php
100644 → 100755
Empty file.
Empty file modified tests/suite/Cluster/ClusterColumnsTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/Cluster/ClusterHierarchyTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/Cluster/ClusterMovementTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/ClusterTestCase.php
100644 → 100755
Empty file.
Empty file modified tests/suite/NodeModelExtensionsTest.php
100644 → 100755
Empty file.
Empty file modified tests/suite/QueryBuilderExtensionTest.php
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion tests/suite/support.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function hmap(array $nodes, $preserve = null) {
} else {
$preserve = is_string($preserve) ? array($preserve) : $preserve;

$current = array_only($node, $preserve);
$current = \Illuminate\Support\Arr::only($node, $preserve);
if ( array_key_exists('children', $node) ) {
$children = $node['children'];

Expand Down