@@ -9,7 +9,7 @@ |
||
9 | 9 | */ |
10 | 10 | class Test |
11 | 11 | { |
12 | - function run(){ |
|
12 | + function run() { |
|
13 | 13 | echo "test run"; |
14 | 14 | } |
15 | 15 | } |
@@ -49,7 +49,6 @@ |
||
49 | 49 | * @method ChildUser findOneByRememberToken(string $remember_token) Return the first ChildUser filtered by the remember_token column |
50 | 50 | * @method ChildUser findOneByCreatedAt(string $created_at) Return the first ChildUser filtered by the created_at column |
51 | 51 | * @method ChildUser findOneByUpdatedAt(string $updated_at) Return the first ChildUser filtered by the updated_at column * |
52 | - |
|
53 | 52 | * @method ChildUser requirePk($key, ConnectionInterface $con = null) Return the ChildUser by primary key and throws \Propel\Runtime\Exception\EntityNotFoundException when not found |
54 | 53 | * @method ChildUser requireOne(ConnectionInterface $con = null) Return the first ChildUser matching the query and throws \Propel\Runtime\Exception\EntityNotFoundException when not found |
55 | 54 | * |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | |
525 | 525 | // use transaction because $criteria could contain info |
526 | 526 | // for more than one table or we could emulating ON DELETE CASCADE, etc. |
527 | - return $con->transaction(function () use ($con) { |
|
527 | + return $con->transaction(function() use ($con) { |
|
528 | 528 | $affectedRows = 0; // initialize var to track total num of affected rows |
529 | 529 | $affectedRows += parent::doDeleteAll($con); |
530 | 530 | // Because this db requires some delete cascade/set null emulation, we have to |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | |
560 | 560 | // use transaction because $criteria could contain info |
561 | 561 | // for more than one table or we could emulating ON DELETE CASCADE, etc. |
562 | - return $con->transaction(function () use ($con, $criteria) { |
|
562 | + return $con->transaction(function() use ($con, $criteria) { |
|
563 | 563 | $affectedRows = 0; // initialize var to track total num of affected rows |
564 | 564 | |
565 | 565 | UserTableMap::removeInstanceFromPool($criteria); |
@@ -365,8 +365,8 @@ |
||
365 | 365 | * @throws PropelException Any exceptions caught during processing will be |
366 | 366 | * rethrown wrapped into a PropelException. |
367 | 367 | */ |
368 | - public static function doDelete($values, ConnectionInterface $con = null) |
|
369 | - { |
|
368 | + public static function doDelete($values, ConnectionInterface $con = null) |
|
369 | + { |
|
370 | 370 | if (null === $con) { |
371 | 371 | $con = Propel::getServiceContainer()->getWriteConnection(UserTableMap::DATABASE_NAME); |
372 | 372 | } |
@@ -102,12 +102,12 @@ discard block |
||
102 | 102 | * first dimension keys are the type constants |
103 | 103 | * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' |
104 | 104 | */ |
105 | - protected static $fieldNames = array ( |
|
106 | - self::TYPE_PHPNAME => array('Id', 'Name', 'Datecreate', 'Desc', ), |
|
107 | - self::TYPE_CAMELNAME => array('id', 'name', 'datecreate', 'desc', ), |
|
108 | - self::TYPE_COLNAME => array(SelfpriceTableMap::COL_ID, SelfpriceTableMap::COL_NAME, SelfpriceTableMap::COL_DATECREATE, SelfpriceTableMap::COL_DESC, ), |
|
109 | - self::TYPE_FIELDNAME => array('id', 'name', 'datecreate', 'desc', ), |
|
110 | - self::TYPE_NUM => array(0, 1, 2, 3, ) |
|
105 | + protected static $fieldNames = array( |
|
106 | + self::TYPE_PHPNAME => array('Id', 'Name', 'Datecreate', 'Desc',), |
|
107 | + self::TYPE_CAMELNAME => array('id', 'name', 'datecreate', 'desc',), |
|
108 | + self::TYPE_COLNAME => array(SelfpriceTableMap::COL_ID, SelfpriceTableMap::COL_NAME, SelfpriceTableMap::COL_DATECREATE, SelfpriceTableMap::COL_DESC,), |
|
109 | + self::TYPE_FIELDNAME => array('id', 'name', 'datecreate', 'desc',), |
|
110 | + self::TYPE_NUM => array(0, 1, 2, 3,) |
|
111 | 111 | ); |
112 | 112 | |
113 | 113 | /** |
@@ -116,12 +116,12 @@ discard block |
||
116 | 116 | * first dimension keys are the type constants |
117 | 117 | * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 |
118 | 118 | */ |
119 | - protected static $fieldKeys = array ( |
|
120 | - self::TYPE_PHPNAME => array('Id' => 0, 'Name' => 1, 'Datecreate' => 2, 'Desc' => 3, ), |
|
121 | - self::TYPE_CAMELNAME => array('id' => 0, 'name' => 1, 'datecreate' => 2, 'desc' => 3, ), |
|
122 | - self::TYPE_COLNAME => array(SelfpriceTableMap::COL_ID => 0, SelfpriceTableMap::COL_NAME => 1, SelfpriceTableMap::COL_DATECREATE => 2, SelfpriceTableMap::COL_DESC => 3, ), |
|
123 | - self::TYPE_FIELDNAME => array('id' => 0, 'name' => 1, 'datecreate' => 2, 'desc' => 3, ), |
|
124 | - self::TYPE_NUM => array(0, 1, 2, 3, ) |
|
119 | + protected static $fieldKeys = array( |
|
120 | + self::TYPE_PHPNAME => array('Id' => 0, 'Name' => 1, 'Datecreate' => 2, 'Desc' => 3,), |
|
121 | + self::TYPE_CAMELNAME => array('id' => 0, 'name' => 1, 'datecreate' => 2, 'desc' => 3,), |
|
122 | + self::TYPE_COLNAME => array(SelfpriceTableMap::COL_ID => 0, SelfpriceTableMap::COL_NAME => 1, SelfpriceTableMap::COL_DATECREATE => 2, SelfpriceTableMap::COL_DESC => 3,), |
|
123 | + self::TYPE_FIELDNAME => array('id' => 0, 'name' => 1, 'datecreate' => 2, 'desc' => 3,), |
|
124 | + self::TYPE_NUM => array(0, 1, 2, 3,) |
|
125 | 125 | ); |
126 | 126 | |
127 | 127 | /** |
@@ -403,8 +403,8 @@ discard block |
||
403 | 403 | $criteria = $criteria->buildCriteria(); // build Criteria from Selfprice object |
404 | 404 | } |
405 | 405 | |
406 | - if ($criteria->containsKey(SelfpriceTableMap::COL_ID) && $criteria->keyContainsValue(SelfpriceTableMap::COL_ID) ) { |
|
407 | - throw new PropelException('Cannot insert a value for auto-increment primary key ('.SelfpriceTableMap::COL_ID.')'); |
|
406 | + if ($criteria->containsKey(SelfpriceTableMap::COL_ID) && $criteria->keyContainsValue(SelfpriceTableMap::COL_ID)) { |
|
407 | + throw new PropelException('Cannot insert a value for auto-increment primary key (' . SelfpriceTableMap::COL_ID . ')'); |
|
408 | 408 | } |
409 | 409 | |
410 | 410 | |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | |
414 | 414 | // use transaction because $criteria could contain info |
415 | 415 | // for more than one table (I guess, conceivably) |
416 | - return $con->transaction(function () use ($con, $query) { |
|
416 | + return $con->transaction(function() use ($con, $query) { |
|
417 | 417 | return $query->doInsert($con); |
418 | 418 | }); |
419 | 419 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | public function getUpSQL() |
39 | 39 | { |
40 | 40 | return array ( |
41 | - 'default' => ' |
|
41 | + 'default' => ' |
|
42 | 42 | # This is a fix for InnoDB in MySQL >= 4.1.x |
43 | 43 | # It "suspends judgement" for fkey relationships until are tables are set. |
44 | 44 | SET FOREIGN_KEY_CHECKS = 0; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function getDownSQL() |
69 | 69 | { |
70 | 70 | return array ( |
71 | - 'default' => ' |
|
71 | + 'default' => ' |
|
72 | 72 | # This is a fix for InnoDB in MySQL >= 4.1.x |
73 | 73 | # It "suspends judgement" for fkey relationships until are tables are set. |
74 | 74 | SET FOREIGN_KEY_CHECKS = 0; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function getUpSQL() |
39 | 39 | { |
40 | - return array ( |
|
40 | + return array( |
|
41 | 41 | 'default' => ' |
42 | 42 | # This is a fix for InnoDB in MySQL >= 4.1.x |
43 | 43 | # It "suspends judgement" for fkey relationships until are tables are set. |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function getDownSQL() |
69 | 69 | { |
70 | - return array ( |
|
70 | + return array( |
|
71 | 71 | 'default' => ' |
72 | 72 | # This is a fix for InnoDB in MySQL >= 4.1.x |
73 | 73 | # It "suspends judgement" for fkey relationships until are tables are set. |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | public function getUpSQL() |
39 | 39 | { |
40 | 40 | return array ( |
41 | - 'default' => ' |
|
41 | + 'default' => ' |
|
42 | 42 | # This is a fix for InnoDB in MySQL >= 4.1.x |
43 | 43 | # It "suspends judgement" for fkey relationships until are tables are set. |
44 | 44 | SET FOREIGN_KEY_CHECKS = 0; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function getDownSQL() |
69 | 69 | { |
70 | 70 | return array ( |
71 | - 'default' => ' |
|
71 | + 'default' => ' |
|
72 | 72 | # This is a fix for InnoDB in MySQL >= 4.1.x |
73 | 73 | # It "suspends judgement" for fkey relationships until are tables are set. |
74 | 74 | SET FOREIGN_KEY_CHECKS = 0; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function getUpSQL() |
39 | 39 | { |
40 | - return array ( |
|
40 | + return array( |
|
41 | 41 | 'default' => ' |
42 | 42 | # This is a fix for InnoDB in MySQL >= 4.1.x |
43 | 43 | # It "suspends judgement" for fkey relationships until are tables are set. |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function getDownSQL() |
69 | 69 | { |
70 | - return array ( |
|
70 | + return array( |
|
71 | 71 | 'default' => ' |
72 | 72 | # This is a fix for InnoDB in MySQL >= 4.1.x |
73 | 73 | # It "suspends judgement" for fkey relationships until are tables are set. |
@@ -20,30 +20,30 @@ |
||
20 | 20 | * set Monolog |
21 | 21 | */ |
22 | 22 | $container->share(Monolog\Logger::class) |
23 | - ->withArgument('myLogger') |
|
24 | - ; |
|
23 | + ->withArgument('myLogger') |
|
24 | + ; |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * set Propel2 Logger |
28 | 28 | */ |
29 | 29 | Propel\Runtime\Propel::getServiceContainer()->setLogger('defaultLogger', (new Monolog\Logger('defaultLogger')) |
30 | - ->pushHandler(new Monolog\Handler\StreamHandler('php://stderr'))); |
|
30 | + ->pushHandler(new Monolog\Handler\StreamHandler('php://stderr'))); |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * set Debug bar |
34 | 34 | */ |
35 | 35 | $container->add(DebugBar\StandardDebugBar::class) |
36 | - ->withMethodCall("addCollector",[ |
|
37 | - new DebugBar\Bridge\Twig\TwigCollector( |
|
38 | - new DebugBar\Bridge\Twig\TraceableTwigEnvironment($container->get(Twig_Environment::class)) |
|
39 | - ) |
|
40 | - ]) |
|
41 | - ->withMethodCall("addCollector",[ |
|
42 | - new DebugBar\Bridge\Propel2Collector(Propel\Runtime\Propel::getConnection()) |
|
43 | - ]) |
|
44 | - ->withMethodCall("addCollector",[ |
|
45 | - new \DebugBar\Bridge\MonologCollector($container->get(Monolog\Logger::class)) |
|
46 | - ]) |
|
36 | + ->withMethodCall("addCollector",[ |
|
37 | + new DebugBar\Bridge\Twig\TwigCollector( |
|
38 | + new DebugBar\Bridge\Twig\TraceableTwigEnvironment($container->get(Twig_Environment::class)) |
|
39 | + ) |
|
40 | + ]) |
|
41 | + ->withMethodCall("addCollector",[ |
|
42 | + new DebugBar\Bridge\Propel2Collector(Propel\Runtime\Propel::getConnection()) |
|
43 | + ]) |
|
44 | + ->withMethodCall("addCollector",[ |
|
45 | + new \DebugBar\Bridge\MonologCollector($container->get(Monolog\Logger::class)) |
|
46 | + ]) |
|
47 | 47 | ; |
48 | 48 | |
49 | 49 |
@@ -33,15 +33,15 @@ |
||
33 | 33 | * set Debug bar |
34 | 34 | */ |
35 | 35 | $container->add(DebugBar\StandardDebugBar::class) |
36 | - ->withMethodCall("addCollector",[ |
|
36 | + ->withMethodCall("addCollector", [ |
|
37 | 37 | new DebugBar\Bridge\Twig\TwigCollector( |
38 | 38 | new DebugBar\Bridge\Twig\TraceableTwigEnvironment($container->get(Twig_Environment::class)) |
39 | 39 | ) |
40 | 40 | ]) |
41 | - ->withMethodCall("addCollector",[ |
|
41 | + ->withMethodCall("addCollector", [ |
|
42 | 42 | new DebugBar\Bridge\Propel2Collector(Propel\Runtime\Propel::getConnection()) |
43 | 43 | ]) |
44 | - ->withMethodCall("addCollector",[ |
|
44 | + ->withMethodCall("addCollector", [ |
|
45 | 45 | new \DebugBar\Bridge\MonologCollector($container->get(Monolog\Logger::class)) |
46 | 46 | ]) |
47 | 47 | ; |
@@ -12,12 +12,12 @@ |
||
12 | 12 | class ServiceProvider extends AbstractServiceProvider |
13 | 13 | { |
14 | 14 | |
15 | - protected $provides = [ |
|
15 | + protected $provides = [ |
|
16 | 16 | |
17 | - ]; |
|
17 | + ]; |
|
18 | 18 | |
19 | - public function register() |
|
20 | - { |
|
19 | + public function register() |
|
20 | + { |
|
21 | 21 | |
22 | - } |
|
22 | + } |
|
23 | 23 | } |
@@ -4,10 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\Console\Application as CoreApp; |
6 | 6 | use Symfony\Component\Console\Input\InputInterface; |
7 | -use Symfony\Component\Console\Output\OutputInterface; |
|
8 | -use Symfony\Component\Console\Input\InputArgument; |
|
9 | -use Symfony\Component\Console\Input\InputOption; |
|
10 | -use Symfony\Component\Finder\Finder; |
|
11 | 7 | |
12 | 8 | class Application extends CoreApp |
13 | 9 | { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | // exit('f'); |
29 | 29 | // } |
30 | 30 | |
31 | - /** |
|
31 | + /** |
|
32 | 32 | * Gets the default commands that should always be available. |
33 | 33 | * |
34 | 34 | * @return array An array of default Command instances |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | $defaultCommands[] = new \Symfony\Component\Console\Command\HelpCommand(); |
43 | 43 | |
44 | - $defaultCommands[] = new \Frameworkless\Console\Commands\TestCommand(); |
|
44 | + $defaultCommands[] = new \Frameworkless\Console\Commands\TestCommand(); |
|
45 | 45 | |
46 | 46 | return $defaultCommands; |
47 | 47 | } |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | |
66 | 66 | |
67 | - function __o(){ |
|
67 | + function __o(){ |
|
68 | 68 | |
69 | - } |
|
69 | + } |
|
70 | 70 | } |
71 | 71 | \ No newline at end of file |
@@ -64,7 +64,7 @@ |
||
64 | 64 | |
65 | 65 | |
66 | 66 | |
67 | - function __o(){ |
|
67 | + function __o() { |
|
68 | 68 | |
69 | 69 | } |
70 | 70 | } |
71 | 71 | \ No newline at end of file |
@@ -10,26 +10,26 @@ |
||
10 | 10 | class User implements \Frameworkless\SeedInterface |
11 | 11 | { |
12 | 12 | |
13 | - /** |
|
14 | - * |
|
15 | - * @param type $id |
|
16 | - * @return type |
|
17 | - */ |
|
18 | - static public function build($id = 1) |
|
19 | - { |
|
20 | - $generator = \Faker\Factory::create(); |
|
21 | - $populator = new \Faker\ORM\Propel2\Populator($generator); |
|
22 | - $populator->addEntity(\Core\Models\User\User::class, $id); |
|
23 | - return $populator->execute(); |
|
24 | - } |
|
13 | + /** |
|
14 | + * |
|
15 | + * @param type $id |
|
16 | + * @return type |
|
17 | + */ |
|
18 | + static public function build($id = 1) |
|
19 | + { |
|
20 | + $generator = \Faker\Factory::create(); |
|
21 | + $populator = new \Faker\ORM\Propel2\Populator($generator); |
|
22 | + $populator->addEntity(\Core\Models\User\User::class, $id); |
|
23 | + return $populator->execute(); |
|
24 | + } |
|
25 | 25 | |
26 | - /** |
|
27 | - * |
|
28 | - * @return type |
|
29 | - */ |
|
30 | - public static function reset() |
|
31 | - { |
|
32 | - return \Core\Models\User\UserQuery::create()->deleteAll(); |
|
33 | - } |
|
26 | + /** |
|
27 | + * |
|
28 | + * @return type |
|
29 | + */ |
|
30 | + public static function reset() |
|
31 | + { |
|
32 | + return \Core\Models\User\UserQuery::create()->deleteAll(); |
|
33 | + } |
|
34 | 34 | |
35 | 35 | } |